Saving BMP files..

General FreeBASIC programming questions.
Post Reply
ColdElectric
Posts: 2
Joined: Jul 21, 2005 19:53
Contact:

Saving BMP files..

Post by ColdElectric »

Ok.. I am making some kind of an image minipulation editor and, I got my bitmat editing data set as Picture(1024,1024) as RGBC which is

Type RGBC
R As Integer
G as Integer
B as Integer
END TYPE

now when I save it as bmp, what is the actual method to do it for larger files then your display screen?

i understand that displaying the entire picture and then getting the X,Y,X1,Y1 coordinates saves it but it's larger than my display screen.

how can this be done?
Shadowwolf
Posts: 341
Joined: May 27, 2005 7:01
Location: Canada
Contact:

Post by Shadowwolf »

well as far as i rember Bsave should be able to save in bmp format.

so if you want to save an image that larger then your display that would mean the image would be in a buffer anyways. so just do something like

Bsave "test.bmp",@buffer,0

i belive the buffer size is automatical calulated for you
jofers
Posts: 1525
Joined: May 27, 2005 17:18

Post by jofers »

nonono. GfxLib uses a 32-bit ARGB pixel format. Unless you are saving a GfxLib sprite BSAVE's BMP headers is useless.

You'll have to implement it yourself, either by blitting the sprite to a GfxLib sprite, or writing the file yourself. BMPs are on eof the simplest file formats.... the specifications on http://wotsit.org aren't terribly difficult to follow.
Post Reply