convert jpg -> bitmap results in unrecognizable files

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
orionrush

convert jpg -> bitmap results in unrecognizable files

Post 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. . .
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert jpg -> bitmap results in unrecognizable files

Post by fmw42 »

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

Re: convert jpg -> bitmap results in unrecognizable files

Post by magick »

Add bmp3: to your filename to produce the most recognized BMP format. For example, bmp3:/Users/xxx/Desktop/simple.bmp.
orionrush

Re: convert jpg -> bitmap results in unrecognizable files

Post 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 -
Post Reply