[poppler] PDF to PPM: Page height differs between 32bit and 64bit systems
Dyweni - Poppler
7FdqWGq4fE8x at dyweni.com
Wed May 14 20:36:40 PDT 2014
On 2014-05-14 17:15, James Cloos wrote:
>
> If you replace:
>
> h = (int)ceil(pg_h)
>
> with:
>
> h = (int)ceilf((float)pg_h)
>
> it should avoid the rounding bug.
>
> (pg_w should get the same treatment.)
>
Yes, this works for both pg_w and pg_h.
> Or perhaps pg_h and pg_w should get a (double)(float) treatment earlier
> in the code.
>
> A more accurate treatment would round fewer of the least significant
> bits, but casting to float and back still leaves 24 bits of resolution.
>
> -JimC
> --
> James Cloos <cloos at jhcloos.com> OpenPGP: 0x997A9F17ED7DAEA6
More information about the poppler
mailing list