[Poppler-bugs] [Bug 51982] pdftops fails for 600+ dpi

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jul 14 07:45:08 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=51982

--- Comment #7 from thomasf <Thomas.Freitag at alfa.de> 2012-07-14 07:45:08 PDT ---
I found now the time to have a deeper look into it: it was not really the
striping itself but our optimization of output:
If it is a color output but we detect that the color image has only gray
components, we reduce the output to a grayscale image. Unfortunately this
overwrites the numComps of the splash bitmap, so the next stripe will always be
seen as a grayscale image, so the initialization of that image output will be a
grayscale image but the data will remain color pixels.
This is quite easy to repair:
Introduce an additional local variable initialNumComps:

int numComps, initialNumComps;

instead of just

int numComps;

Initialize the new variable before starting the loop:

  // render the stripes
  initialNumComps = numComps;
  for (stripeY = sliceY; stripeY < sliceH; stripeY += stripeH) {

and reset numComps for each stripe:

    // draw the rasterized image
    bitmap = splashOut->getBitmap();
    numComps = initialNumComps;

Unfortunately I'm not able to create a patch for it in the moment, because my
code base still waits that the patch uploaded yesterday for bug 51822 to be
committed.
But I'll create a patch if necessary after the patch for bug 51822 will be
committed.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list