I have an irregularly shaped object and I want to be able to change the background color. The image is actually divided into sections and I would like to change the color of each section. Is there any way to do this?
Thanks
I have an irregularly shaped object and I want to be able to change the background color. The image is actually divided into sections and I would like to change the color of each section. Is there any way to do this?
Thanks
I think I may have posted this in the wrong forum so I have reposted here.
I have an irregularly shaped object and I want to be able to change the background color. The image is actually divided into sections and I would like to change the color of each section. Is there any way to do this?
Thanks
You probably can with an program like photoshop...what are you using to edit it?
"Think not but that I know these things; or think
I know them not: not therefore am I short
Of knowing what I ought."
-John Milton, Paradise Regained (1671)
"Work hard and it might happen."
-XSquared
Basically, select the object, inverse the selection to select the background, and any changes you make on the background will not affect the object. In adobe photoshop, use magnetic lasso tool. It's a basic question, you should be able to find the details on the web.
You can use ExtFloodFill to colour the sections.
Alternatively, if each section is a gdi region then you can use region painting/filling functions (FillRgn, PaintRgn) to accomplish the same thing.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
Code:void AlterBackground(RGB *image,RGB backcolor,int imgszx,int imgszy) { for (int i=0;i<imgszx;i++) { for (int j=0;j<imgszy;j++) { unsigned int texoffset=(j*imgszx+i); RGB texel=image[texoffset]; if (texel.red!=backcolor.red && texel.grn!=backcolor.grn && texel.blu!=backcolor.blu) image[texoffset]=backcolor; } } }
If you want to do this in code.