-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imagetoraster, imagetopdf: Images do not get formatted correctly #145
Comments
Ok. I will look into it. |
@dheeraj135, I have found the cause for the images not getting auto-rotated. You have used overly complicated ways to determine whether the image and the output page are of mismatching orientations (landscape/portrait). I have replaced the occurences by a simple, intuitive expression and it works now. |
@dheeraj135, for the problem with the CUPS Raster header of the |
Currently, cups-filters copes with the lack of PWG Raster support by |
pwg-raster is a subset of cups raster. Can we simply remove unsupported options from the cups raster file to convert it to pwg rater file? |
@tillkamppeter Thanks for the fix. |
Major Differences:
All the differences are defined in the pwg raster specification: PWG Raster Format |
I have checked and it seems that imagetoraster all the time centered the images by changing the size of the unprintable margins instead of adding white pixels around the image to the bitmap. So drivers should cope with that. So I am closing this issue as what I have observed in this regard is not actually a bug. |
I take a usual digital photo as it comes out of a camera, landscape orientation, 4;3 aspect ratio and pass it through the filter chain for printing, using a PPD of Dye Sublimation photo printer used with Gutenprint.
The command lines are as follows:
This is the PPD file
DS620.ppd
and this is the picture:
P8235870.JPG
To visualize the output files (CUPS Raster format) I use rasterview.
What I expect is that the picture gets rotated by 90 degrees as it is landscape and the output page is portrait. I also expect that after the rotation it gets scaled into the frame according to the selected option and scaled the same in X and Y direction, not stretched in one direction more than in the other. A square should stay a square.
Also the CUPS Raster header data about the page geometry (page sizes/dimensions, margins, bounding boxes) should match one the PPD's paper size entry (ImageableArea/PaperDimension) of the selected paper size and should also contain the size's name (in rasterview click the button at the lower right to display header data of the page).
The problems are the following:
imagetopdf
(executable bit ofimagetoraster
removed, CUPS restarted, CUPS Raster headers are all correct here, but they are generated bygstoraster
)test-fill.raster
) the image is NOT rotated before scaling to fill the page.test-fit.raster
) works correctly.test-plain.raster
) is like "fit-to-page" which is OK.imagetoraster
(standard installation/configuration of cups-filters)test-fill.raster
) the image is NOT rotated before scaling to fill the page (same as withimagetopdf
). The CUPS Raster header is correct here.test-fit.raster
) scales the rotated (correct) image to fit the paper width (correct) but does not add white areas at the top and the bottom. Instead, it adds larger unprintable margins in the CUPS Raster header. This is wrong and most probably makes the printer driver producing a wrong printout. The paper sizes/dimensions, margins, and bounding boxes have to match the selected page size's ("PageSize" option or default setting) entry in the PPD file (ImageableArea/PaperDimension keywords).test-plain.raster
) is the same wrong behavior as "fit-to-page".So the problems are the non-rotated image for the "fill" case with both
imagetopdf
andimagetoraster
and the wrong CUPS Raster header with "fit-to-page" or no option inimagetoraster
.@dheeraj135, could you have a look into this? Thanks.
The text was updated successfully, but these errors were encountered: