|
-
July 4th, 2001, 09:44 PM
#1
Read Pixels in Bytes
I have a picture on a picture box.
I need to read or get every byte of the picture.
One pixel consists of 3 bytes(24 bits). I need to get byte by byte.
The GetPixel function only gets the pixel value which consists of 3 bytes or less.
Please help me.
Dev.
-
July 5th, 2001, 08:00 AM
#2
Re: Read Pixels in Bytes
This is the simpler method: GetPixel and divide it into the separate R, G and B components
col = GetPixel(10,10)
red = col and &hff
green = (col and &hff00&)/&h100&
blue =(col and &hff0000)/&h10000
But it is relatively slower. A faster (and more complicated) method would be to use SAFEARRAY or use GetDIBits() API to get the bytes of the image.
-
July 8th, 2001, 09:03 PM
#3
Re: Read Pixels Using GetDIBits()
How do I use the GetDIBits() function to get bytes of the pixels on an image.
I need to get every 64 bits of the image.
Please help
Dev.
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
|