JBIG2DECODE in pdf

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
martin0
Posts: 10
Joined: 2016-11-03T03:40:30-07:00
Authentication code: 1151

JBIG2DECODE in pdf

Post by martin0 »

Hi,
I wish to decode a jbig2 image in a pdf.
I see that ImageMagick understands CompressionMethod JBIG2, but not the format.

is there an alternate format I should use for this scenario?

Kind Regards
Martin
muccigrosso
Posts: 64
Joined: 2017-10-03T10:39:52-07:00
Authentication code: 1151

Re: JBIG2DECODE in pdf

Post by muccigrosso »

I'm trying to do this same thing. identify says "identify: no decode delegate for this image format `JBG2' @ error/constitute.c/ReadImage/509."
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: JBIG2DECODE in pdf

Post by fmw42 »

Does

Code: Select all

convert -version
list jbig for delegates? Is there a difference between jbig and jbig2?

I suppose there is, since documentation shows some differences. For jbig2, docs are at https://www.leadtools.com/help/leadtool ... atjb2.html.

I suspect IM has implemented jbig, but not jbig2.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: JBIG2DECODE in pdf

Post by fmw42 »

To read or write JBIG2 files, you must have the JBIG2 delegate library installed. If you are trying to read a PDF with JBIG2 image imbedded, then ImageMagick uses Ghostscript to read PDF files. Try converting the PDF directly with Ghostscript. If it does not work, then you will have to ask on a Ghostcript forum or the Ghostscript development team. If it does work and you cannot get IM to work, then it is either an issue with having the jbig2 delegate or you may have to configure the delegates.xml file differently for PS/PDF files.

See
https://en.wikipedia.org/wiki/JBIG2
https://en.wikipedia.org/wiki/Joint_Bi- ... erts_Group
https://jpeg.org/jbig/
https://www.ghostscript.com
http://www.jbig2dec.com
Post Reply