Re: Replacing color
- From: Atma <fcamblor gmail com>
- To: gtkmm-list gnome org
- Subject: Re: Replacing color
- Date: Wed, 4 Oct 2006 04:52:30 -0700 (PDT)
I'll precise a bit my ask ...
Let's say I have this "template" image :
http://derf.hd.free.fr/~derf/gtkmm/templateImagePb/Cross%20Example.png
To resume : a transparent image with a semi transparent black cross in the
middle (cross with black color, but approximatively 50% blending)
I have this background on which I want to draw some things :
http://derf.hd.free.fr/~derf/gtkmm/templateImagePb/BG%20Example.png
To resume : a typical white background with red border (but no matter...)
What I'd want is, first, this :
http://derf.hd.free.fr/~derf/gtkmm/templateImagePb/Intermediate%20Example.png
That is to say my "template image" on which I "replaced" the "template
color" (ie the "black" color) with my "current" color (green) ... The
blending haven't been applied
(I don't know if I have to pass by this state in order to solve my problem
but... in case ...)
THe final result I expect :
http://derf.hd.free.fr/~derf/gtkmm/templateImagePb/Final%20Result.png
(It doesn't look different from the above... but if you open it under your
favorite painting editor, You'll see the blending differences : the green is
"lighter" on this one than above)
To resume : I want to draw an image and replace specific pixels by others
(but only RGB !... not RGBA !)
Is this possible to your mind ?... Or should I make it "by hand" ?
Atma wrote:
>
> Hi there !...
> I'd like to replace a "pattern color" by another one but I don't really
> know how to do this :)
>
> My problem :
> I have objects with color associated to them.
> I load a template PNG file (the same for every objects), with black pixels
> where I want to specify "colored" region corresponding to my object. When
> I "display" my object, I'd want to have the template image displayed, with
> the "black pixels" replaces by the color corresponding to my object :)
> Is this possible without dealing with a "pixel by pixel" algorithm ?
>
> Thanks in advance :)
>
--
View this message in context: http://www.nabble.com/Replacing-color-tf2378891.html#a6638176
Sent from the Gtkmm mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]