gordon77
Posts: 4179
Joined: Sun Aug 05, 2012 3:12 pm

raspistill BMP format

Wed Apr 23, 2014 10:42 am

I saved some pics in bmp format with raspistill but I can't get any other PC, with windows, to read them, anyone know why ?

Gordon77

User avatar
DougieLawson
Posts: 36182
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: raspistill BMP format

Wed Apr 23, 2014 10:49 am

Have you checked the magic numbers? Are you sure they are BMPs?

The file command can do that stuff for you. Unix doesn't rely on filenames to identify things unlike some inferior operating systems.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

itsmedoofer
Posts: 359
Joined: Wed Sep 25, 2013 8:43 am

Re: raspistill BMP format

Wed Apr 23, 2014 11:33 am

Open the file in notepad on the PeeCee and you should be able to tell what it is, right at the beginning if the file is where you want to look...

ÿØÿà JFIF ` ` ÿáExif MM <- Would be a JPG

BMˆ– 6 <- Would be an example of a BMP

Crude method but should tell you.....

hk1963
Posts: 25
Joined: Fri Dec 06, 2013 6:06 pm

Re: raspistill BMP format

Wed Apr 23, 2014 12:21 pm

How do you produce the BMP file?

Lets assume the image filename is picture.bmp

What do you get in a terminal when you run the command

file picture.bmp

What is the output of

od -c picture.bmp | head

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: raspistill BMP format

Wed Apr 23, 2014 6:30 pm

Or just use

Code: Select all

file filename.bmp
The file command has a database of magic numbers that define file types.

gordon77
Posts: 4179
Joined: Sun Aug 05, 2012 3:12 pm

Re: raspistill BMP format

Thu Apr 24, 2014 9:44 am

hk1963 wrote:How do you produce the BMP file?

Lets assume the image filename is picture.bmp

What do you get in a terminal when you run the command

file picture.bmp

What is the output of

od -c picture.bmp | head
I just used the raspistill option to save bmp.

Gordon77

mikerr
Posts: 2779
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: raspistill BMP format

Thu Apr 24, 2014 11:37 am

Note just setting the extension won't work:

Code: Select all

raspistill -o image.bmp
still produces a jpeg file in image.bmp

you have to set the encoding (-e) too:

Code: Select all

raspistill -e bmp -o image.bmp
Android app - Raspi Card Imager - download and image SD cards - No PC required !

gordon77
Posts: 4179
Joined: Sun Aug 05, 2012 3:12 pm

Re: raspistill BMP format

Fri Apr 25, 2014 6:27 am

Thanks

Gordon77

Return to “Camera board”