Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get "convert: improper image header" error when convert gif to png using ImageMagick

I am using ImageMagick to convert a gif to multiple png data. But I get this error:

convert: improper image header /misc/lmbraid11/jingl/webscraping/dataset_2018_05_18/image2018_5_4_10_34.gif' @ error/gif.c/ReadGIFImage/1037. convert: no images defined /misc/lmbraid11/jingl/webscraping/dataset_2018_05_18/image2018_5_4_10_34.png' @ error/convert.c/ConvertImageCommand/3210.

Here is the command:

convert -coalesce /misc/lmbraid11/jingl/webscraping/dataset_2018_05_18/image2018_5_4_10_34.gif /misc/lmbraid11/jingl/webscraping/dataset_2018_05_18/image2018_5_4_10_34.png

The gif file was downloaded from: [http://www.niederschlagsradar.de/image.ashx?type=regioloop&regio=fre][1]

ImageMagick version: Version: ImageMagick 6.8.9-9 Q16 x86_64

Any help will be appreciated.

like image 241
Jing Avatar asked Oct 20 '25 07:10

Jing


1 Answers

Problem get solved. It turns out that I did not download the gif file correctly, so the gif file was corrupted.

like image 200
Jing Avatar answered Oct 22 '25 22:10

Jing



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!