Author Topic: reason: corrupt jpeg ?  (Read 6418 times)

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
reason: corrupt jpeg ?
« on: December 23, 2016, 07:47:48 AM »
so i noticed some systems images were loading slower when when i would change
to new console   ,,when in windowed mode i noticed in the cmd window for am

i am getting alot of " failed to load image .......reason: corrupt jpeg"

how does one fix this?   how can it be corrupt its just a pic ,,and opens up in PS fine

any incite...thanks
help a friend....

Mettekr

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
Re: reason: corrupt jpeg ?
« Reply #1 on: December 29, 2016, 05:42:35 PM »
just wanted to chime in that i'm seeing the same thing. some images will load slowly, some won't load at all and i see the same error in the log...and like you, it opens just fine outside of AM. i'm running on a rpi 3, so i can view the images in lxde desktop fine or through smb share.

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: reason: corrupt jpeg ?
« Reply #2 on: December 31, 2016, 05:56:37 PM »
so im not crazy? bump
help a friend....

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1274
    • View Profile
Re: reason: corrupt jpeg ?
« Reply #3 on: January 01, 2017, 01:29:22 AM »
If the image shows an error that it's corrupt, then it's corrupt. Download the image again and replace the image to correct the error(s). Just because you can view an image doesn't mean it's not corrupt. The metadata can be missing or other issues can exist. If the error(s) don't bother you then you can leave it but there's a chance that it might cause slight lag/delays.

When you download or copy anything there is a chance that it might not be 100%. That's why when you download important files they usually contain a checksum to ensure that you received exactly what you were expecting. Of course a simple image file won't have a checksum because it would be time consuming for a rather unimportant file.
« Last Edit: January 01, 2017, 01:30:59 AM by progets »

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 863
    • View Profile
    • new projects
Re: reason: corrupt jpeg ?
« Reply #4 on: January 01, 2017, 07:18:02 AM »
I would run all images though the batch image converter/resizer - just set it to resize 100%.
This way you'll end up with not-corupted JPGs.

And THEN you can observe if the "corrupted..." error is still there. Or even more - if the AM is "corrupting" JPGs (very unlikely) - if the file modification date will change after batch conversion.

Be sure to make a copy of your JPGs folder before doing the above.

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: reason: corrupt jpeg ?
« Reply #5 on: January 01, 2017, 02:45:04 PM »
Hi there,

I think verion's approach is the best way to fix this if you want the fastest image loading in attractmode.

As a bit of background to what is going on:  When attractmode tries to load an image it first uses SFML's built in image loading routines.  If that fails, it falls back to loading the image with ffmpeg (which isn't really meant for image loading but does the trick).

So I suspect what is happening is that SFML's image loading routine thinks the images are corrupt and spits out the error message you are seeing, but then attractmode falls back to ffmpeg which is still able to load the image (in some cases).  The slow down is from attractmode trying twice to load the image, with the ffmpeg call being the slower call.

Attractmode never tries to write to image files (except for screen capture), so it shouldn't be the source of the corruption.

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: reason: corrupt jpeg ?
« Reply #6 on: January 10, 2017, 09:21:05 PM »
thanks guys for geting back to me....im a bit late
just yous d  "FastStone Photo Resizer"   

and resizing all ,,,   worked great.....no more errors and loading quick....

now im on a mission to do all me snap sets.........

thanks you.....
help a friend....