davidrobin
Programmer
I have an application where I load an image into a picturebox.
What I want to do is simplify the colours. e.g. I want only the following colours in the image.
white
light blue
dark blue
yellow
pink
red
dark red
black
light green
dark green
light grey
dark grey
orange
there are a few others but these are a most of them.
So for each pixel in the image I want to replace it with the closest match from above.
I believe there are two possible ways of doing this;
for each pixel compare its value with the list above and find the closest match then replace it with that.
replace the palette of the image by assigning it the palette of another image , I believe it can be don like so
bitmapobject.palette = anotherbitmap.palette.
It was suggested that the system.drawing.imaging.colorpalette (or something like that) could be used but despite my looking for ages I have not found any examples.
Can anyone suggest which way is best, or another way if there is a better one.
Also any code examples would be appreciated.
Many thanks
David
Visual Basic 6 Ent
What I want to do is simplify the colours. e.g. I want only the following colours in the image.
white
light blue
dark blue
yellow
pink
red
dark red
black
light green
dark green
light grey
dark grey
orange
there are a few others but these are a most of them.
So for each pixel in the image I want to replace it with the closest match from above.
I believe there are two possible ways of doing this;
for each pixel compare its value with the list above and find the closest match then replace it with that.
replace the palette of the image by assigning it the palette of another image , I believe it can be don like so
bitmapobject.palette = anotherbitmap.palette.
It was suggested that the system.drawing.imaging.colorpalette (or something like that) could be used but despite my looking for ages I have not found any examples.
Can anyone suggest which way is best, or another way if there is a better one.
Also any code examples would be appreciated.
Many thanks
David
Visual Basic 6 Ent