PIL.Image.Image
objects as input?
I don't see how this can be possible. Not all input images are read into a PIL object. JPEG images, for example, are copied into the PDF as they are and you cannot do that if you just give the PIL…
Yet another unqualified idea of mine: Maybe the format of bytes 11 to 27 could be used to identify jbig2 files?
No. Those contain the size and dpi and can thus be arbitrary integers.
With which name and email can I attribute you in the git commit implementing the diff you posted?
Uuuuh! Nice catch, thank you!
Also please feel free to file more bugs that you run into when running mmdebstrap on arch. Since I'm only running it on Debian, I'm quite certain this will not be the…
So now the only remaining piece we need is some way to identify the file as JBIG2. Any ideas?
Not exactly a creative or reliable idea, but perhaps just the file extensions
.jb2
/…
I also just confirmed that lossless JBIG2 compresses some output better than CCITT4. I got some bilevel PDF from here:
https://www.jbig2dec.com/tests/index.html
Then converted 042.bmp to JBIG2…
it seems that indeed the PDF does not contain the header containing the crucial information that this is a JBIG2 file (the magic) and the image dimensions.
It seems that the JBIG2 stream…
I have just encountered an extreme example yesterday: https://www.e-periodica.ch/cntmng?pid=ens-001:1968:14::46
You could extract the images, then
- use
img2pdf
to produce a merged…
Okay, I obtained a PDF containing a JBIG2 encoded image. This is becoming more troublesome... Instead of just containing one blob per image, the PDF contains two blobs for each image. One is the…
If it's somehow possible then yes, img2pdf should support jbig2 as input. One major reason is the one you cite in your last message: we avoid useless encoding computations in the same way that we…
The next issue: with jbig2enc not being present in Linux distros and being encumbered by patents and no JBIG2 support in imagemagick or PIL, I cannot add any testcases for JBIG2 support to the…
Yes, looks like there should be a header and if that also contains the size of the image then that should be enough to support JBIG2 as input.
But there seems to be no JBIG2 encoder in the…
JBIG2 and CCITT are ways to encode bilevel image data but they are not "formats" in the same sense as JPEG or PNG in the sense that they have no header that identifies which kind of file it is, what…
Hi,
I want to understand the problem. What is a "jbig2 image"? Which software produces those? jbig2 is not an image format but a way to encode bilevel data. Why would converting a jbig2 stream by…
I love it. This will definitely be part of the next img2pdf release. I'll probably name it 0.5.0 because support for transparancey is a major new feature. Unfortunately, I spent most of my time these…
I'm not saying you are wrong and I'm not saying that I won't accept your pull request (thanks for preparing it!) -- but I first want to contact the imagemagick developers about this issue because the…
The descriptions cannot change either. The JSON Format is not supposed to change unless its version is bumped: https://github.com/ImageMagick/ImageMagick6/issues/90#issuecomment-668281074
If the…
Debian still depends on this version. And so in turn does Ubuntu. Unfortunately my own Desktop system and the Travis CI tests are running Debian and Ubuntu, respectively. I will change the tests to…