VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 12345678[9]10 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 17:27:50 09/19/00 Tue
Author: Michel
Subject: Re: Inserting a watermark
In reply to: Todd Cary 's message, "Re: Inserting a watermark" on 19:13:35 09/18/00 Mon


Hi Todd,

Copying an image transparently over another one will be more complicated. There is currently no built in code to do this with Envision. Using Canvas.Draw will not work. To draw transparent text is quite easy, you can see an example of it in the EnDiGrph.Pas unit, in the TDibGraphic.Draw method, in the section delimited by the __Evaluation conditional.

Drawing an image over another one transparently can be done relatively easily by using the RGB property of the TDibGraphic class. You will need to assign each pixel individual, but skip the pixels which have a transparent color in your source image.

This is a simplified example (you will need to work out the coordinates):

for X := {left} to {right}
for Y := {top} to {bottom} do
begin
if Source.RGB[X,Y] is an opaque pixel then
Dest.Rgb[OffsetX+X,OffsetY+Y] := Source.Rgb[X,Y];
end;


Best regards,

Michel

> OK! That works like a champ! Now I have the
> transparency issue. Are gif images the only ones with
> transparency? Can a jpeg be given transparency? Can
> a gif image be combined with a jpeg?
>
> Todd

[ Next Thread | Previous Thread | Next Message | Previous Message ]


Replies:


[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.