Pasting metafile images from clipboard

You think you have found a bug ? You've got a suggestion to modify PhotoFiltre ? /
Ĉu vi opinias vi trovis malbonadĵon ? Ĉu vi havas sugeston por modifi PhotoFiltre ?

Modérateur : Modérateurs

Ignace
Nouveau(elle)|Nouveau|Nouvelle
Nouveau(elle)|Nouveau|Nouvelle
Messages : 8
Inscription : 04 oct. 2006 20:19

Pasting metafile images from clipboard

Message par Ignace »

I am using latest version of free Photofiltre V6. I am trying to paste an image I copied from a Powerpoint presentation. This does not work. I discovered why. Copying an image from powerpoint results in a metafile format on the clipboard. Photofiltre does not recognize this. Is there a way to make this possible?

The code to handle this in Delphi should not be too complicated.
Something like this:

procedure GetBitmapFromClipboard(Bitmap: TBitmap);
var
MetaFile: TMetaFile;
begin
if Clipboard.HasFormat(CF_METAFILEPICT) then
begin
MetaFile := TMetaFile.Create;
Metafile.Assign(ClipBoard);
Bitmap.Width := MetaFile.Width;
Bitmap.Height := MetaFile.Height;
Bitmap.Canvas.Draw(0,0,Metafile);
MetaFile.Free;
end;
end;
Antonio
Administrateur(trice)|Administrateur|Administratrice
Administrateur(trice)|Administrateur|Administratrice
Messages : 12921
Inscription : 28 oct. 2003 22:49

Re: Pasting metafile images from clipboard

Message par Antonio »

For the moment i can not work on the free version, lot of work with the studio version and support. I will try to works next month for a new release but not sure :cry:

Thanks for this code, i allready use it for the studio version, but a little more complex to support metafile transparency (only more few lines) :wink: