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'.
Drop GIF Images
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
You need to associate the graphic class with the file extenstion.
For example:
Call this line one time before the first file loading.
(If you use Anders Melander's TGifImage, it should do it itself by default)
For example:
Code: Select all
TPicture.RegisterFileFormat('gif', 'Gif Image', TGifImage);
(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.
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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
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.
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);
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.