Re: mix 2 bitmaps

"Comboy" <[email protected]> Thu, 21 Aug 2003 08:01:27 -0000
Newsgroups gmane.comp.lang.delphi.programming
Message-ID <[email protected]>
hello Rolf,
as u know colors are from red blue and green, a grayscale color has=20
got the same value of these 3 colors. for example 200,200,200 is a=20
silver (grayscale) color but 200,200,199 is not. I think you should=20
use this method for your filter:
get each color value from the greyscale picture and the colored=20
picture, add them up then div 2 (Average).
think, the silver color is 666666 and the rgb color is 3F8F3D, you=20
see 3F is 63 and 8F is 143 and 3D is 61 in dec.
( 66 + 63 ) / 2 =3D 64 -> 40 in hex
( 66 + 143) / 2 =3D 104 -> 68 in hex
( 66 + 61 ) / 2 =3D 63 -> 3F in hex
so the mixed color is 40683F. well 666666 is a dark gray and 3F8F3D=20
is a green and the result is a dark green! there are 255 colors in=20
grayscale mode, one is white one is black and 223 colors are silver.

Joy,

Comboy.

> Hi
> What I want to do is transfer color from a color image to a=20
greyscale=20
> image. There is a paper called "Transferring Color to Greyscale=20
> Images" and I want to make a program that uses this paper.
> The user gives a color image and a greyscale image and the program=20
> transferes colors from the color image to the greyscale...
> It=B4s eazy to find the paper in google...
> Could you help me?
> thank you
> Rolf



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. h=
ttp://www.c1tracking.com/l.asp?cid=3D5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/i7folB/TM
---------------------------------------------------------------------~->

Delphi VCL Top Sites!
http://www.sandbrooksoftware.com/TS/TS2/Components.shtml
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
---------------------------------------------------------------=20

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/=20