Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3860

TilingPaint.getImage() should return an ARGB-Typed-Image

    Details

      Description

      TilingPaint.getImage() has this:

              ColorSpace outputCS = ColorSpace.getInstance(ColorSpace.CS_sRGB);
              ColorModel cm = new ComponentColorModel(outputCS, true, false,
                      Transparency.TRANSLUCENT, DataBuffer.TYPE_BYTE);
      
              WritableRaster raster = cm.createCompatibleWritableRaster(rasterWidth, rasterHeight);
              BufferedImage image = new BufferedImage(cm, raster, false, null);
      

      This is the same problem as in PDFBOX-3854. I have a confidential file ("bicycle", p134) with many patterns, and changing the code to return BufferedImage.TYPE_INT_ARGB brings rendering from 70 secs to 26 secs.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tilman Tilman Hausherr
                Reporter:
                tilman Tilman Hausherr
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: