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

pdftex-supportrequests at sarovar.org pdftex-supportrequests at sarovar.org
Wed Nov 10 02:43:56 CET 2010


Support Requests item #4319, was opened at 2010-11-06 13: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.

Thanks,

Boris
 
 

----------------------------------------------------------------------

Comment By: Boris Okun (okun)
Date: 2010-11-09 19:43

Message:
Hartmut,

Thank you for the exhaustive explanation. It looks like a bug in jbig2enc.

Boris


----------------------------------------------------------------------

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

Message:
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 
7.4.8.3 and 7.4.8.4 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 
600.

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

----------------------------------------------------------------------

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

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

Thanks for looking into this,

Boris  



----------------------------------------------------------------------

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

Message:
can you please attach the image?

Regards,
Thanh

----------------------------------------------------------------------

You can respond by visiting: 
http://sarovar.org/tracker/?func=detail&atid=494&aid=4319&group_id=106


More information about the ntg-pdftex mailing list