-
July 16th, 2009, 12:27 PM
#1
Get pixel form either BITMAP or HBITMAP
Hello!
I have HBITMAP with some image in it. I need to work with the every single pixel in it. I.e. get it's RGB and possibly change it.
I know, I have GetBitmapBits(), also, it seems, I have an option to get BITMAP from HBITMAP and work with bmBits field.
What are other options to get to RGB value of each pixel? Options described above seems too ugly.
-
July 16th, 2009, 12:38 PM
#2
Re: Get pixel form either BITMAP or HBITMAP
-
July 18th, 2009, 10:23 PM
#3
Re: Get pixel form either BITMAP or HBITMAP
You could try GetDiBits. It will give you an RGBQUAD structure array.
-
July 20th, 2009, 09:15 AM
#4
Re: Get pixel form either BITMAP or HBITMAP
Guy, the GetBitmapBits() its not to win32 its for Win16 bits in Win32 you can use the GetDIBits() function so you can use the GetObject to take the Bitmap to a HDC and then you can use it to GetDIBits() function and so go on. bye and good luck i hope i was useful!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|