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
 difficulty displaying panoramic JPG file
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jrpcguru

USA
254 Posts

Posted - May 11 2017 :  16:19:31  Show Profile  Reply
I have a panoramic file created by a Samsung phone that is 52mb big. I am baffled by the following behavior:
1. Your PhotoEn3 demo program successfully loads and displays using LoadFromFile.
2. My scanning program successfully loads and displays but it fails on ImageEnView1.IO.LoadFromFile(inName). I then use
if ImageEnView1.IO.Aborting = true then ImageEnView1.IO.LoadFromFileAuto(inName) and it succeeds.
3. My photorenamer program fails to load the file even though I made it use the same code. It generates EIEJpegException Unsupported marker type ? when I step thru it.

I have tested both of my programs with and without IELib32.dll. I've used the 2/8/2016 version and the new 4/7/2017 version and ImageEn versions 6.3.2C and 7.0.0.
I have tried to find if there are any properties that I have set in design view or programmatically that would explain this, but have found nothing. I am using LegacyBitmap = false.

Can I send you the JPG file via TransferBigFiles.com and ask for suggestions about what I may be doing wrong in my Photorenamer program? Or perhaps the exception error will be helpful to you?


J.R.

xequte

38127 Posts

Posted - May 11 2017 :  16:48:17  Show Profile  Reply
Hi JR

Are you sure the image is a JPEG? Open it is Notepad and check the first four chars are ÿØÿà

Otherwise upload it to somewhere so I can download and test.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

jrpcguru

USA
254 Posts

Posted - May 11 2017 :  17:20:36  Show Profile  Reply
ExifTools reports it is a .JPG. Notepad crashed, I assume because the file was too big. I'm uploading it to TransferBigFiles.com.

Thanks in advance for your assistance.

J.R.
Go to Top of Page

xequte

38127 Posts

Posted - May 15 2017 :  01:43:48  Show Profile  Reply
Hi JR

I cannot reproduce that. When I load the file using LoadFromFile or LoadFromFileAuto it loads correctly.

Are there other steps I need to take? Does setting ImageEnView1.LegacyBitmap to false make any difference?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

jrpcguru

USA
254 Posts

Posted - May 15 2017 :  10:29:45  Show Profile  Reply
Thanks for checking. Here is a little more to puzzle you and me:

I have tried it with and without LegacyBitmap. You had recommended false to allow loading huge JPG files. The problem happens either way.

After more testing, I have stumbled on a solution but I don't think you intended this. I changed my test:

if ImageEnView1.IsEmpty = true then
// if ImageEnView1.IO.Aborting = true then

If I test for aborting, it reports true and my code tries LoadFromFileAuto. But I use the same Aborting test there too, so it fails again after which my code clears the image and reports the error.

If I remove the Aborting test and substitute the IsEmpty, my code doesn't clear the image and report the error and now the image displays. I have changed my code to use IsEmpty, but I wonder if there is something wrong with the Aborting? Perhaps that exception error that I listed above causes it some confusion?

J.R.
Go to Top of Page

xequte

38127 Posts

Posted - May 16 2017 :  02:01:58  Show Profile  Reply
Hi JR

Sorry, I misunderstood your message. You are correct, Aborting is True after the loading. This is because there are unknown markers within the meta-data (even though the image itself seems to be valid).

Is this just one bad image, or multiple images like that?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

jrpcguru

USA
254 Posts

Posted - May 16 2017 :  09:04:03  Show Profile  Reply
This came from my niece's Samsung smart phone and so far is the only example. She did very few panoramic photos on our trip to Spain. If you would like I could ask her to make some more panoramic examples. I could also generate some with my phone - Nexus - so we can see if this is a common problem with panoramic photos. I don't know which marker was bad, but I wonder if this being a night photo could have anything to do with it? I'm also wondering if your code needs to test for a valid image and allow it report Aborting=false so that your code is more resistant to bugs in camera implementations of EXIF? Or perhaps report various error codes to allow programs to respond correctly. I think I will change my code back to testing for Aborting but then test for IsEmpty before taking action.

I just ran the photo through my implementation of CCR-Exif and it reports:
Section Name = Thumbnail IFD
Loaded cleanly = No: bad image offset

Also, CCR-Exif reports the following raw data:
--- Comment ---
Segment offset $02AE
Total size of segment 40 bytes
Value File written by Adobe Photoshop¨ 5.0

That is incomprehensible since my niece doesn't own Photoshop 5.0, nor do I. The photo, so far as I know, was never edited since I made daily backups from her phone during the trip. I could ask her to confirm this, but the EXIF data doesn't report any outside editing.

I'm glad you found something to explain this. It sure had me baffled at first!


J.R.
Go to Top of Page

jrpcguru

USA
254 Posts

Posted - May 16 2017 :  09:07:23  Show Profile  Reply
I should have mentioned that the reason the Time portion of the file name that I sent to you does not agree with the EXIF is because my software adjusted her manually set clock (no cell service in Spain) to agree with my camera when renaming the photos. But it does not change the actual file in any way.

J.R.
Go to Top of Page

jrpcguru

USA
254 Posts

Posted - May 16 2017 :  09:14:30  Show Profile  Reply
I just searched my niece's photos from this trip and this appears to be the only panoramic photo that she took. So maybe we do need to inspect more examples from her phone?

J.R.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: