ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 PasteFromClipboard crashes with GIF Image format

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PeterPanino Posted - Mar 28 2014 : 10:27:18
Hi! I have a TImageEnProc component on a form, where the AttachedTImage property is set to a TImage on the form.

I have a GIF Image format in the clipboard:



Now, when I use this code then the program crashes:

ImageEnProc1.PasteFromClipboard;

So how can I paste the GIF Image clipboard format with ImageEnProc1.PasteFromClipboard?
1   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Mar 28 2014 : 11:06:09
Do you have gifimg in uses?

If not, then Image.Picture has not registered the TGifImage format with TPicture, which explains why you are getting an exception.

Unlike TImageEnView, TImage is a very old component and only recognizes the TBitmap and TIcon formats without the assistance of other libaries. If you add the other file formats like Jpeg or PngImage they will be recognized as well.

or you can just call hyieutils.IERegisterFormats which registers all the ImageEnIO supported file formats with TPicture and the other file types (gifimg, pngimage, jpg) do not have to be in uses. In this case, formats such as TIF, JP2, Jp2000 and all other ImageEnIO formats will be recognized by TImage.Picture.
procedure TForm1.FormCreate(Sender: TObject);
begin
  IERegisterFormats;
  OpenPictureDialog1.filter := GraphicFilter(TGraphic);
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
  IEUnRegisterFormats;
end;

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Custom ImageEn Development