lphilpot Posted November 20, 2022 Share Posted November 20, 2022 Photo 2.0.0, Windows 11 Home When I load an image in Photo and save it as an .afphoto file, it's always much larger than if I subsequently "save as" the .afphoto file to another .afphoto file name. Note I'm saving the second .afphoto from the first .afphoto, not again from the original TIFF. For example: Load a TIFF Delete the background snapshot Save it as an .afphoto (no edits) Close the .afphoto file and reopen it Make no edits and immediately "Save as..." to another .afphoto Here's one example: TIFF is 120MB, first afphoto ("Save") is 291MB, second .afphoto ("Save as") is 135MB. That's almost a 50% drop in file size. So what's the problem with the first one? I've done this numerous times and they always look identical, but unless I save twice I'm wasting almost 2x drive space on Photo files. Restarting Photo in between makes no difference. Quote Len Affinity Photo 2 | QCAD 3 | FastStone | SpyderX Pro | FOSS: ART darktable XnView RawTherapee Inkscape G'MIC LibreOffice Windows 11 on a 16 GB, Ryzen 5700 8-core laptop with a cheesy little embedded AMD GPU Canon T8i / 850D | Canon EF 24-70mm F4L IS USM | Canon EF 70-200mm F4 L USM | Rikenon P 50mm f/1.7 | K&F Concept Nano-X filters ...desperately looking for landscapes in Nolandscapeland https://www.flickr.com/photos/14015058@N07/ Link to comment Share on other sites More sharing options...
NotMyFault Posted November 20, 2022 Share Posted November 20, 2022 The native file formats are not intended to optimize space, but flexibility and speed wrt Affinity apps. Affinity uses some kind of garbage collector, triggered by some thresholds. In the meantime, files can grow, as edits may use additional new storage instead of old but unused storage. Quote Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. Link to comment Share on other sites More sharing options...
lphilpot Posted November 20, 2022 Author Share Posted November 20, 2022 I understand, but there were no edits between the two saves -- Only the name / file change. However, I'm not interested in wasting nearly 2x the space for photos I'll edit "once and done." This isn't design where I'll be going back and revising them, I'm doing them once and they're done. If that's something that's controllable, it would be nice to have an option to optimize for disk space. If AP's macro facility was robust enough, that could suffice in a pinch. Quote Len Affinity Photo 2 | QCAD 3 | FastStone | SpyderX Pro | FOSS: ART darktable XnView RawTherapee Inkscape G'MIC LibreOffice Windows 11 on a 16 GB, Ryzen 5700 8-core laptop with a cheesy little embedded AMD GPU Canon T8i / 850D | Canon EF 24-70mm F4L IS USM | Canon EF 70-200mm F4 L USM | Rikenon P 50mm f/1.7 | K&F Concept Nano-X filters ...desperately looking for landscapes in Nolandscapeland https://www.flickr.com/photos/14015058@N07/ Link to comment Share on other sites More sharing options...
NotMyFault Posted November 21, 2022 Share Posted November 21, 2022 Well, „save as“ is one of the known recipes to reduce file size. Your feedback or feature requests are welcome in the „feedback“ section of the forum. Quote Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. Link to comment Share on other sites More sharing options...
lphilpot Posted November 21, 2022 Author Share Posted November 21, 2022 7 hours ago, NotMyFault said: Well, „save as“ is one of the known recipes to reduce file size. That's why I posted this as a bug report. To my mind, a bug report should carry more weight than simple feedback and this (IMO) is a bug, even if by design. However, from a development POV I don't see it as being by design. While "Save as.." might be a workaround, it's not a fix. It does, however, prove the problem with the first save. 16 hours ago, NotMyFault said: The native file formats are not intended to optimize space, but flexibility and speed wrt Affinity apps. If this was video editing / playback / streaming I could maybe understand that, but there's not that kind of "near real-time" performance requirement for photo editing. We push a button, the app does X and we continue when it's done. Anything seriously resource-intensive should be handed off to the GPU anyway. Pre-allocating resources for such near-static operations (if indeed it happens) is wasteful and inefficient from a system viewpoint. For example, allocating memory is as simple as calling malloc() / realloc() / free() or for disk calling fopen() / fread() / fclose(), etc.* While it's possible the actual resources might be expensive on a constrained system, the act of allocating them isn't. The app makes the call and the OS responds (most likely based on what it got back from the hardware via the MMU). *Here I suspect it's new() / delete() / open() / close(), etc., since Photo is probably written in C++ The point is, there are no significant gains in this context by pre- or over-allocating file resources. Besides, a file intentionally over-allocated at save time would presumably be designed to provide a benefit upon the next open. At that point, disk IO, CPU and other factors would swamp any potential over-allocation gains. Plus it's just a pain to be forced to save every new file twice. 🙂 Quote Len Affinity Photo 2 | QCAD 3 | FastStone | SpyderX Pro | FOSS: ART darktable XnView RawTherapee Inkscape G'MIC LibreOffice Windows 11 on a 16 GB, Ryzen 5700 8-core laptop with a cheesy little embedded AMD GPU Canon T8i / 850D | Canon EF 24-70mm F4L IS USM | Canon EF 70-200mm F4 L USM | Rikenon P 50mm f/1.7 | K&F Concept Nano-X filters ...desperately looking for landscapes in Nolandscapeland https://www.flickr.com/photos/14015058@N07/ Link to comment Share on other sites More sharing options...
Staff DWright Posted December 7, 2022 Staff Share Posted December 7, 2022 Is it possible for you to send me a copy of your TIFF file using the Dropbox link below as I have only been able to get my TIFF file to increase is size on save when I use the option to save back as a TIFF with Affinity layers and if I save as a .afphoto document I am seeing around a 20% size increase https://www.dropbox.com/request/sAt6k58pLqhjcQIeSGpr Quote Link to comment Share on other sites More sharing options...
lphilpot Posted December 7, 2022 Author Share Posted December 7, 2022 I just uploaded the most recent TIFF, but I've seen the same behavior in most instances. Thanks. Quote Len Affinity Photo 2 | QCAD 3 | FastStone | SpyderX Pro | FOSS: ART darktable XnView RawTherapee Inkscape G'MIC LibreOffice Windows 11 on a 16 GB, Ryzen 5700 8-core laptop with a cheesy little embedded AMD GPU Canon T8i / 850D | Canon EF 24-70mm F4L IS USM | Canon EF 70-200mm F4 L USM | Rikenon P 50mm f/1.7 | K&F Concept Nano-X filters ...desperately looking for landscapes in Nolandscapeland https://www.flickr.com/photos/14015058@N07/ Link to comment Share on other sites More sharing options...
lphilpot Posted December 7, 2022 Author Share Posted December 7, 2022 Also -- Please note the after further investigation this appears to possibly (?) be related to behaviors following deletion of the Background snapshot. I can't say with 100% certainty but that, at least, appears to be a common factor. I have also seen the same file (afphoto) grow incrementally with each unedited save (not Save As...). For example, load the file and save it (it gets larger). Save it again (it gets larger). I didn't go on indefinitely but it happened at least three times. I've not tried to duplicate that behavior since. It would be a huge help and clarifying change if we could simply disable the automatic creation of the Background snapshot in the first place. Just add a preference to disable it. I don't use snapshots and I have to remember to delete it then go through several saves (Save as...) in order to reclaim the storage space. Ref: Thanks. Quote Len Affinity Photo 2 | QCAD 3 | FastStone | SpyderX Pro | FOSS: ART darktable XnView RawTherapee Inkscape G'MIC LibreOffice Windows 11 on a 16 GB, Ryzen 5700 8-core laptop with a cheesy little embedded AMD GPU Canon T8i / 850D | Canon EF 24-70mm F4L IS USM | Canon EF 70-200mm F4 L USM | Rikenon P 50mm f/1.7 | K&F Concept Nano-X filters ...desperately looking for landscapes in Nolandscapeland https://www.flickr.com/photos/14015058@N07/ Link to comment Share on other sites More sharing options...
lphilpot Posted December 8, 2022 Author Share Posted December 8, 2022 Just another bit of file-saving-and-size strangeness: An example of an unchanged afphoto file getting bigger after I saved it under a new name (with no further edits): Loaded autosave.tiff into Photo: 2022-12-07 19:52 179,179,156 Autosave.tif 170 MB Did some edits, a few layers, etc., and saved it as autosave.afphoto: 2022-12-07 20:17 256,467,384 autosave.afphoto244 MB Closed autosave.afphoto, reopened it and immediately saved it as autosave2.afphoto (no edits, note the timestamp): 2022-12-07 20:19 408,931,181 autosave2.afphoto390 MB I've opened autosave.afphoto and autosave2.afphoto simultaneously and they're identical from every angle I can find (no snapshots, by the way). So why is the second -- apparently identical -- copy 60% larger? Thanks. Quote Len Affinity Photo 2 | QCAD 3 | FastStone | SpyderX Pro | FOSS: ART darktable XnView RawTherapee Inkscape G'MIC LibreOffice Windows 11 on a 16 GB, Ryzen 5700 8-core laptop with a cheesy little embedded AMD GPU Canon T8i / 850D | Canon EF 24-70mm F4L IS USM | Canon EF 70-200mm F4 L USM | Rikenon P 50mm f/1.7 | K&F Concept Nano-X filters ...desperately looking for landscapes in Nolandscapeland https://www.flickr.com/photos/14015058@N07/ Link to comment Share on other sites More sharing options...
Staff Affinity Info Bot Posted April 5, 2023 Staff Share Posted April 5, 2023 The issue "Non Live Filters are prompting the app to ask if the user wants to save a TIFF with layers or flattened" (REF: AFP-5635) has been fixed by the developers in internal build "2.1.0.1742".This fix should soon be available as a customer beta and is planned for inclusion in the next customer release.Customer beta builds are announced here and you can participate by following these instructions.If you still experience this problem once you are using that build version (or later) please reply to this thread including @Serif Info Bot to notify us. Quote Link to comment Share on other sites More sharing options...
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.