Home End User

Problem with GIF

edited October 2002 in End User
Hello...

I Have a problem about gif picture...

I have various gif that don't show by reportbuilder..... any type of gif is
needed ?...

Comments

  • edited October 2002
    Please do not post attachments.

    Be sure to add ppGif to your uses clause.

    Try toggling the image component's DirectDraw property to true.

    Make sure you have the latest printer driver installed.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited October 2002
    ok.. thanks..


    but...

    it's appears error....

    i thinks thats the problem is to saving GIF in blob file to be loaded
    correctly to TGifImage component....

    How is correct form...

    To saving GIF in a blob, im using.....


    // Image1: TImage; -- > it's a form image component


    procedure SAVE;
    var
    ofs: TStream;
    begin
    TABLE.Append;
    ofs := TMemoryStream.Create;
    FotoPrd.Picture.Graphic.SaveToStream(ofs);
    ofs.position := 0;
    TABLEFieldImage.LoadFromStream(ofs);
    TABLEFieldImageType.AsString :=
    Image1.Picture.Graphic.ClassName;
    TABLE.Post;
    end;

    I'm use this form...

    procedure TForm1.LoadImage;
    var
    ofs: TStream;
    Grclass: TGraphicClass;
    Newgr, NewGrIcon: TGraphic;
    begin

    ofs := TMemoryStream.Create;
    TABLEFieldImage.SaveToStream( ofs );

    Grclass := GetGraphicClass( TABLEFieldImageType.AsString );
    // it's result TGifImage class
    NewGr := Grclass.Create;
    ofs.Position := 0;
    NewGr.LoadFromStream( ofs );
    Image1.Picture.Graphic := Newgr;

    end;



    function GetGraphicClass( cClass: String ): TGraphicClass;
    begin
    if UpperCase(cClass) = 'TJPEGIMAGE' then
    Result := TJPEGImage
    else
    if UpperCase(cClass) = 'TGIFIMAGE' then
    Result := TGIFImage
    else
    if UpperCase(cClass) = 'TBITMAP' then
    Result := TBitmap
    else
    if UpperCase(cClass) = 'TICON' then
    Result := TIcon
    else
    if UpperCase(cClass) = 'TMETAFILE' then
    Result := TMetaFile
    else
    Result := TBitMap;
    end;



This discussion has been closed.