When I try to resize image
# convert ./files/property/source/191.jpg -resize 140x105> -quality 95 -antialias ./files/property/image/0/191.jpg
It shows me an error:
convert: unable to open image `95': No such file or directory @ magick/blob.c/OpenBlob/2418.
But the same function works with other images, so it does not work for some images but they are normal in browser, image viewers, photoshop, etc.
# identify ./files/property/source/191.jpg
./files/property/source/191.jpg JPEG 3264x2448 3264x2448+0+0 8-bit DirectClass 2.5mb 0.610u 0:02
# convert -version
Version: ImageMagick 6.4.5 2008-11-13 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2008 ImageMagick Studio LLC
and the same problem with the Windows imagemagick
Version: ImageMagick 6.5.4-10 2009-08-08 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Convert function does not resize image
Re: Convert function does not resize image
Try this
- convert ./files/property/source/191.jpg -resize 140x105\> -quality 95 -antialias ./files/property/image/0/191.jpg
Re: Convert function does not resize image
Thanks!
It works fine.
Also I found solution it can be quoted:
convert "./files/property/source/191.jpg" -resize "140x105>" -quality 95 -antialias "./files/property/image/0/191.jpg"
It works fine.
Also I found solution it can be quoted:
convert "./files/property/source/191.jpg" -resize "140x105>" -quality 95 -antialias "./files/property/image/0/191.jpg"
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Convert function does not resize image
As a FYI what is happening is that the shell sees the pattern....
It then creates a file called "-quality" (which you may like to delete now), and redirects the normal output of the convet command to it (heir is no output so file remains empty).
the convert command then sees...
So it thinks "95" is an image (as it isn't a known option) and tries to read it as an image. Thus producing the error you see.
Code: Select all
> -quality
the convert command then sees...
Code: Select all
convert "./files/property/source/191.jpg" -resize 140x105 95 -antialias "./files/property/image/0/191.jpg"
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/