Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1650

[PATCH] Proposed correction for resolution handling

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.5
    • None
    • fo/unqualified
    • Operating System: All
      Platform: All
    • 47027

    Description

      Hi Andreas,

      in your revision http://svn.apache.org/viewvc?rev=764317&view=rev you intended to fix the conversion from pixels to internal millipoints. I'm afraid you seem to have misunderstood the intention of the source and target resolution. When I introduced the two resolutions the intention was that the source resolution specifies the resolution at which pixel lengths are interpreted on the source side (pixel lengths in FO, pixel lengths for bitmaps that don't have resolution information etc.). The target resolution OTOH specifies the resolution at which the output device operates. For example, if you target a 300 dpi printer, you specify 300 dpis. For the screen you'd specify 96 dpi (most probably). This value controls the number of pixels generated for a bitmap that is generated from a vector graphic image that is rendered to a pixel-based output format (like PCL or PNG).

      FO src res layout engine. tgt res Output
      <px> -------> <mpt> -------> <px>

      The attached patch demonstrates how I would fix this. An example of the result: Specify a table column with 72px and you get 72000mpt as before at default settings (72dpi). At a higher resolution, the pixels get smaller as you have more pixels per inch. So at 144dpi, you have twice as many pixels in the same space per dimension. The pixel length is half the previous length. 72px are now 36000mpt.

      Attachments

        1. b47027.diff
          12 kB
          Andreas L. Delmelle
        2. b47027.diff
          9 kB
          Andreas L. Delmelle
        3. SourceResolutionPatch.diff
          6 kB
          Jeremias Maerki

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            jeremias@apache.org Jeremias Maerki
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: