Page 1 of 1

convert empty .htm .html ... removes source file

Posted: 2011-09-15T16:41:03-07:00
by rusname
Hi all,

Following command removes source file in case it is empty

# convert -thumbnail 100x100 -background white -gravity center -quality 50 -extent 100x100 -filter Box ./index.html jpg:-

Output (for ImageMagick-6.7.2-6) is following:
sh: html2ps: command not found
convert: delegate failed `"html2ps" -U -o "%o" "%i"' @ error/delegate.c/InvokeDelegate/1058.
convert: unable to open image `/tmp/magick-UxVxLBRI': No such file or directory @ error/blob.c/OpenBlob/2588.
convert: unable to open file `/tmp/magick-UxVxLBRI': No such file or directory @ error/constitute.c/ReadImage/571.
convert: missing an image filename `jpg:-' @ error/convert.c/ConvertImageCommand/3015.

OS Linux Debian 6.0
ImageMagick-6.7.2-6 (custom build)

Thanks

Re: convert empty .htm .html ... removes source file

Posted: 2011-09-15T17:26:25-07:00
by magick
We have a patch to fix the problem you reported. Look for it in ImageMagick 6.7.2-7 Beta by sometime tomorrow. Thanks.

Re: convert empty .htm .html ... removes source file

Posted: 2011-09-15T18:06:44-07:00
by rusname
Thanks for the fast response.
Is it possible to provide patch for current release 6.7.2.-6 by any chance?

Thanks

Re: convert empty .htm .html ... removes source file

Posted: 2011-09-15T18:13:35-07:00
by magick
In magick/delegates.c:
  • 790c790
    < if ((status != MagickFalse) && (attributes.st_size != 0))
    ---
    > if (status != MagickFalse)

Re: convert empty .htm .html ... removes source file

Posted: 2011-09-15T21:11:38-07:00
by rusname
Great! Thank you!