Jump to content
Sign in to follow this  
Andreik

GDI+ problem

Recommended Posts

Andreik

I have a picture (.BMP) that have 3x3 pixel (a very small picture). ;)

First line is like this: 0xFF0000;0x7F00FF;0x0000FF

Second line is 0x400000;0xFFFFFF;0x7F0000

Last line is 0x0100FF;0xFF0000;0x0000FF

I want to read red value from this picture and to create another picture with values of red:

0xFF0000;0x7F0000;0x000000

0x400000;0xFF0000;0x7F0000

0x010000;0xFF0000;0x000000


When the words fail... music speaks

Share this post


Link to post
Share on other sites
Richard Robertson

What method are you using to read and write? Where are you having trouble?

You just need to read the integer value, and then BitAnd it with 0xFF0000 then put it in the new picture.

Share this post


Link to post
Share on other sites
Andreik

I forget this function _ColorGetRed(). This is what I want. Thank Richard Robertson!


When the words fail... music speaks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.