Link to home
Start Free TrialLog in
Avatar of knun
knun

asked on

Color Depth and Sent Bitmap to array (Picture Box)

Dear Expert
 I Need to Decrease Color depth of Picture in pictureBox (240*128) to black & white color and sent to array in memory.
Pls Help me.
this very urgent.....
Avatar of knun
knun

ASKER

For more information
I have Picture in Picturebox already i just need to change to black and white color depth (1 bit) , and after change to 1 bit depth sent this picture (240*128 Pixel) to array .
for read data inside and sent to LCD by my module.
ASKER CERTIFIED SOLUTION
Avatar of rettiseert
rettiseert

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of knun

ASKER

Very Thank rettiseert.
i will accept your answer but another question ^_^ do you know how to resize image to 240*128 ^_^
   Dim FileName As String
   
    FileName = "C:\1.jpg"  '<---- This is the file you want to show in a 240*128 picture box
   
    Picture1.AutoRedraw = True
   
    Picture1.PaintPicture LoadPicture(FileName), 0, 0, Me.ScaleX(240, vbPixels, Me.ScaleMode), Me.ScaleX(128, vbPixels, Me.ScaleMode)
Avatar of knun

ASKER


thank rettiseert ,  but i don't want to operate image to file (Harddisk) just play with it in memory
ok, in that case you can load your picture at design time in a hidden picturebox and then, in your visible picturebox use something like:

  Picture1.AutoRedraw = True
   
    Picture1.PaintPicture HiddenPictureBox.Picture, 0, 0, Me.ScaleX(240, vbPixels, Me.ScaleMode), Me.ScaleX(128, vbPixels, Me.ScaleMode)
Avatar of knun

ASKER

Very thank rettiseert.
you help me so much.