Page 1 of 1

Thumbnail creation in spite of memory allocation failure

Posted: 2013-09-07T01:11:24-07:00
by grazzman
Hello,

when the convert throws an error "memory allocation failed", the "thumbnail-100x100.jpg" will still be created with the original size (e.g. 8000 x 2000)

Code: Select all

convert -resize 100x100 -quality 100 reallybigimage-8000x2000.jpg thumbnail-100x100.jpg
Is there an option, which prevents creating the file?

Re: Thumbnail creation in spite of memory allocation failure

Posted: 2013-09-07T09:51:48-07:00
by fmw42
convert -resize 100x100 -quality 100 reallybigimage-8000x2000.jpg thumbnail-100x100.jpg
I do not know about the question you ask, but you IM syntax is not proper for IM 6 though still may work. The input image should be read first if not a vector format.

convert reallybigimage-8000x2000.jpg -resize 100x100 -quality 100 thumbnail-100x100.jpg

see
http://www.imagemagick.org/Usage/basics/#why


You may also want to see the -define jpg:size at
http://www.imagemagick.org/Usage/formats/#jpg_read