Summary: | pdftoppm: patch to fix aspect ratio when scale is changed. | ||
---|---|---|---|
Product: | poppler | Reporter: | Jun Harada <harajune> |
Component: | utils | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | harajune |
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | the patch to fix aspect raio when scaling |
I don't think we should be adding a new parameter to tell pdftoppm to use the correct aspect ratio. The current behavior when only one of -scale-to-x or scale-to-y is used is clearly buggy. I've attached a patch to bug 43393 (where this issue was first reported) to fix this bug. I think your patch cannot handle the case when both x and y are specified. Specifying both is a common case when you make a thumb nail. For example, think about "convert" command in ImageMagick. You can specify both width and height with "-size" option to make thumbnail. Your code crashes if fixAspect is set and y_scaleTo is not (In reply to comment #2) > I think your patch cannot handle the case when both x and y are specified. That's what the -scale-to option does. It will use the size for both x and y but correct it for the aspect ratio. I am closing this bug as i understand from Adrian's comment that this is already fixed, if not please reopen and explain why |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 57617 [details] the patch to fix aspect raio when scaling I made the patch to fix aspect ratio when you try to change scale with "--scale-to-x" and "--scale-to-y" option. This patch works for poppler-0.18.4. I hope that this patch can be helpful for someone.