[NTG-pdftex] [pdftex-Support Requests][4319] jbig2 resolution

pdftex-supportrequests at sarovar.org pdftex-supportrequests at sarovar.org
Tue Nov 9 21:59:38 CET 2010

Support Requests item #4319, was opened at 2010-11-06 19:18
Status: Open
Priority: 3
Submitted By: Boris Okun (okun)
Assigned to: Nobody (None)
Summary: jbig2 resolution 
Category: None
Group: None
Resolution: None

Initial Comment:
When including a jbig2enc generated file, the x,y-resolutions seem to be completely off.
I think the problem is with the lines 701-702 in writejbig2.c 

img_xres(img) = (int) (pip->xres * 0.0254 + 0.5);
img_yres(img) = (int) (pip->yres * 0.0254 + 0.5);

The file has resolution set to 600dpi, according to my hex browser, if I manually change it to 600/0.0254=2362, I get the expected output.

Or, perhaps, I and/or jbig2enc misunderstand the format of jbig2 files.




>Comment By: Hartmut Henkel (hhenkel)
Date: 2010-11-09 21:59

The parameters img_xres(img) and img_yres(img) are handled 
in pixels/inch within pdftex (see also calculations for PNG 
ang JPG images).

The JBIG2 standard (file fcd14492.pdf) specifies in section and that the resolution must be stated in 
pixels/meter (not inch!).

You expect your JBIG2 file to have a resolution of 600 dpi; 
when you divide by 0.0254, you get pixels/meter. So in your 
JBIG2 file there should indeed be 23622 as resolution, not 

It looks as if there is some calculation bug when generating 
the JBIG2 file.


Comment By: Boris Okun (okun)
Date: 2010-11-08 15:14

I am attaching:
original: tetra.tiff
compressed: jbig2 -s tetra.tiff > tetra.jbig2
tex: tetra.tex

Thanks for looking into this,



Comment By: The Thanh Han (hanthethanh)
Date: 2010-11-08 13:26

can you please attach the image?



You can respond by visiting: 

More information about the ntg-pdftex mailing list