Bmp files
Hey all,
The win programming book i''m learning from don''t explain the part i need which is how can i save something on the screen to a .bmp or .jpeg?
Like let''s say in paint there is the option "save as" which saves this file formats.
Where i can find a tutorial about that?
Thanks in advance
for bitmaps, you basically have to build a couple of headers first, and then tack on the matrix of pixels. Look up BITMAPFILEHEADER and BITMAPINFOHEADER for Win32 programming.
As for jpeg, jpeg is a compression scheme, and requires that you run the data through a (I would assume) complex formula to reduce the size of the data. After that, you also create headers and then tack on the compressed data.
It''s my understanding that to write a program that uses jpeg compression, you need a liscence, as it is a patented formula.
generally, finding tutorials is as easy as saying "Google, google, big and small, what''s the finest tutorial of all". Here''s a hint, you want to know about file formats, why don''t you try search for "BMP file format specification"
Do you use your powers for good or for awesome?
My newly updated site | The Cutter Project | Association of Computing Machinery
As for jpeg, jpeg is a compression scheme, and requires that you run the data through a (I would assume) complex formula to reduce the size of the data. After that, you also create headers and then tack on the compressed data.
It''s my understanding that to write a program that uses jpeg compression, you need a liscence, as it is a patented formula.
generally, finding tutorials is as easy as saying "Google, google, big and small, what''s the finest tutorial of all". Here''s a hint, you want to know about file formats, why don''t you try search for "BMP file format specification"
Do you use your powers for good or for awesome?
My newly updated site | The Cutter Project | Association of Computing Machinery
There are also classes built into GDI+ that will save in BMP,JPG,GIF, and PNG. check out the MSDN page on GDI+. I recomend learning how to do it on your own first like capn_midnight suggested for BMPs at least but once you can do BMPs it is a matter of decoding/encoding using the correct image format library.
There''s a good bitmap loading article here. Just reverse the logic from input to output to produce bmp:s.
quote:Original post by capn_midnightThat''s GIF (Unisys).
It''s my understanding that to write a program that uses jpeg compression, you need a liscence, as it is a patented formula.
Also, check out PNG.. It''s free and does support transparency! =)
----------------------------------------------
Petter Nordlander
"There are only 10 kinds of people in the world. The who understand binary and those who don''t"
----------------------------------------------
Petter Nordlander
"There are only 10 kinds of people in the world. The who understand binary and those who don''t"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement