Hello,
We are facing a very wired experience in our software. We have create a demo version of our software in which we are watermarking each output (image).
Here is the code we are using for watermarking.
procedure WaterMarkImage(ieTemp: TImageEnView);
var
i: integer;
j: integer;
iLayer: integer;
iSpacing: integer;
iText: string;
iRows: integer;
begin
//Exit;
Screen.Cursor := crHourGlass;
ieTemp.LockUpdate;
try
ieTemp.DeSelect;
iLayer := ieTemp.LayersAdd;
ieTemp.Proc.Fill(CreateRGB(255, 255, 255));
ieTemp.IEBitmap.Canvas.Font.Name := 'Arial';
ieTemp.IEBitmap.Canvas.Font.Height := 45;
ieTemp.IEBitmap.Canvas.Font.Color := clGray;
iText:='';
for i := 0 to 60 do
iText := iText + ' You are using Demo Version...' ;
iRows := 100;
for j := 0 to iRows do
begin
iSpacing := 150;
iSpacing := iSpacing * j;
IETextOut(ieTemp.IEBitmap.Canvas, -60, iSpacing, 45, iText); // draw text on second layer
end;
// remove the white, making it as transparent
ieTemp.Proc.SetTransparentColors(CreateRGB(255, 255, 255), CreateRGB(255, 255, 255), 0);
ieTemp.LayersMergeAll;
ieTemp.Update;
finally
ieTemp.UnLockUpdate;
Screen.Cursor := crDefault;
end;
end;
We are calling this procedure to apply watermark to image when the user save the image as well as when the user exports the image.
But this code does not run on every PC. On some PCs the code just gets skipped and there are no watermarks in the image saved or exported.
Any ideas as to what must be the problem here and how to solve it?
Another thing is that this routine is taking a hell of a long time. Can we speed this up?
TIA
Yogi Yang