Simple 8bpp Image modifying [modified]
-
I have been digging a while and can not find much. I want to find something that shows how to open and modify a 8bpp image in memory and then save it back out (somewhere else). Most 'simple' things I find have 24bpp and it seems the header information is much different... Atleast after my save ImageJ fails opening the image so I assume it is different. Can someone post a link or some code that can help me. Thank you in advance. Found something very useful! 4 pages deep on my google search (oh google.. you use to be so good at knowing what I wanted. What happend?) Simple Image Class Library[^]
Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.
modified on Wednesday, September 8, 2010 11:28 AM
-
I have been digging a while and can not find much. I want to find something that shows how to open and modify a 8bpp image in memory and then save it back out (somewhere else). Most 'simple' things I find have 24bpp and it seems the header information is much different... Atleast after my save ImageJ fails opening the image so I assume it is different. Can someone post a link or some code that can help me. Thank you in advance. Found something very useful! 4 pages deep on my google search (oh google.. you use to be so good at knowing what I wanted. What happend?) Simple Image Class Library[^]
Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.
modified on Wednesday, September 8, 2010 11:28 AM
Could you post your code? Maybe we can help you to fix it. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Could you post your code? Maybe we can help you to fix it. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]I needed a starting point. That was my point. It has been a while since I had even used C++ so I was having major set up issues. Anyways I found something... I will put it in my original post. Thanks anyways.
Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.
-
I have been digging a while and can not find much. I want to find something that shows how to open and modify a 8bpp image in memory and then save it back out (somewhere else). Most 'simple' things I find have 24bpp and it seems the header information is much different... Atleast after my save ImageJ fails opening the image so I assume it is different. Can someone post a link or some code that can help me. Thank you in advance. Found something very useful! 4 pages deep on my google search (oh google.. you use to be so good at knowing what I wanted. What happend?) Simple Image Class Library[^]
Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.
modified on Wednesday, September 8, 2010 11:28 AM
I've never had to work with 8 bit per pixel images, but they are fundamentally different from 16 bpp or 24 bpp images. And 24 bpp images are easier to work with in some ways! In a 24 bpp image (as I'm sure you know), you have a byte each for intensity of red, green, and blue components. In an 8bpp image, each pixel's byte does not contain a value which can be directly interpretted as a colour value. Instead, the pixel contains an index to the pallette, where the pallette is effectively a 256-element array of 24 bpp colour values (I seem to remember that there is something peculiar in the palette, so maybe it is 240 element not 256 element, where 16 elements are "system colours" and have fixed values, or something like that.) Have a look at the MSDN SAVEBMP.C example. It's painful but it will work! (But I'm really glad I only ever had to save 16bpp and 24bpp images based on SDK examples like this.)