You don't hve to convert them with str()
. You can either:
- call
pathlib.Path.open()
and pass the resulting object toimg2pdf
(but don't forget to close the resulting object) - call…
@mara0004 thank you for your input -- i've reverted the match/case usage for now: af6fe27d53476fe68d43b11766651a6637a098a7
@mara0004 yeah i'm still thinking about that bit. The match
/case
syntax is a feature i've waited for since i started using python a decade ago so i'm really eager to use it now. I'm not sure…
thank you for your feedback!
i committed the preliminary MIFF support to main and will add more test cases later but your use-case of 16bit CMYK should be covered already so have fun! :)
Something about your TIFF file seems odd. When I run tifftopnm
from netpbm
I get the following message:
tifftopnm: This color separation file uses an inkset (41712) we can't handle. We…
The code above works with all my MIFF test cases. Now I just need a 16 bit CMYK MIFF image. If I try to convert your testCMYK.tif
to MIFF using convert I get:
convert-im6.q16: Sorry, can…
Here is a MIFF parser:
import glob
import re
import zlib
line_re = re.compile(
r"""
[^\x00-\x20\x7f-\x9f] # the field name must not start with a control char or space
…
thank you for your bug report!
unfortunately I'm unable to reproduce your problem on debian stable. the error you cite sounds like a python2 error but img2pdf in debian stable uses python3.
a…
A non-standard ink set... At which point should I get worried what people are doing with my software? :D
So I guess you want to convert your tiff into pdf because pdf is what you send to your…
Hrm... yeah parsing MIFF is an option but I don't really like splitting off a imagemagick process to create the MIFF. This will be very platform specific. Your problem is also that you need CMYK…
Can you share your input tif image? How did you create it?
Here is a PIL issue about this: https://github.com/python-pillow/Pillow/issues/1888
Either this limitation of PIL gets fixed or we…