Change a color of a picture box picture 
Author Message
 Change a color of a picture box picture

Hi!

I'd like to change a color of a PictureBox pixture. How do I access
the palette of the picture?

Thanks, Christian



Fri, 23 Aug 2002 03:00:00 GMT  
 Change a color of a picture box picture

Quote:



> > I'd like to change a color of a PictureBox pixture. How do I access
> > the palette of the picture?

> You can use the get/setpixel API. There's an earlier thread on this.

You can loop through the pixels in the image and change them using getPixel/SetPixel
combination. That's shown in the thread Darcey referred to:  


The title (for Deja search) is: Get/SetPixel API - Need help on ways to speed up a loop

Alternatively, you might try changing the palette in use. This is the list of Windows Color functions:
(cf MSDN)

Color Functions

The following functions are used with color.

AnimatePalette  
CreateHalftonePalette  
CreatePalette  
GetColorAdjustment  
GetNearestColor  
GetNearestPaletteIndex  
GetPalet{*filter*}tries  
GetSystemPalet{*filter*}tries  
GetSystemPaletteUse  
HTUI_ColorAdjustment  
HTUI_DeviceColorAdjustment  
RealizePalette  
ResizePalette  
SelectPalette  
SetColorAdjustment  
SetPalet{*filter*}tries  
SetSystemPaletteUse  
UnrealizeObject  
UpdateColors  

--
MikeC

Please reply to the group.

  MikeC.vcf
< 1K Download


Wed, 28 Aug 2002 03:00:00 GMT  
 Change a color of a picture box picture
You can use the get/setpixel API. There's an earlier thread on this.


Quote:
> Hi!

> I'd like to change a color of a PictureBox pixture. How do I access
> the palette of the picture?

> Thanks, Christian



Thu, 29 Aug 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB4: Determine picture box' picture color

2. How to change Picture in a Picture box

3. changing picture of a Picture Box

4. Changing the Number of Colors in a Picture Box

5. HowTo Change Color Depth in Picture Box??

6. HowTo Change Color Depth in Picture Box??

7. HowTo Change Color Depth in Picture Box??

8. Filling the picture box eith the color of a common dialog selected color

9. insert picture box inside picture box

10. Invalid picture on bound picture box

11. Upload picture to picture box and *save*?????

12. displaying pictures in a picture box

 

 
Powered by phpBB® Forum Software