Board index » delphi » Watermarks on TImage

Watermarks on TImage

How can I put a watermark on an image? The watermark is text. I know
bsClear will give me a clear background, but I want the actual letters
to blend in with a photo without causing too much interference.

At the moment I am experimenting with a photo loaded in an image and
Xor-ing Pixels within a defined portion, but without success - I seem
to get colour loss or no change at all.

TIA.

 

Re:Watermarks on TImage


In article <3982992f.38115...@news.hutch.com.au>, zank...@hutch.com.au (Steven)
writes:

Quote
>How can I put a watermark on an image? The watermark is text. I know
>bsClear will give me a clear background, but I want the actual letters
>to blend in with a photo without causing too much interference.

>At the moment I am experimenting with a photo loaded in an image and
>Xor-ing Pixels within a defined portion, but without success - I seem
>to get colour loss or no change at all.

>TIA.

It might not be exactly what you want but give it a try. I tried it with some
of the 256 col splash images that come with Delphi and the results aren't that
bad, it depends what you're looking for.

procedure TForm1.Button1Click(Sender: TObject);
begin
with Image1.Canvas do
begin
  beginPath(Handle);
     Font.Size:= 50;
        Font.Name:= 'Verdana';
        Font.Style:= [fsItalic,fsBold];
        SetBkMode(Handle,TRANSPARENT);
     TextOut(25,40,'Hello');
  endPath(Handle);

 Pen.color:= clSilver;
 //experiment with the Pen.Mode to get the effect you want
    Pen.Mode:=pmMergeNotPen;
 SetPolyFillMode(Handle, WINDING);
    Brush.Color:= clSilver;
 StrokeAndFillPath(Handle);
end;
end;

Gordon
~~~~~~~~~~~~~~~~~~~~~~~~
Try one get one free Equation Illustrator V equation editor
http://www.mgcsoft.com/betas.htm  :))
MGCSoft
"Where graphics meets mathematics"
http://members.aol.com/delphistuf/delphstf.htm   (Delphi bits and bobs)

Other Threads