Forum: Multimedia
Delphi
by WojTec,
12. Jun 2010
Hello again. I have yet another question in this topic. How to add option "preserve luminosity" to our tint procedure? Currently working very well, but I want to apply tint as creative filter - now my tint working as in PS or PSP but with unchecked "preserve luminosity". Please help :)
Forum: Multimedia
Delphi
by WojTec,
25. Jan 2010
property Bits: PColor32Array read FBits;
TColor32Array = array of TColor32;
TColor32Entry = packed record
case Integer of
0: (B, G, R, A: Byte);
1: (ARGB: TColor32);
2: (Planes: array of Byte);
3: (Components: array of Byte);
Forum: Multimedia
Delphi
by WojTec,
23. Jan 2010
This is procedure:
var
Bits: PColor32Entry;
Color: TColor32Entry;
I, J: Integer;
Percent: Single;
begin
Color.ARGB := Color32(AColor);
Percent := APercent / 100;
Forum: Multimedia
Delphi
by WojTec,
23. Jan 2010
Ok, let's start from begining. What I need: I want to add color filter to image with intensity parameter. Output should be like on image from post #3. My current code:
Row.R := (Color.R * Row.R) div 255;
Row.G := (Color.G * Row.G) div 255;
Row.B := (Color.B * Row.B) div 255;
Example output from my code:
(see 1.png, left part - 0%)
Forum: Multimedia
Delphi
by WojTec,
22. Jan 2010
@Medium, after exchanges this values, 0% is solid color output.
When intensity is 100% image should be 100% in Color tone, when 50% - in 50% Color tone and 50% original colors (look image).
Forum: Multimedia
Delphi
by WojTec,
22. Jan 2010
@Medium, when Color is for example clYellow and 3rd parameter is 1, any pixel of output is = Color. This is wrong - should be as is on example image above.
Forum: Multimedia
Delphi
by WojTec,
22. Jan 2010
@jfheins, I'm doing something wrong :(:
var
Row: PBGRAQuad;
Color: TBGRAQuad;
I, J: Integer;
B: Byte;
C: TColor;
begin
Color := ColorToTriple24(AColor);
Forum: Multimedia
Delphi
by WojTec,
22. Jan 2010
Something similar (Lerp() coloring too much - up to solid color). I mean like this:
http://i46.tinypic.com/2077v9w.png
:)
Forum: Multimedia
Delphi
by WojTec,
22. Jan 2010
I have simple procedure to add color filter to bitmap:
Row.R := (Color.R * Row.R) div 255;
// Repeat for G and B
How to add Intensity parameter (0=original color, 100=as above)?
Or maybe is better method to colorize filter?