Fix mouse coordinates on rectangular images