Results 1 to 8 of 8

Thread: pset

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2001
    Location
    england
    Posts
    87

    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.....

  2. #2
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770
    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

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2001
    Location
    england
    Posts
    87
    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!!

  4. #4
    Zaei
    Guest
    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.

  5. #5
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    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)

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Nov 2001
    Location
    england
    Posts
    87
    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

  7. #7
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    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!

  8. #8
    Addicted Member Janus's Avatar
    Join Date
    Aug 2001
    Location
    California
    Posts
    221
    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
  •  



Click Here to Expand Forum to Full Width