understanding what is in image code
If i want open a simple gif or bmp image and understand what is the code that is used to show the color pixel (by windows palettes or what other...).
Tnx
Well, gif''s are compressed so you would have to look up the algorithm to decompress it first. But typical bmps are not compresssed. They have some header information first in the file to describe image type, color depth, width, height, etc... For a 24-bit image, the actual pixel data is stored after the header as combinations of red, green, and blue values consecutively. Each color component is one byte in size. (So three bytes = 1 pixel)
Read this thread, and then you''ll know: Bitmap File Format .
Keep coming back, because it's worth it, if you work it, so work it, you're worth it!
quote: Original post by LodeRunner
Well, gif''s are compressed so you would have to look up the algorithm to decompress it first. But typical bmps are not compresssed. They have some header information first in the file to describe image type, color depth, width, height, etc... For a 24-bit image, the actual pixel data is stored after the header as combinations of red, green, and blue values consecutively. Each color component is one byte in size. (So three bytes = 1 pixel)
how can i make a algorithm of decompression of gif image?
You dont make the algorithm to decompress it because that''s already been done. You just need to implement it. Google for "gif file format" and you should find plenty of info. I think it uses a form of hoffman encoding, but dont quote me on that.
You are correct, but remember, the compression used (LZW I beleive) has a valid patent until june ''04 (I think is the expiration date), which is why PNG images where created, to be a patent free replacement for .gif''s. So, keep in mind that it is illegal to sell (maybe even give away?) anything with a gif decompressor without the concent of the patent holder . Bitmaps are simple, even the RLE compressed ones, which are basically .pcx files. .PNG files are similar to .GIF''s, except they use the huffman encoding slightly different as to not infringe on the 1984 patent (patents used to only be good for 16 years, but in the 90''s, they changed it to twenty years, and added 4 years to the existing patents, which is why it expires in ''04, instead of ''00).
i read a little of that article, but i don''t undestand how can open the file and change the value or make a file strating to 0!
How i can read the code inside a bmp image?
How i can read the code inside a bmp image?
I gave you a link Link. Try following through with our suggestions before you give up.
Keep coming back, because it's worth it, if you work it, so work it, you're worth it!
quote: Original post by 63616C68h
I gave you a link Link. Try following through with our suggestions before you give up.
yes i''m reading it, but i can''t see where is the part where is handled the possibility of open to read the code inside a bmp image... i think to have understood i must use a algorithm to decomprime the code, but what is? How can i use it?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement