
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.