Board index » delphi » Get GraphicExtension from TPicture

Get GraphicExtension from TPicture

Using the JPEG unit we can now store all sorts of pictures in a
TPicture, but how can we determine of which format type the currently
loaded image is ?

I would like to use something like the line below:
             SaveDialog1.DefaultExt := GraphicExtension(image1.Picture);

any ideas, thanks.

--

 Fred Schetterer [FreDsterWare]

    supp...@fredsterware.com

    Web Site, Software and Support at:
    http://www.fredsterware.com

 

Re:Get GraphicExtension from TPicture


Quote
> Using the JPEG unit we can now store all sorts of pictures in a
> TPicture, but how can we determine of which format type the currently
> loaded image is ?

> I would like to use something like the line below:
>              SaveDialog1.DefaultExt := GraphicExtension(image1.Picture);

Fred,

try image.picture.graphic.classname, it may give you the actual type of the
graphics object. I haven't tested this.

Peter Below (TeamB)  100113.1...@compuserve.com)

Re:Get GraphicExtension from TPicture


Oh so close, but its actually

SaveDialog1.DefaultExt :=
GraphicExtension(TGraphicClass(TPicture.Graphic.ClassType));

thanks for your help.

--

 Fred Schetterer [FreDsterWare]

    supp...@fredsterware.com

    Web Site, Software and Support at:
    http://www.fredsterware.com

Other Threads