Board index » cppbuilder » TImage: Loading JPG and Gif from Stream
Andreas Wehne
![]() CBuilder Developer |
Sun, 19 May 2002 03:00:00 GMT
TImage: Loading JPG and Gif from Stream
I have a TPicture object and want to load different pictures from stream
into this component. if i load only gifs or only jpgs there is no problem but if i mix it i get an exception. if i'am doing the same with loading the pictures from file i'am having no problems. My solution for this was now to store the pictype in the database and before i load the picture from the stream into tpicure component i load a little gif or jpg file into the timage object. And everything works fine. But this should only be a workaround. Is there any possibility to tell the TImage object that the stream data is now a gif or a jpg. thanks for reading this A.Wehner int __fastcall LoadFromDBToPic (TTable *Table, TPicture *Bild) if (Table->FieldByName("Bild")->IsNull) // Workarounf Quote} |