gridFitImage

ctm, which maps an image's unit square to device pixels, with the image edges moved outwards onto whole pixels. The image then covers every pixel it touches, and two images that meet leave no seam between them. A canvas that draws into pixels applies it just before it draws an image, image mask or image clip.

ISO 32000-1 does not say how an image edge meets the pixel grid, so MuPDF decides: this is fz_gridfit_matrix for an image that is not tiled. It applies to an image turned by a multiple of 90 degrees, flipped or not. Any other matrix comes back unchanged (#300).