Page 1 of 1

Images and Logo's - urgent help required

PostPosted: November 13th, 2003, 9:48 am
by DJ ChunkeeZee
Hi All,
I require a routing to overlay/alphabland a Transparent GIF onto a JPEG and save as JPEG, the Gif is a Company Logo (transparent) and the JPEG the photo, I need to produce a batch routine to place this logo on all my images.

I am new to graphics programming, any help would be appreciated.
Thanks in advance.

PostPosted: November 18th, 2003, 11:33 am
by Kambiz
Code: Select all
procedure Watermark(Image: TJPEGImage; X, Y: Integer; Stamp: TGraphic);
var
  Bitmap: TBitmap;
begin
  Stamp.Transparent := True;
  Bitmap := TBitmap.Create;
  try
    Bitmap.Assign(Image);
    Bitmap.Canvas.Draw(X, Y, Stamp);
    Image.Assign(Bitmap);
    Image.JPEGNeeded;
  finally
    Bitmap.Free;
  end;
end;