Search found 7 matches

by fraz
2018-08-10T04:56:45-07:00
Forum: Bugs
Topic: convert always has exit code 0 (success) even if failed
Replies: 5
Views: 8299

Re: convert always has exit code 0 (success) even if failed

And for anyone looking for the final script. Here it is: #!/bin/bash newline=' ' OIFS=$IFS IFS=$newline files=($(find . -iname "*.$1")) IFS=$OIFS for i in "${files[@]}" do echo -n "Testing: $i.." convert -regard-warnings -resize 100 "$i" /dev/null error=$? if [ $error -ne 0 ] then echo "this didn't ...
by fraz
2018-08-10T04:35:49-07:00
Forum: Bugs
Topic: convert always has exit code 0 (success) even if failed
Replies: 5
Views: 8299

Re: convert always has exit code 0 (success) even if failed

Ah, thanks.
That makes it work as expected.
convert -regard-warnings -resize 100 qqq.jpg out.jpg
Echo $? gives me a 1.

I would have thought this would be a more sensible default and -disregard-warnings should be the option.
Feel free to move this out of the bug section though.

Thanks again!
by fraz
2018-08-10T04:26:51-07:00
Forum: Bugs
Topic: convert always has exit code 0 (success) even if failed
Replies: 5
Views: 8299

Re: convert always has exit code 0 (success) even if failed

Here's the example images: https://www.dropbox.com/sh/bg3ht5k62ml0ljt/AADg6w0emis9HRF3_7qN8qqTa?dl=0 The corruption seems to be random bytes/blocks corrupted by a bad USB flash drive. I've also just tested it with a truncated image made using dd count=xxx and it also fails: convert-im6.q16 ...
by fraz
2018-08-10T04:07:55-07:00
Forum: Bugs
Topic: convert always has exit code 0 (success) even if failed
Replies: 5
Views: 8299

convert always has exit code 0 (success) even if failed

I'm writing a script to recursively test JPGs for corruption using imagemagick to open and resize the image. And on testing the error codes returned on a known bad jpg I always get a "0" success. convert -resize 100 BNE4_0288.jpg /tmp/out.jpg convert-im6.q16: Corrupt JPEG data: found marker 0xea ...
by fraz
2018-04-01T07:13:11-07:00
Forum: Users
Topic: GIF disposal previous glitches on looping?
Replies: 3
Views: 3500

Re: GIF disposal previous glitches on looping?

Ah HA! So I don't need to worry about the disposal method at all. I just added "-layers optimize" as the last thing and my file has gone from 1.2MB to 285K. And it loops without glitching once I ignore my background approach. It does take my poor raspberry pi zero nearly 3 minutes to make it, but oh ...
by fraz
2018-04-01T06:46:57-07:00
Forum: Users
Topic: GIF disposal previous glitches on looping?
Replies: 3
Views: 3500

Re: GIF disposal previous glitches on looping?

I think the solution you are describing is actually what the 2nd GIF is, and how I started getting enormous GIF sizes. Every frame is the complete image including the topography and everything, and doesn't use frame disposal previous. For my attempt at optimising it: the background image is: invert ...
by fraz
2018-04-01T05:59:23-07:00
Forum: Users
Topic: GIF disposal previous glitches on looping?
Replies: 3
Views: 3500

GIF disposal previous glitches on looping?

I'm try to optimise a radar looping GIF by using a static background and transparent animated layers. But the loop flickers on restarting since the first frame is the background, and there's no radar image. Here's the (suboptimal) optimised version. Only 192KB. But it shows a blank background frame ...