Drop GIF Images

General TRichView support forum. Please post your questions here
Post Reply
wvd_vegt
Posts: 83
Joined: Tue Aug 30, 2005 7:39 am

Drop GIF Images

Post by wvd_vegt »

Hi,

Is there a way that RichViewEdit accepts gif images dropped on it?

When i try to drop one it throws an exception that says 'unknown picture fileextension'.
Sergey Tkachenko
Site Admin
Posts: 17520
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You need to associate the graphic class with the file extenstion.
For example:

Code: Select all

TPicture.RegisterFileFormat('gif', 'Gif Image', TGifImage);
Call this line one time before the first file loading.

(If you use Anders Melander's TGifImage, it should do it itself by default)
Last edited by Sergey Tkachenko on Mon Sep 26, 2005 3:46 pm, edited 1 time in total.
Sergey Tkachenko
Site Admin
Posts: 17520
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Or may be you do not use a graphic class representing TGifImage?

The standard Delphi library does not include support for Gif images, so you need to use thirdparty classes.
One of them - TGifImage by Anders Melander (free, no longer updated)

http://www.torry.net/vcl/graphics/gif/gifimage.exe (original)
http://www.trichview.com/resources/thir ... fimage.zip (update - required)
Include GifImage in uses, and call

Code: Select all

  RegisterClass(TGifImage);
  RV_RegisterHTMLGraphicFormat(TGifImage);
before the first loading.

In order to support animated gifs, include
RVAGifAnimate in uses, and set RichView.AnimationMode=rvaniOnFormat.

Another free gif class can be found in JVCL:
http://jvcl.sourceforge.net
For animation of TJvGIFImage, include RVJvGifAnimate in uses.
Post Reply