You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to determine the format of an Image, it doesn't always come back with the correct image type, depending on how I instantiate the Image object.
Better yet, it also seems to be dependent on OS/versions. When tested on OSX using Python3 and libmagickwand5 it works correctly. However, when tested on Linux using Python3 and ImageMagick-6 it fails consistently.
I've seen this most frequently when trying to detect the format of PDF files, but have also experienced troubles with it when trying to detect the format of a plain text file.
When instantiating the Image object, if I instantiate it as Image(filename=...) it works correctly. When instantiated as Image(blob=...) or Image(file=...), though, it doesn't always detect the file format correctly.
Here's a sample tests/format_test.py test suite that exhibits this behaviour:
When attempting to determine the format of an Image, it doesn't always come back with the correct image type, depending on how I instantiate the Image object.
Better yet, it also seems to be dependent on OS/versions. When tested on OSX using Python3 and libmagickwand5 it works correctly. However, when tested on Linux using Python3 and ImageMagick-6 it fails consistently.
I've seen this most frequently when trying to detect the format of PDF files, but have also experienced troubles with it when trying to detect the format of a plain text file.
When instantiating the Image object, if I instantiate it as
Image(filename=...)
it works correctly. When instantiated asImage(blob=...)
orImage(file=...)
, though, it doesn't always detect the file format correctly.Here's a sample
tests/format_test.py
test suite that exhibits this behaviour:The text was updated successfully, but these errors were encountered: