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
 Invalid Image
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

steve@instamation.com

USA
4 Posts

Posted - Dec 09 2020 :  06:43:54  Show Profile  Reply
I have an database application that maintains a list of equipment, and I have used Delphi's TIMAGE component to attach images of the selected equipment.

I recently switched to your library to replace TImage with TImageEn where I retrieve a Jpg file and save it to the database as a Jpg blob field, just like I did with TImage, and everything works fine while I am using your components to view/edit my images. Everything works great.

HOWEVER, The problem is that when I attempt to view the saved Jpgs from my database field in anything other than your viewers, I receive 'INVALID IMAGE' errors. I cannot determine why. Does your components save the jpgs in a format that is incompatible with any other jpg viewer? I have been fighting this for two weeks now, and I am almost giving up with ImageEn components, so any help from you would be greatly appreciated.

Regards,
Steve Wagner
Instamation Systems Inc.

xequte

38610 Posts

Posted - Dec 09 2020 :  16:27:40  Show Profile  Reply
Hi Steve

ImageEn saves standard JPEG images, so I expect there is another issue at play here. Perhaps the other viewer is expecting the blob to be formatted in a specific way?

Can you save extract the raw data stored in the blobs (old vs ImageEn) to a raw file and send them to me for comparison?

Do other formats work, such as BMP?

Also, please show us the code you are using to store the JPEG?



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

steve@instamation.com

USA
4 Posts

Posted - Dec 13 2020 :  08:47:50  Show Profile  Reply
Thank you Nigel for your response.

I notice that the database Image field that works begin with "0xFFD8", and the ones that are created with ImageEn begin with "0x494D4". Why is this?

If the ImageEn Image field is the standard JPEG, shouldnt they begin with "0xFFD8" too?

Steve Wagner
Inatamation Systems Inc.
Go to Top of Page

xequte

38610 Posts

Posted - Dec 13 2020 :  13:51:41  Show Profile  Reply
Hi Steve

Yes, all JPEG images start with 0xFFD8. 0x494D4 looks like it is 'IM...'.

It looks like you are not saving to JPEG. Please show me the code you are using to write to the database stream. Are you passing the format as ioJPEG?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

steve@instamation.com

USA
4 Posts

Posted - Dec 13 2020 :  17:49:43  Show Profile  Reply
Hello Nigel;
You were correct. I was saving the stream using
ImageViewer.IO.SaveToStreamIEN(MyStream). and when I changed it to
ImageViewer.IO.SaveToStreamJpeg(MyStream) everything began working.
Thank you very much for your quick response, and have a wonderful day.
Steve Wagner
Go to Top of Page

xequte

38610 Posts

Posted - Dec 13 2020 :  20:30:13  Show Profile  Reply
Glad to hear we got to the bottom of it

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: