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
fromwand.imageimportImagewithImage(filename='test.png',format='PNG') asim:
print('open by class',im.make_blob(format='RGBA')[:20])
withImage() asim:
im.read(filename='test.png',format='PNG')
print('open by read',im.make_blob(format='RGBA')[:20])
generate test.png by this command line:
magick -size 128x128 xc:white test.png
Result of the script:
open by class b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'
open by read b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x80'
The 'open by class' is expected.
wand version: 0.6.10
ImageMagick version: 7.1.0-50
system version: Linux 5.19.0-1-amd64 Debian 5.19.6-1
Update:
Remove the 'format' keyword in read() may fix provide expected result, but this keyword is required for loading APNG format using blob or file keyword.
Similar problem also happened with JPEG format, cause the solution in #593 (comment) not work correctly.
Thanks for reporting this. Looks like something changes in IM-7. I would suspect it's related to the difference between MagickSetFormat vs MagickSetImageFormat. If true, should be a quick fix.
This is the script:
generate test.png by this command line:
Result of the script:
The 'open by class' is expected.
wand version: 0.6.10
ImageMagick version: 7.1.0-50
system version: Linux 5.19.0-1-amd64 Debian 5.19.6-1
Update:
Remove the 'format' keyword in read() may fix provide expected result, but this keyword is required for loading APNG format using blob or file keyword.
Similar problem also happened with JPEG format, cause the solution in #593 (comment) not work correctly.
Update:
A simpler script to show this problem:
The text was updated successfully, but these errors were encountered: