Subject RE: [firebird-support] saving jpeg
Author mugi yanto
Thank u, Villalona
The trick does work ! :-)
And for the forum (especially Mr Adam) please forgive me whether my last question was out of topic.

Elkins Villalona wrote:
> I think the following code will do the trick for you. In order to use this
> approach you most add the jpeg unit to the uses clause.
> I hope it help.
> Elkins
> Procedure PictureLoader;
> var
> jpg: TJpegImage;
> MS: TMemoryStream;
> begin
> Jpg:=nil;
> MS :=nil;
> Jpg:=TJpegImage. Create;
> MS:=TMemoryStream. Create;
> Jpg.LoadFromFile( "C:\TMP\PICTURE. JPG");
> jpg.CompressionQual ity:=50; ****use it only if you need it****
> jpg.Compress;
> Jpg.SaveToStream( MS);
> MS.Position: =0;
> TBlobField(Qry_ Picture.fieldbyn ame('FOTO_ RECLAMO') ).LoadFromStream (MS);
> Qry_Picture. Post;
> Jpg.Free;
> end;
> _____
> From: firebird-support@ yahoogroups. com
> [mailto: firebird-support@ yahoogroups. com ] On Behalf Of mugi yanto
> Sent: Tuesday, June 24, 2008 12:39 PM
> To: firebird-support@ yahoogroups. com
> Subject: [firebird-support] saving jpeg
> Hi, anyone.
> Please help me how to save a jpeg file to my blob field.
> It works for bmp but stuck on jpeg.
> Fyi, i use fb 1.5 and delphi 6.
> Thank u in advance,
> ~mugi.
> [Non-text portions of this message have been removed]
>