Greyfox Posted March 9, 2020 Posted March 9, 2020 Today I was partway through processing a large number of RGB 8 bit JPG images from a scanner in Affinity Photo. The process was basically to individually straighten and then crop each image. That was then followed by a resize to 205mm wide, retaining the existing aspect ratio, and a dpi of 300. They were then exported as jpgs at 100 quality. I used Document->Resize Document to do the resizing. All went well until on one image somehow the units managed to get accidentally changed from millimetres to inches. Probably a finger problem on my part. So the resize was actually to 205 inches by something around 145 inches at 300 dpi. Unaware that the resize wasn't as it should be, I proceeded with the export (and didn't look at the size).. An export progress indicator, came up and after a bit the bar started to move very slowly. At that stage I realized something was probably not right, but as the indicator was still slowly moving and the hard drive light was on, I let it go, and go, and go.. By the time I decided to cancel the operation, it was too late. The mouse no longer responded, Alt+Ctrl+Del did nothing, and the only option was to hold in the On button until the PC shut down. I've since done that exercise again deliberately, and again it resulted in a total loss of control and the only exit by powering the PC down. So it would have been a large image, but still within the 65,535 x 65,535px limit for the JPG format. So the question is why was control lost during the export (though no crash, and no "not responding" message from Affinity Photo ), and is it something that should trigger a warning from Affinity Photo? The PC is Windows 10 pro (1909), 16GB RAM (+16.5GB paging file). Over 50GB of available space on the particular data drive partition, and only Windows 10 and Affinity Photo 1.8.0.585 running at the time. Quote Intel i7-10700 Gen10 CPU, 32GB RAM, Geforce GTX 1660 OC 6GB Windows 10 Pro 22H2, 1x 1TB M.2 NVMe, 1 x 2TB M.2 NVMe. Affinity APh, APu, ADe
Greyfox Posted March 11, 2020 Author Posted March 11, 2020 I have looked further at this. The short answer seems to be that Affinity Photo will virtually run a 16MB RAM PC out to the limit of its memory exporting even a 35,000 x 35,000 px JPG image. Using a 30,000 x 30,000 image (which it can export), and looking at the memory used by Affinity Photo process itself in Task Manager 1. Affinity Photo just opened, no image present - 201.5MB 2. A 30,000 x 30,000 RGB 8 bit JPG image opened - 4,953.7MB 3. First part of Export process - Calculation of approx file size - Memory use peaks at 12,698.9MB (12.698GB), dropping back to 5,454.2 MB when calculation completed. 4. Second part of Export process - Write to disk as JPG Quality 100 - Peaks at 12,718.3MB (12.718GM) dropping back to 5,475.5 when calculation completed. With a 35,000 x 35000 px image the overall memory use hits 99% shortly before everything becomes unresonsive. Doesn't seem right to me that the export process (particularly the calculation of an approximate file size) should use that amount of memory, and I'm surprised that there isn't some mechanism that would provide a more graceful termination. Quote Intel i7-10700 Gen10 CPU, 32GB RAM, Geforce GTX 1660 OC 6GB Windows 10 Pro 22H2, 1x 1TB M.2 NVMe, 1 x 2TB M.2 NVMe. Affinity APh, APu, ADe
Alfred Posted March 11, 2020 Posted March 11, 2020 On 3/9/2020 at 9:57 AM, Greyfox said: no crash, and no "not responding" message from Affinity Photo < pedantry > The “not responding” message comes from Windows, not from the app itself. It tells the user (or rather, tries to tell the user!) that the OS is attempting to communicate with the app but isn’t getting a response within a reasonable timeframe. < /pedantry > PaulAffinity 1 Quote Alfred Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.5.1 (iPad 7th gen)
Greyfox Posted March 11, 2020 Author Posted March 11, 2020 12 hours ago, Alfred said: The “not responding” message comes from Windows, not from the app itself. Thanks Alfred, I stand corrected. 😀 Alfred 1 Quote Intel i7-10700 Gen10 CPU, 32GB RAM, Geforce GTX 1660 OC 6GB Windows 10 Pro 22H2, 1x 1TB M.2 NVMe, 1 x 2TB M.2 NVMe. Affinity APh, APu, ADe
Staff Chris B Posted May 22, 2020 Staff Posted May 22, 2020 Sorry I'm late to the party... I can't even create a 65,000 px x 65,000 px document without the app crashing 🙃 We shouldn't crash but to be honest, I'm not surprised such an enormous document is causing issues. I know 65,535 px is the max size for a JPEG but I can't imagine many people work to that. Some apps will even enforce their own max size. If it's any consolation, Photoshop on my Mac crashed once but on the second attempt it did create a blank JPEG at max size after 7 minutes 👀 Edit 1 - If we were to try and sort this, I'm not sure if we'd either impose a max limit or actually work on improving stability. Worth asking though! Edit 2 - I've just tried this on Affinity Photo on my Mac and is created the document in second or two... Probably something for Windows to improve then. Greyfox 1 Quote How to format a bug report | Learning Resources | List of V2 FAQs | YouTube Tutorials
Greyfox Posted May 22, 2020 Author Posted May 22, 2020 12 minutes ago, Chris B said: ....I know 65,535 px is the max size for a JPEG but I can't imagine many people work to that..... Chris, I did say in the opening post that getting to that size was the result of an error on my part. I certainly can't think of any circumstances where I would normally want to export a JPG of that size. I see the issue firstly as whether Affinity Photo's JPG export process should be using the amount of memory it is, and then secondly whether a future version could provide a more graceful termination, even if that means applying some limits (maybe based on available memory). Chris B 1 Quote Intel i7-10700 Gen10 CPU, 32GB RAM, Geforce GTX 1660 OC 6GB Windows 10 Pro 22H2, 1x 1TB M.2 NVMe, 1 x 2TB M.2 NVMe. Affinity APh, APu, ADe
Staff Chris B Posted May 22, 2020 Staff Posted May 22, 2020 Well I can now create one at that size from New Doc, however resizing a small JPEG to the dimensions mentioned gives me a consistent crash. There's something worth investigating here! Greyfox and Alfred 2 Quote How to format a bug report | Learning Resources | List of V2 FAQs | YouTube Tutorials
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.