Aquileo | Recent changes to 76: Support JBIG gray level images via multiple planeshttps://sourceforge.net/p/graphicsmagick/feature-requests/76/Recent changes to 76: Support JBIG gray level images via multiple planesenTue, 06 Jan 2026 14:29:24 -0000Aquileo | #76 Support JBIG gray level images via multiple planeshttps://sourceforge.net/p/graphicsmagick/feature-requests/76/?limit=25#b727<div class="markdown_content"><ul> <li><strong>summary</strong>: Support of JBIG gray level images --&gt; Support JBIG gray level images via multiple planes</li> </ul></div>Bob FriesenhahnTue, 06 Jan 2026 14:29:24 -0000https://sourceforge.netf61664da9141075a8456e1b8d65e889cd8a591ceAquileo | #76 Support of JBIG gray level imageshttps://sourceforge.net/p/graphicsmagick/feature-requests/76/?limit=25#5159<div class="markdown_content"><ul> <li><strong>summary</strong>: Wrong support of JBIG gray level images --&gt; Support of JBIG gray level images</li> </ul></div>Bob FriesenhahnTue, 06 Jan 2026 14:28:38 -0000https://sourceforge.net128e7181a92d2c3f51653de56385970eae3f78a4Aquileo | #76 Wrong support of JBIG gray level imageshttps://sourceforge.net/p/graphicsmagick/feature-requests/76/?limit=25#9877<div class="markdown_content"><p>Ticket moved from /p/graphicsmagick/bugs/762/</p> <p>Can't be converted:</p> <ul> <li><strong>_milestone</strong>: v1.0_(example)</li> </ul></div>Bob FriesenhahnTue, 06 Jan 2026 14:26:05 -0000https://sourceforge.netc4fdac7795b048b18a1ee94974579c123aa7cafeAquileo | #762 Wrong support of JBIG gray level imageshttps://sourceforge.net/p/graphicsmagick/bugs/762/?limit=25#f523<div class="markdown_content"><p>If I convert your lena.jbg to lossless JP2 it requires 159,285 bytes. Your JBIG file required 184,620 bytes.</p></div>Bob FriesenhahnSun, 04 Jan 2026 22:28:55 -0000https://sourceforge.netab211b48097c38e868ce4cd8e9c6362a9bbd395aAquileo | #762 Wrong support of JBIG gray level imageshttps://sourceforge.net/p/graphicsmagick/bugs/762/?limit=25#ef17<div class="markdown_content"><p>I has been explicitly written that I am not doing compression competition - it is only interesting. I originally want to support missing JBG variant, as it has been originally documented and implemented. JBG apparently does not achieve the best compression.</p> <p>Anyway, you have made test on a different image that I do not have.</p> <p>JBG documentation claims to achieve better compression ratio on Grey code (not gray). But there is no information in a file whether Grey code or standard encoding used.</p></div>Jaroslav FojtikSun, 04 Jan 2026 21:12:15 -0000https://sourceforge.net17ad40a56a4dfbe8e39812515bd23bd2684545c9Aquileo | #762 Wrong support of JBIG gray level imageshttps://sourceforge.net/p/graphicsmagick/bugs/762/?limit=25#1c8dBob FriesenhahnSun, 04 Jan 2026 16:07:26 -0000https://sourceforge.netb0fdad9ecb6a9508dcfd59cffa547e9e28a5b4afAquileo | #762 Wrong support of JBIG gray level imageshttps://sourceforge.net/p/graphicsmagick/bugs/762/?limit=25#eba2<div class="markdown_content"><p>This is not fair, JPEG is lossy format. JP2 is also lossy. Compression ratio is not comparable.</p> <p>The only effective lossless format is PNG<br/> 04.01.2026 02:02 161 704 lena.png<br/> and PNG performs better.</p></div>Jaroslav FojtikSun, 04 Jan 2026 01:03:26 -0000https://sourceforge.net6395618daadef86e63e5fb0b83f0ec86670e817eAquileo | #762 Wrong support of JBIG gray level imageshttps://sourceforge.net/p/graphicsmagick/bugs/762/?limit=25#ec8c<div class="markdown_content"><p>There is no support for JBIG2 in the Windows build, or in libtiff either. If JBIG2 is accepted, it is being mapped to uncompressed. Compare with an ordinary JPEG or JP2 file instead.</p></div>Bob FriesenhahnSun, 04 Jan 2026 00:30:46 -0000https://sourceforge.net80737532708a41c17f876035e06472c838390745Aquileo | #762 Wrong support of JBIG gray level imageshttps://sourceforge.net/p/graphicsmagick/bugs/762/?limit=25#488d<div class="markdown_content"><p>Compression seems to be signifficantly better.</p> <div class="codehilite"><pre><span></span><code>gconvert.exe lena.pcx lena.jbg gm convert -compress JBIG2 lena.pcx lena.tiff </code></pre></div> <p><strong>04.01.2026 00:38 184620 lena.jbg</strong><br/> 03.01.2026 19:17 254218 lena.pcx<br/> 04.01.2026 00:39 263955 lena.tiff</p></div>Jaroslav FojtikSat, 03 Jan 2026 23:42:15 -0000https://sourceforge.netf8002a5dbdcb788d3e77c9c101a8ec6e525d8764Aquileo | #762 Wrong support of JBIG gray level imageshttps://sourceforge.net/p/graphicsmagick/bugs/762/?limit=25#51ae<div class="markdown_content"><p>It is written in JBIG library documentation. I have followed documentation only.</p> <blockquote> <p>If you want to encode a grey-scale image, you can use the library<br/> function</p> <p>void jbg_split_planes(unsigned long x, unsigned long y, int has_planes,<br/> int encode_planes,<br/> const unsigned char <em>src, unsigned char </em>*dest,<br/> int use_graycode);</p> <p>It separates an image in which each pixel is represented by one or<br/> more bytes into separate bit planes. The dest array of pointers to<br/> these bit planes can then be handed over to jbg_enc_init(). The<br/> variables x and y specify the width and height of the image in pixels,<br/> and has_planes specifies how many bits per pixel are used. As each<br/> pixel is represented by an integral number of consecutive bytes, of<br/> which each contains up to eight bits, the total length of the input<br/> image array src[] will therefore be x * y * ((has_planes + 7) / 8)<br/> bytes. The pixels are stored as usually in English reading order, and<br/> for each pixel the integer value is stored with the most significant<br/> byte coming first (Bigendian). This is exactly the format used in raw<br/> PGM files. In encode_planes, the number of bit planes that shall be<br/> extracted can be specified. This allows for instance to extract only<br/> the most significant 8 bits of a 12-bit image, where each pixel is<br/> represented by two bytes, by specifying has_planes = 12 and<br/> encode_planes = 8. If use_graycode is zero, then the binary code of<br/> the pixel integer values will be used instead of the Gray code. Plane<br/> 0 contains always the most significant bit.<br/> </p> </blockquote></div>Jaroslav FojtikSat, 03 Jan 2026 23:16:23 -0000https://sourceforge.net74e9faa25edbb59c6be4cf65368fe1607ceabd3c