Bug 52514 - [PATCH] Square image not scaled
Summary: [PATCH] Square image not scaled
Status: RESOLVED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: svg (show other bugs)
Version: all
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-24 09:58 UTC by Klearchos
Modified: 2012-04-14 04:05 UTC (History)
0 users



Attachments
It contains 2 images and the fo file in order to reproduce the problem (4.28 KB, application/octet-stream)
2012-01-24 09:59 UTC, Klearchos
Details
patch that fixes issue (637 bytes, patch)
2012-04-14 00:01 UTC, Luis Bernardo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Klearchos 2012-01-24 09:58:09 UTC
When a square image is used and the *-progression-dimension.maximum are equal, then the image fails to scale and it overflows the box limits.

For example this would reproduce the problem:

      <fo:block>
        <fo:external-graphic src="url(file:///D:/dev/fop/src/fo/300x300.JPG)"
            inline-progression-dimension.maximum="50mm"
            content-width="scale-down-to-fit"
            block-progression-dimension.maximum="50mm"
            content-height="scale-down-to-fit"
            border="solid 5pt red"/>
      </fo:block>


Workaround:
Different values for *-p-d.maximum give expected result.
Even minor changes to the dimension would resolve the issue.
For example in the previous code if one of the progression-dimension.maximum was set to 50.01mm the image would scale correctly.
Comment 1 Klearchos 2012-01-24 09:59:27 UTC
Created attachment 28198 [details]
It contains 2 images and the fo file in order to reproduce the problem
Comment 2 Glenn Adams 2012-04-07 01:41:42 UTC
resetting P2 open bugs to P3 pending further review
Comment 3 Glenn Adams 2012-04-08 04:49:36 UTC
please provide output PDF file showing problem output
Comment 4 Luis Bernardo 2012-04-14 00:01:00 UTC
Created attachment 28607 [details]
patch that fixes issue
Comment 5 Luis Bernardo 2012-04-14 00:01:53 UTC
added PATCH tag
Comment 6 Glenn Adams 2012-04-14 04:03:30 UTC
http://svn.apache.org/viewvc?rev=1326053&view=rev
Comment 7 Glenn Adams 2012-04-14 04:03:59 UTC
thanks luis!
Comment 8 Glenn Adams 2012-04-14 04:05:07 UTC
(In reply to comment #7)
> thanks luis!

and klearchos for the initial bug filing!