The customer reports: We have a problem with the interpolation. When we Rip with a rotation, the flag -DDOINTERPOLATE has no effect. I don't know how I can reproduce with the standard GS, because I've never understood clearly how you could rotate a file (e.g -dAutoRotatePages almost never works). In our custom devices, we force a rotation by modifying the matrix in get_initial_matrix(). I understand GS can desactivate the interpolation on certain images in case it is not needed (e.g. when the scale for this image, when going from input to output pixels, is near 100%), which is a good thing. Apparently this work in the normal case, but not with a rotation. I attach a sample file, with which you'll maybe reproduce the problem. It contains a very small raster image (12x13).
Created attachment 4746 [details] SmallRasterImage.pdf
*** Bug 689521 has been marked as a duplicate of this bug. ***
Consultation with the customer about the best way to use gs to solve their problem is needed, if changes in interpolation are needed please assign to Michael.
Interpolation of rotated images can be quickly hacked by filtering the source stream before feeding it to the image operator. In fact, this is how it is already done for black-and-white 1 bit/pixel images.
Assigning to Robin since he has done a bit of work on interpolating landscape images.
Created attachment 7542 [details] 0001.patch Git patch to add Image interpolation. To apply this, do: git am 0001.patch and that will add a new commit onto the end of your existing branch with the patch applied. You can then remove this by: git reset HEAD~1 This patch seems to test out quite well, but it fails when the clist is used with vertical positioning problems on the contents of bitmaps that span bands.
Passing to Ray in the hopes that he will have a chance to look at it and comment on the offsets seen when sending interpolated sub images to the clist.
Could this be related to Bug 691697 ?
*** Bug 691719 has been marked as a duplicate of this bug. ***
Bug still reproducible in Ghostscript 9.03
Fixed in: commit 045e544c507b151daebc19aaf21a8b13b6c4a844 Author: Robin Watts <robin.watts@artifex.com> Date: Mon Oct 22 17:31:27 2012 +0100 Support rotated images with interpolation. See bug 690246. Testing this on the cluster with a patch that enables interpolation for all landscape jobs reveals no problems.