|
-
Feb 5th, 2002, 09:45 PM
#1
Thread Starter
Lively Member
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.....
-
Feb 5th, 2002, 10:06 PM
#2
Fanatic Member
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
-
Feb 5th, 2002, 10:12 PM
#3
Thread Starter
Lively Member
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!!
-
Feb 5th, 2002, 10:46 PM
#4
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.
-
Feb 5th, 2002, 11:05 PM
#5
Good Ol' Platypus
Look around for some 16bit to 24bit code. Ah, lets see if I can find one for you.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Feb 5th, 2002, 11:05 PM
#6
Thread Starter
Lively Member
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
-
Feb 6th, 2002, 04:45 PM
#7
Frenzied Member
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.
Sanity is a full time job
Puh das war harter Stoff!
-
Feb 9th, 2002, 06:49 PM
#8
Addicted Member
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)
"1 4m 4 1337 #4xz0r!'
Janus
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
|