Black background with gif and png
Posted: Sat Jun 13, 2015 1:35 pm
If I print to pdf (using TWPPDFPrinter), the background of png and gif images is black. Also if I export one page out of TSRichViewEdit to a wmf file it's the same.
Btw: The regular view in TSRichViewEdit is perfect, printing to printer too. Only not to pfd (and wmf).
I tried out a lot of combinations of transparencymodes an -colors and some more but alwas the same result.
// = some of the trials
Do you have a hint?
Btw: The regular view in TSRichViewEdit is perfect, printing to printer too. Only not to pfd (and wmf).
I tried out a lot of combinations of transparencymodes an -colors and some more but alwas the same result.
Code: Select all
var
Pic: TPicture;
PNam: TRVAnsiString;
PTag: TRVTag;
Al: TRVVAlign;
He, Wi, Wi2, Pi, Pr, PaV, PaH, Co, CoB: Integer;
Alt: string;
begin
(. . . got from another TRichViewEdit . . .)
Pic := TPicture.Create;
try
Pic.LoadFromFile(PicNam);
Gr := RV_CreateGraphics(TGraphicClass(pic.Graphic.ClassType));
Gr.Assign(Pic.Graphic);
R.AddPictureEx(PicNam, Gr, TargPa[PNr], Al);
R.SetItemExtraStrProperty(R.ItemCount-1, rvespImageFileName, PicNam);
R.SetItemExtraIntProperty(R.ItemCount-1, rvepImageWidth, Wi);
R.SetItemExtraIntProperty(R.ItemCount-1, rvepImageHeight, He);
R.SetItemExtraIntProperty(R.ItemCount-1, rvepSpacing, Pi);
R.SetItemExtraIntProperty(R.ItemCount-1, rvepBorderWidth, Pr);
R.SetItemExtraIntProperty(R.ItemCount-1, rvepOuterVSpacing, PaV);
R.SetItemExtraIntProperty(R.ItemCount-1, rvepOuterHSpacing, PaH);
R.SetItemExtraIntProperty(R.ItemCount-1, rvepColor, Co);
// R.SetItemExtraIntProperty(R.ItemCount-1, rvepColor, clWhite); < no effect
R.SetItemExtraIntProperty(R.ItemCount-1, rvepBorderColor, CoB);
// R.SetItemExtraIntProperty(R.ItemCount-1, rvepTransparent, 1); < no effect
// R.SetItemExtraIntProperty(R.ItemCount-1, rvepTransparentColor , clWhite); < no effect
finally
Pic.Free;
end;
. . .
end;
Do you have a hint?