-
pset
I used PSET to set an image into a picturebox. But the image disappears if i minimize the picturebox or cover the pixels with another application.
how do i use pset and have the pixels stay in the picturebox?
when using pset, i passed a 16-bit value in as the pixel value.
it comes out all in shades of red.
how do i display this 16-bit image in grayscale instead ?
please advise.....
-
To make the picture stay, set the AutoRedraw propety of the picturebox to true.
As for the colors, PSet() uses a 24 bit number to represent the color. You can use the RGB function to make a color - rgb(red, green, blue), all the values range from 0(dark) to 255(light). to make it gray just give all the values the same number.
Hope this helps
-
the rgb function only accepts up to 8 bit values.
ive got 16 bits which is more than 255 variables.
any other way to convert to greyscale?
thanks for the help!!
-
16 bits IS a color value. You have to do some tricky bit manipulation to get the actual colors out of that. Here is a tip for you, on how the RGB components are stored in 16 bits:
RRRRR GGGGGG BBBBB
Z.
-
Look around for some 16bit to 24bit code. Ah, lets see if I can find one for you.
-
the values are not stored in rgb. they are just 16bit greyscale values taken from a black and white picture....
not sure how to put it.....but the detail level is important
-
well I think windows is not even able to display 16 bit in one color unless you have a really special display driver and some real good graphics board.
-
just divide the 16-bit greyscale value by /256 and then pass it to RGB as all three values.
GreyLevel = Color / 256
Me.PSet (X,Y), RGB(GreyLevel, GreyLevel, GreyLevel)