Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

img.resolution is (0.0, 0.0), but img.size work well. #613

Open
668168 opened this issue Mar 3, 2023 · 2 comments
Open

img.resolution is (0.0, 0.0), but img.size work well. #613

668168 opened this issue Mar 3, 2023 · 2 comments

Comments

@668168
Copy link

668168 commented Mar 3, 2023

ENV:

wand.version.VERSION: 0.6.11
windows server 2022
python 3.8.10

INPUT

from wand.image import Image
with Image(filename='images/hummingbird.jpg' ,units='pixelsperinch') as img: # 330, 252
    print(f"size: {img.size}")
    print(f"resolution: {img.resolution}")

OUTPUT

size: (330, 252)
resolution: (0.0, 0.0)

@emcconville
Copy link
Owner

Thanks for posting. I'm unable to reproduce this. Can you run the following, and share the output?

python -m wand.version --verbose

Also, try the following...

identify -units pixelperinch -format '%x %y %U\r\n' images/hummingbird.jpg

@668168
Copy link
Author

668168 commented Mar 9, 2023

sorry for a long holiday.

PS D:\code> python -m wand.version --verbose
Wand 0.6.11
ImageMagick 7.1.0-57 Q16-HDRI x64 eadf378:20221230 https://imagemagick.org
PS D:\code> 


D:\code>magick identify -units pixelperinch -format '%x %y %U\r\n' images/hummingbird.jpg 
identify: unrecognized units type `pixelperinch' @ error/identify.c/IdentifyImageCommand/880.

D:\code>magick identify  -format '%x %y %U\r\n' images/hummingbird.jpg                    
identify: unable to open image '%y': No such file or directory @ error/blob.c/OpenBlob/3570.
identify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/741.
identify: unable to open image '%U\r\n'': No such file or directory @ error/blob.c/OpenBlob/3570.
identify: unable to open image '%U\r\n'': No such file or directory @ error/blob.c/OpenBlob/3570.
identify: no decode delegate for this image format `' @ error/constitute.c/ReadImage/741.
'72
D:\code>magick identify   images/hummingbird.jpg                       
images/hummingbird.jpg WEBP 330x252 330x252+0+0 8-bit sRGB 22520B 0.016u 0:00.002

D:\code>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants