GENIUS Snibgo, you GENIUS!!! Ufff it would be great to have a list of ImageMagick "state vars". Those, like the compose mode, fill, background, etc. can make commands behave different when they're not at their default state, and in some cases it's not intuitive. When combining many commands dynamically using a script you tend to have "bundles" of IM transformations packed as one (like drop_shadow in my case here, many other in our app) and sometimes some "bundles" leave IM in a state that breaks the next.
This last version of the command works perfectly for jpeg and png. Thanks a lot Snibgo!!
