ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Load JPEG from String
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

johnrboren

USA
12 Posts

Posted - Nov 19 2012 :  17:18:04  Show Profile  Reply
I have a JPEG that is being transported as a string. I know I have the complete JPEG - but not sure why I can't display it.

var InPic:String;
MyStream:TStringStream;
begin
InPic:=GetNodeValue(PersonNode,'IMAGE');
MyStream:=TStringStream.Create(InPic);
MyStream.Position:=0;

Photo.IO.LoadFromStreamJpeg(MyStream);
Photo.IO.Update;

Any reason why this wouldn't work?

JOHN BOREN

ehkhalid

27 Posts

Posted - Nov 20 2012 :  01:44:18  Show Profile  Reply
Hi,
Can you attach an example of xml file that contain the jpeg

Go to Top of Page

johnrboren

USA
12 Posts

Posted - Nov 20 2012 :  11:53:36  Show Profile  Reply
This actually did work. I had some white space and some other stuff preceding the actual JPEG. Once I removed that and scanned for the start of the JPEG message, it worked great.

JOHN BOREN
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: