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

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
rusname
Posts: 3
Joined: 2011-09-15T16:24:53-07:00
Authentication code: 8675308

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

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
rusname
Posts: 3
Joined: 2011-09-15T16:24:53-07:00
Authentication code: 8675308

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

Post by rusname »

Thanks for the fast response.
Is it possible to provide patch for current release 6.7.2.-6 by any chance?

Thanks
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

In magick/delegates.c:
  • 790c790
    < if ((status != MagickFalse) && (attributes.st_size != 0))
    ---
    > if (status != MagickFalse)
rusname
Posts: 3
Joined: 2011-09-15T16:24:53-07:00
Authentication code: 8675308

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

Post by rusname »

Great! Thank you!
Post Reply