Marcus, I googled the error & found this:

"JPEG error #53 - Insufficient Memory"

jhg



-----Original Message-----
From: advanced_delphi@yahoogroups.com on behalf of marcus_fen1x
Sent: Wed 11/28/2007 4:24 AM
To: advanced_delphi@yahoogroups.com
Subject: [advanced_delphi] Jepg Error #53
 
I'm trying to consume a WCF web-service with HTTP-bindings in my 
delphi app. 

just to give you little inside, it goes like this. 

//////////////////
var
  ms:TMemoryStream;
  jpg:TjpegImage;
  s:TByteDynArray;
  BmTemp: TjpegImage;
 
begin
   bmTemp:= TjpegImage.Create;
   ms:=TMemoryStream.Create;
   s:=PtSearch.ImageByte ;   ///ImageByte is the image return by web-
service

   ms.Write(s[length(s)],length(s));    
   ms.Position:=0;
   bmTemp.LoadFromStream(ms);   /// this throws JPEG error #53
   image1.Picture.Assign(bmTemp);
end; 
/////////////
 All i'm tryin to do is display a pic that is being returned from the 
this web-service. and it just throws error while while loading from 
stream. I also saved this stream to file and that file is not a valid 
jpg file either, i.e. i can't view any image. 

Anyone who would try to make it resolve??

Thanks 


<<winmail.dat>>

Reply via email to