Page 1 of 1

convert jpg -> bitmap results in unrecognizable files

Posted: 2009-04-29T19:59:39-07:00
by orionrush
Hello all,

I have been searching high and low but have yet to find this covered.

I'm doing a convert from jpg to bmp, however some of my other apps wont recognize the result as a valid file.

Code: Select all

#/bin/bash/

dtime=$(date -u) 
##assigns a formatted date to the variable dtime

convert  -depth 8 -unsharp 3.0x2.0+3.0+0.10 /Users/xxx/Desktop/simple.jpg -font courier -pointsize 15 -fill white -annotate +100+100 "$dtime"  /Users/xxx/Desktop/simple.bmp
## with heavy sharpening ;)

I'm trying to pass the results to another CLI app called ARSS - which converts images to sound (Way cool). But ARSS complains that the images I'm passing to it are not 24bit, or depending on where I put the -depth 8 in the string –– Not as bitmaps at all!

I've also tried -depth 24, but without positive results. Some other apps fail to recognize it either - like Macromedia Fireworks for example. I'm working on Mac OS X10.4.11 and when I open the file (successfully) with Preview and simply save - the problems opening go away full stop. Anybody have any idea what is going on here?

What I've tried....
On reading various posts I've tried a second pass of conversion: bitmap to bitmap with no improvement.
Ive moved the -depth 8 (or 16, 24 - I've tried them all) from how I have it listed above to just before the output file name - no dice.

So far ImagMagick has worked like a charm - now if only I could work with the results!

thanks in advance for you thoughts. . .

Re: convert jpg -> bitmap results in unrecognizable files

Posted: 2009-04-30T09:53:23-07:00
by fmw42

Re: convert jpg -> bitmap results in unrecognizable files

Posted: 2009-04-30T10:11:25-07:00
by magick
Add bmp3: to your filename to produce the most recognized BMP format. For example, bmp3:/Users/xxx/Desktop/simple.bmp.

Re: convert jpg -> bitmap results in unrecognizable files

Posted: 2009-04-30T10:47:59-07:00
by orionrush
Thanks a bunch.
This is a much better and direct approach. I ran into some other info that works as well. Adding +matte forces the output file into 24bit. While I haven't gotten into what matte does, the end result is a working bmp.

Thanks again -