Okay...
I am copying a transaprent PNG from the TImage control.
I have Transparent setting set to True on the Timage i properties panel.... so far that works fine
I copy the image to the clipboard
But if I paste in my RichMemo.... the alpha is black.
Tried pasting it into MSPaint and Word... still black.
So, I am guessing that it has something to do with how I am copying the PNG to the clipboard
Can anyone shed some light as to How to fix this??
FYI... imgCB is my TImage control in code below
Thanks in advance.
procedure TForm1.btnImportClick(Sender: TObject);
var
bmpCB: TBitmap;
begin
OpenPictureDialog1.Options := [ofEnableSizing, ofViewDetail, ofHideReadOnly];
if OpenPictureDialog1.Execute then
begin
imgCB.Picture.LoadFromFile(OpenPictureDialog1.FileName);
if imgCB.Picture.Graphic = nil then
Exit
else
begin
bmpCB := TBitmap.Create;
bmpCB.Width := imgCB.Width;
bmpCB.Height := ImgCB.Height;
bmpCB.Canvas.Draw(0,0,imgCB.Picture.Graphic);
end;
Clipboard.Assign(bmpCB);
bmpCB.Free;
end;
end;