Pre processing with resize makes image corrupt

Bugreports = Bugfixes

Pre processing with resize makes image corrupt

Postby sonander » Wed Oct 30, 2024 12:02 pm

Hi

I noticed yesterday that when using the pre-process on a location to resize the image to a max length of the longest side the image gets corrupted. The result file is also larger than the non pre-processed file.

Link to samples: *

I have been using the pre-process to resize to 4200px and compress to 2MB for years without issues.

Thank
/Peter
Last edited by TheBrew on Wed Oct 30, 2024 12:36 pm, edited 1 time in total.
Reason: Got the files, thanks
AIPS Sports Photographer
sonander
 
Posts: 98
Joined: Sat Jul 07, 2018 8:23 pm

Re: Pre processing with resize makes image corrupt

Postby TheBrew » Wed Oct 30, 2024 12:35 pm

Thank you for reporting this. Looking into it!
Support the development of ShutterSnitch: Rate/review it on The App Store, Toot about it, make Youtube videos, blog about it.. Get the word out.
TheBrew
The Developer
 
Posts: 5109
Joined: Wed May 05, 2010 8:48 pm
Location: Denmark

Re: Pre processing with resize makes image corrupt

Postby TheBrew » Wed Oct 30, 2024 12:49 pm

It works fine on my side, so I'm going to need some more details in order to reproduce the issue.

Can you give me a sample file as it would be in the collection before uploading? (Preferably one you know fails)

What iOS device and version are you using?

Update: It looks like it's related to the Nikon Z9 file format. Working on it..
Support the development of ShutterSnitch: Rate/review it on The App Store, Toot about it, make Youtube videos, blog about it.. Get the word out.
TheBrew
The Developer
 
Posts: 5109
Joined: Wed May 05, 2010 8:48 pm
Location: Denmark

Re: Pre processing with resize makes image corrupt

Postby TheBrew » Wed Oct 30, 2024 3:07 pm

OK. I'm wiser.

It looks like Apple has changed the format of the JPEGs in iOS 18. Scaling the same Z9 JPEG to 4200px on iOS 17.6.1 and iOS 18.1 returns a 2.6MB and 3.0MB file respectively. The metadata is saved differently, and that's where it goes wrong.

If I can't find a proper fix today/tomorrow, I'll push an update tomorrow with a temporary workaround that I've found. (It gives me less control over how metadata is saved, but it seems to work..)
Support the development of ShutterSnitch: Rate/review it on The App Store, Toot about it, make Youtube videos, blog about it.. Get the word out.
TheBrew
The Developer
 
Posts: 5109
Joined: Wed May 05, 2010 8:48 pm
Location: Denmark

Re: Pre processing with resize makes image corrupt

Postby sonander » Wed Oct 30, 2024 3:40 pm

Super thanks Brian. Yes I am using a Z9 and iPadOS 17.6.1

I noticed it yesterday when the site where I upload live images rejected them which was really annoying as they did not come for sales.

Thanks for your always fast support

Peter
AIPS Sports Photographer
sonander
 
Posts: 98
Joined: Sat Jul 07, 2018 8:23 pm

Re: Pre processing with resize makes image corrupt

Postby sonander » Wed Oct 30, 2024 3:52 pm

Hi again

I remembered one thing I have changed. Lately I have been shooting jpg instead of raw with z9. I will take some raw photos and see how it behaves.

Peter
AIPS Sports Photographer
sonander
 
Posts: 98
Joined: Sat Jul 07, 2018 8:23 pm

Re: Pre processing with resize makes image corrupt

Postby TheBrew » Wed Oct 30, 2024 4:04 pm

Wow! I'm surprised you're on 17.6.1 - I'm not able to reproduce the issue using a sample Z9 JPEG on 17.6.1 (on my iPhone) but it gets corrupted by iOS 18 (on my iPad). Strange stuff.

I'm pretty sure switching to raws would "fix" it yes, because the issue is related to copying the metadata from the original JPEG to the resized one. Raws get their metadata copied a bit different, which seems to work.
Support the development of ShutterSnitch: Rate/review it on The App Store, Toot about it, make Youtube videos, blog about it.. Get the word out.
TheBrew
The Developer
 
Posts: 5109
Joined: Wed May 05, 2010 8:48 pm
Location: Denmark

Re: Pre processing with resize makes image corrupt

Postby TheBrew » Wed Oct 30, 2024 8:41 pm

That was quick. Version 7.2.2 was just approved by Apple, so I hope my fix also solves the issue you were having!
Support the development of ShutterSnitch: Rate/review it on The App Store, Toot about it, make Youtube videos, blog about it.. Get the word out.
TheBrew
The Developer
 
Posts: 5109
Joined: Wed May 05, 2010 8:48 pm
Location: Denmark

Re: Pre processing with resize makes image corrupt

Postby sonander » Sat Nov 02, 2024 1:19 pm

Thanks. I have done some testing and it looks promising.

/Peter
AIPS Sports Photographer
sonander
 
Posts: 98
Joined: Sat Jul 07, 2018 8:23 pm


Return to Bugs

Who is online

Users browsing this forum: No registered users and 2 guests

cron