trichview.com

trichview.support




Re: OfficeConverters+gif


Return to index


Author

Message

Sergey Tkachenko

Posted: 08/28/2002 18:35:06


When the code is compiled, can you see a dots in front of executable lines,

in procedures listed below?


These procedures do the following:


1)

TPicture.RegisterFileFormat('gif','Gif Image',TGifImage);

Associates 'gif' extension with TGIFImage.

You got an error message because the extension is not associated


2) procedure MyCreateGraphic and assignment RV_CreateGraphics :=

MyCreateGraphics;

Workaround for Delphi/TGIFImage bug.


3)

procedure MyAfterImportGraphic and assignment RV_AfterImportGraphic :=

MyAfterImportGraphic;

Turns off animation in loaded gifs (animation is not supported)





>

> Hello Sergey,

> I did what you wrote but without success.

>

> Regards

>

> Christophe

>

>

> "Sergey Tkachenko" <[email protected]> wrote:

> >In the officeconverter demo, find a line {.$DEFINE USEGIFIMAGE} and

remove

> >dot before $:

> >{$DEFINE USEGIFIMAGE}

> >

> >This will add the following code

> >

> >=== CODE START ====

> >

> >procedure MyAfterImportGraphic(Graphic: TGraphic);

> >begin

> >  if Graphic is TGifImage then

> >    TGifImage(Graphic).DrawOptions :=

> >TGifImage(Graphic).DrawOptions-[goAnimate]+[goTransparent];

> >end;

>

>{--------------------------------------------------------------------------

-

> >---}

> >// Required for all Delphi/C++Builder, except from D6

> >function MyCreateGraphics(GraphicClass: TGraphicClass): TGraphic;

> >begin

> >  if GraphicClass=TGifImage then  begin

> >    Result := TGifImage.Create;

> >    end

> >  else

> >    Result := GraphicClass.Create;

> >end;

>

>{--------------------------------------------------------------------------

-

> >---}

> >initialization

> >  TPicture.RegisterFileFormat('gif','Gif Image',TGifImage);

> >  RV_CreateGraphics := MyCreateGraphics;

> >  RV_AfterImportGraphic := MyAfterImportGraphic;

> >

> >=== CODE END ====

> >

> >If you'll use TGifImage in your applications, add this code in them.

> >

> >>

> >> Hello,

> >> I have installed TGifImage as component.

> >> When I use OfficeConverters, I have always a message

> >> "Graphic extension not know (.gif)".

> >>

> >> Thank you for help

> >>

> >> Regards

> >>

> >> Christophe

> >

> >

>





Powered by ABC Amber Outlook Express Converter