0

I am using a CodeJock ImageManager component to hold a variety of images. I want to put one of these images into a FlexGrid Cell.

The Images I have are Png format and have transparent backgrounds so when I load the image into the grid like so:

Grid.Cell(flexcpPicture, 123, 4) = _
ImageManagerControl.Icons.GetImage(ImageNum, 16).CreatePicture(xtpImageNormal)

the background which in the original image was transparent is now black: enter image description here (the same happens if I load the image into a PictureBox using the above method)

According to the documentation CreatePicture returns an StdPicture object, is there some way I can convert this image (using BitBlt perhaps) so that the black is white? I'm not sure if this even possible?

I only need to do this with about three images so if I have to load them into an ImageList or something else first that would be ok.

Matt Wilko
  • 26,994
  • 10
  • 93
  • 143

1 Answers1

0

I'm not sure if this helps at all, but I've been playing around with the PictureBox. I put two picture boxes on a form, put a bmp file (this only works with bmp files, so it might not be helpful to you), and did this:

Picture2.PaintPicture Picture1.Picture, 0, 0, opcode:=vbNotSrcCopy

Which successfully inverted the bitmap. Here are the RasterOp constants: http://msdn.microsoft.com/en-us/library/aa243035(v=vs.60).aspx

BobRodes
  • 5,990
  • 2
  • 24
  • 26