Hi all,
I'm trying to resize a jpg image from 1.5Mb to 500Kb:
# convert -define jpeg:extent=500kb print.jpg print33.jpg
Yet:
# ls -lah print*.jpg
-rw-r--r-- 1 root root 1.5M Mar 21 16:03 print33.jpg
-rw-r--r-- 1 root root 1.5M Mar 21 15:16 print.jpg
Image it's not resized.
Any clues ?
I'm using the latest stable version:
# convert|head
Version: ImageMagick 6.7.6-1 2012-03-21 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
....
Many thanks,
geen
jpeg:extent issue
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: jpeg:extent issue
It works fine for me under IM 6.7.6.1 Q16 Mac OSX Snow Leopard. I resized a jpg from 4MB to 500KB
Perhaps you need to post a link to your jpg input image.
Perhaps you need to post a link to your jpg input image.
Re: jpeg:extent issue
Ok,
Here's another test I made, with the below pic "print.jpg" :
http://i43.tinypic.com/2i8jblu.jpg
$ ls -la print.jpg -h
-rw-r--r-- 1 root root 94K Mar 22 04:55 print.jpg
$ convert -define jpeg:extent=10kb print.jpg print33.jpg
$ ls -lah print33.jpg
-rw-r--r-- 1 root root 86K Mar 22 05:05 print33.jpg
It might be because the values are too small, and convert it's failing the operation ?
Thanks
Here's another test I made, with the below pic "print.jpg" :
http://i43.tinypic.com/2i8jblu.jpg
$ ls -la print.jpg -h
-rw-r--r-- 1 root root 94K Mar 22 04:55 print.jpg
$ convert -define jpeg:extent=10kb print.jpg print33.jpg
$ ls -lah print33.jpg
-rw-r--r-- 1 root root 86K Mar 22 05:05 print33.jpg
It might be because the values are too small, and convert it's failing the operation ?
Thanks
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: jpeg:extent issue
First you are using a different image name in your command than the file you uploaded. But your command works for me on the uploaded file though it only gets to 15kb rather than 10kb.
convert -define jpeg:extent=10kb 2i8jblu.jpg 2i8jblu_10kb.jpg
identify 2i8jblu.jpg 2i8jblu_10kb.jpg
2i8jblu.jpg JPEG 1599x973 1599x973+0+0 8-bit DirectClass 51.6KB 0.000u 0:00.009
2i8jblu_10kb.jpg[1] JPEG 1599x973 1599x973+0+0 8-bit DirectClass 15.2KB 0.000u 0:00.000
convert -define jpeg:extent=10kb 2i8jblu.jpg 2i8jblu_10kb.jpg
identify 2i8jblu.jpg 2i8jblu_10kb.jpg
2i8jblu.jpg JPEG 1599x973 1599x973+0+0 8-bit DirectClass 51.6KB 0.000u 0:00.009
2i8jblu_10kb.jpg[1] JPEG 1599x973 1599x973+0+0 8-bit DirectClass 15.2KB 0.000u 0:00.000
Re: jpeg:extent issue
The new name was generated automatically.
Weird that to me doesn't work as expected.
Weird that to me doesn't work as expected.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: jpeg:extent issue
compare the size results from identify yourimagename and your file system size. see if they are different
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: jpeg:extent issue
Their are lower limits on how much JPEG can compress images!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: jpeg:extent issue
Yeah, that's the issue. Lower limits on how much an image can be compressed.
Thanks
Thanks