Jump to content
You must now use your email address to sign in [click for more info] ×

Recommended Posts

A rather unexpected bad surprise for me on this! I was dismayed (after the facts) to see the huge file produced by Affinity Photo. I performed a search, didn't get an answer... Has no one raised questions about this so far?

 

I did nothing weird or special that I am aware of, processed a Fujifilm X-Pro1 raw file to the best of my liking as I usually do with ACR. If nothing more than that, I stop there and just keep the raw and the XMP sidecar, about 26MB (for the example given). If I need to keep a PSD for whatever reason, I open Photoshop. If only for editing there, when finished I save as PSD: 96MB or so with only one layer. It can become much more when adding layers, or convert to smart object before launching a NIK plugin for instance, but that´s not the issue here. My grief is about what usually is ´only´ a 96MB PSD file (almost 4x the raw´s size already!). 

 

So I processed a sample first in ACR. I did not need to open it in Photoshop, but for the sake of the comparison I did. Ended with a 96MB file as expected. I then launched Affinity Photo with the intention to produce more or less the same result. I ended with a 218MB (!) AFPHOTO file. I didn't see anything special at all. So I did nothing else, exported the same as PSD to see what that would give. Shocking result there: 293MB file for the single one background layer!!! Just to make sure (I don´t know what could be hidden), I tried flattening before export, no change; also merge visible layer, same result as well. In fact, I suppose these did nothing a all, rightfully so.

 

I have about 25,000 photographs, the vast majority only saved as raw + sidecar. That takes about 600GB on a 2TB external HD right now. There also is a 3TB TimeMachine for them and my internal HD... So I was thinking: if I need to organise more than 8 times the current diskspace used for the images alone (or worse), the comparison with Photoshop becomes quite a bit different, on the expenses involved alone. Imagine: for the same comfort and setup as I have now, I would need at least 16TB. Not to mention another even larger system for TimeMachine as well!  :blink:

 

I wonder, are the developers aware of this? If so, also working on it? 

I am now a bit afraid of comparing a picture from a 38MB raw file (my other current camera, an older DSLR).
Link to comment
Share on other sites

  • Staff

In addition to the large afphoto file, are you saying our PSD export is producing larger PSD files than Photoshop?

 

Any chance you could upload/dropbox an example for us to look at?

 

We an then get a better idea of what is going on.

SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB
Link to comment
Share on other sites

I am a perfect newbie, basically do not know what I did except processing. It´s true that there was a lot of going back and forth there...

 

I need to ask the friend whose file I used (from an X-T1 + XF 90/2), it will take a bit of time: he´s in the US and at his office right now. However, I´m launching a new test in case he says no, to create a new one with my X-Pro1 and Zeiss Touit 12/2.8, hopefully I´ll get it good looking at least. A quick pointer to what I do need to pay attention to for saving it with history would be helpful also. It will save some time. 

 

 

Edit for Ben: yes indeed. No issue (other than my question of course), I´ll send all as produced. I hope the friend says yes, that will be a lot faster as they´re already in the dropbox.  ;)

Link to comment
Share on other sites

I thought I could rule out the typical user error this side (nothing I cannot achieve there!), by just opening a raw file and save without doing anything. That was already conclusive, alas. Meanwhile, my friend Jack also granted permission, so I didn´t need to process another file for you to have good samples.

 

So I have sent six links to you, three per set: one AFPHOTO, one PSD exported by Affinity Photo and a PSD saved by Photoshop. The ones with Montreux in the file name are the unprocessed, Fanny has been processed. 

 

I meanwhile found what you meant by save with history. That was easy, just look at the menu!  :)

I did that for the Montreux file (although there should be nothing in there, as I did nothing). Unfortunately, not for Fanny´s file. 

 

Finally, there is no issue when opening the PSDs created by Affinity Photo, everything OK there AFAIC. However, I noticed a Layer 2 in Fanny´s file, but with the Background layer disabled - I used an unsharp mask there, but don´t know if that caused it. I also checked what would happen when just saving again after opening in Photoshop, without doing anything of course: not recommended, the saved file becomes again a tad larger.

 

 

Link to comment
Share on other sites

  • 2 weeks later...

After reading this topic I opened a RAW file from my D300.  Can't get the exact files size from my MAC other than to know it is less than 100MB.  I used NIK Silver Effects on a duplicate layer generated in Affinity and saved the resulting file in PSD format by using the export option under FILE.  The option calculates file size before saving and this one layer RAW file with one layer calculated to be 204MB when saved in PSD format.

I then opened  the PSD file in Photoshop Elements 12 which had to convert the bit depth as it will not handle anything over 8 bits ( I'm sure this saves space).  The file opened without a problem and looked great.  I then saved the converted file in Photoshop Element PSD format and looked at the resulting file size.  It was less than 100MB or a fifty percent reduction (again bit depth no doubt came into play here), but the original RAW file was also listed as less than 100MB.  Is Affinity saving at a greater bit depth in PSD than native Photoshop?  I don't usually get this far under the hood on these, but considering how fast I chew up disk space with my shooting I thought it a notable topic.

 

I should note that the EXPORT option will also calculate file size for PNG,JPEG and TIF formats, all of which are significantly lower than PSD.

 

All that said I would never save to PSD format unless I had a client who wanted files in that format.  I would most likely save for archive as a TIF and JPEG for web use, but Affinity does seem to expand the file size when exporting layered RAW images in the PSD format.

Link to comment
Share on other sites

Is there any news on the file size issue? I've started using Affinity Photo today. I love it, however, the fact that the .afphoto files have about 4x-6x (!) the size of the original RAW file strikes me as odd. I have .CR2 RAW files produced by a Canon 50D. I didn't include the editing history in the .afphoto files. Some 20 MB RAW .CR2 files turn into 120 MB .afphoto files for no apparent reason (it only contains material from the original .CR2 file and very few pixel and adjustment layers).

 

If there's anything I can do to help identify a potential bug, please let me known, I'm happy to help.

Link to comment
Share on other sites

  • Staff

The size of the original .CR2 raw file will not give a good indication of the afphoto file but the afphoto files are still larger than I would expect. I would expect the afphoto file to be about 80mb as they are if you had the same file saved in Photoshop.

 

The raw files are stored as a compressed form of the sensor data that is often only 10bit and a 16bit afphoto or psd will always be much larger.

 

I will investigate and see what we can find.

Link to comment
Share on other sites

Oops, TonyB beats me to it, of course: it took me too long to write the below.  ;)

 

 

 

Staff has confirmed looking at it after I made examples available. I don´t know what will come out of that of course, but I guess it will have their attention; especially where Affinity is creating PSD files much larger than Photoshop.

 

Just to avoid claims of me exaggerating this, have a look at the below simple search result on one simple image processed to my best liking, both with ACR / Photoshop CS6 and Affinity Photo. It is one layer only. Mind, what AP shows as computed file size on export is not quite correct either, my results are a bit more than that usually. The file names should show self explanatory. This was from the lowest impact AP file I had so far... Look at the last line in particular: as its name says, this was the 309MB PSD file as created with Affinity. After opening it with Photoshop - no issue with speed at all, on an old early 2008 iMac - I immediately pressed ´Save As...´ just to get another one, but without doing anything there, nothing at all! 

 

i-GGk8n9N.png

 

A simple one layer 16bit PSD created with Photoshop (CS6) is consistently 96MB for this camera (Fujifilm X-T1, 16mpix, 14bits raw file). Sure, if you limit your options to less, like you do with JPG, PNG and in general only 8bits processing, you will save quite some - a typical 8bits PSD for the example given is 45MB.

 

My archive now consists exclusively of the raw files and their associated XMPs - more than 80% - plus any 16 bits PSDs I needed to achieve something. Very often, that is because I wanted to go to some NIK component(s) with it. When only launching Photoshop to export JPG for the web but otherwise do nothing at all with it, I do not save the PSD and delete the JPG(s) when done. I don´t keep useless files on my HD, can recreate them as needed this way.

Edited by JasperD
Link to comment
Share on other sites

Hi TonyB! Thanks for looking into this issue. I really appreciate it.

 

After working with AP a little more I found that I sometimes get file sizes between 160-180 MB.

 

Again, thanks for looking into it, please let me know if you need sample files or something, I'd be happy to help you out.

Link to comment
Share on other sites

  • Staff

One thing Affinity Photo does by default is create a snapshot of your original image. This is useful for tools like the undo brush and other features but it does increase the file size when saved. We plan on making this optional for users that want to keep their files small.

 

One layer at 15.1 megapixels should take 120MB - 15.1 million * 8 (16bits per pixel per channel) but when saved should get a bit smaller because of compression. All afphoto files are stored lossless so you will never achieve JPEG level compression without loosing data.

 

If you only add one more 16bit layer then that could add another 120MB of image data. Again, I would expect that to produce a slightly smaller file as it's compressed.

 

We still have some more investigating to do but if you could post us a link to one of your 160-180MB files then we can have a look.

Link to comment
Share on other sites

Same problem here:

  • Opened a .dng file that was 22.9 MB (the DNG was converted from a Sony ARW file using Lightroom CC 2015.1, Camera Raw 9.1)
  • Made no edits in the Develop Persona (simply hit develop)
  • The Photo Persona information showed: 5504 x 3672px, 20.21MP, RGBA/16 - sRGB IEC61966-2.1
  • Made no edits in the Photo Persona
  • Selected “File”, “Save as”
  • The resulting .afphoto file is 178.4 MB

 

The same thing happens if I skip the DNG conversion in Lightroom and take the Raw file directly into Affinity Photo.

Link to comment
Share on other sites

Thanks for the explanation. I have one more question regarding the 16bit layers: if I add pixel layers with a copy of the original image that I'm working on (either parts of the picture or the whole picture), I'd expect AP to use the copy of the image already present in the .afphoto file for all of the layers without making additional copies -- is that correct?

 

I have a suggestion regarding the option to not include a snapshot of the original file: wouldn't it be helpful to simply include the original RAW file instead of e.g. a TIFF snapshot of the RAW file within the .afphoto file? The fact that the RAW file (due to differences in color depth etc.) is smaller than e.g. a TIFF copy should drastically reduce the size of the .afphoto file without losing functionality -- would that work?

 

What email address would you like me to send the link to the file to? Or would you like it as a private message in the support forum.

Link to comment
Share on other sites

  • 1 month later...

I´m picking up my old initial question, after spending the day at checking what AP 1.3.5 and the beta 1.3.5.1 now make out of it. There seems to be no difference between the two, at least on export to PSD. What I did notice though, is a dramatic reduction in size, about 30%, is that correct? It seems consistent for all images I tested, i.e. when loading the AP file stated in message #9 above, then do nothing but export as PSD, what I get is a file sized 222.1MB instead of 309.5MB... Same kind of savings with any other file I checked so far. Very good improvement already, if it is like I think, thank you for that!

 

However, I´m still stuck with it all the same, it is way more than what is usual (for means my friends) when using Photoshop itself, especially when only the top visible layer is of real importance. A reminder: easily 80% of my images is kept as RAW and sidecar XMP only - so single layered - the PSDs created merely for sharing with a few friends also photo enthusiasts just like I am. Between those, one has purchased Affinity Photo a day after I did, a few have Photoshop in one flavour or the other, but the vast majority do everything with Lightroom, likewise one flavour or the other. Once used, all single layered PSDs without any following in NIK or onOne´s Photo Suite are simply deleted ...

 

At the end, I was about to give up for now and call it a day, however just before shutting down, I finally noticed something very specific at the right side in the open Photoshop: the thumbnail showing there looked like a smart object (not quite, but close enough), not locked: 

 

post-13590-0-25447600-1441213881_thumb.png

 

So I took a look at menu | Layers and fair enough, found nothing available for merging, all greyed out. I could flatten though, which I did. Got some encouragement from the result at that point:

 

post-13590-0-84228300-1441213880_thumb.png

 

... and quite some more after saving: a consistent 97.7MB! Not quite perfect, but at least good enough for my purposes here.

 

 

 

So I now wonder. Is it indeed something like a smart object, maybe some specific function to create such a beast by default? Which is really pointless if you ask me, as AP itself does not offer it (yet?). Would it be possible to create layers in the PSD, one for each visible layer in AP? Any way, but not this thing. That would keep all options open, but make it a lot more acceptable, methinks.

I was thinking of a workaround of some kind, a ´Flatten Image´ macro, action or preferably preset on the export to PSD dialog doing it for me, with a checkbox to enable or disable; then I was stuck again. None of that exists in AP either, unless I´m much mistaking and just didn´t spot it yet?

Link to comment
Share on other sites

  • 1 year later...

I am new to Affinity Photo (Windows 10, AP v1.5.1.54) but have been a Photoshop user for more than 10 years.

 

I am just starting to use the program and was stunned when a file with pretty simple edits exploded by almost 6s. So I tried a very simple example. I loaded a RAW file (Panasonic FZ1000), made no changes, clicked the "develop" button and saved. The file size went from 23Mb to 135.8Mb (almost 5.9 times bigger).

 

This can't possibly be right...or if it is, there is a problem that needs some serious attention.

 

I see there has not been any activity on this thread for some time but it was the thread I found about this issue. It didn't seem that there was a resolution.

 

Help please.

David

Link to comment
Share on other sites

This can't possibly be right...or if it is, there is a problem that needs some serious attention.

It has been mentioned many times that the native Affinity file format is optimized for performance, not for file size. This includes pre-rendered views, various kinds of metadata, & other stuff they are not willing to go into detail about, some of which (I assume) enables the unique ability for different Affinity apps to share the same format.

 

Something else to consider is that there are dozens of RAW formats, most of which use some form of data compression (either lossless or lossy), which can increase 'developed' file sizes significantly. The compression is not necessarily optimized for performance, & may be poorly suited for general editing tasks (particularly when live, near realtime updates are desired), which is part of why Affinity sacrifices file size for performance.

 

Also, these days 150 MB or larger image files are not at all unusual. I have dozens of files from a Nikon 12 megapixel point & shoot camera that were saved to PSD format in Photoshop Elements, & they typically weigh in in the 1 to 2 hundred MB range. (Importing them into Affinity Photo & saving them in Affinity native format typically reduces the file size by 10 to 30% or sometimes more, so it is not as if Affinity's native file format is unusually inefficient in this respect.)

 

I realize that these file sizes seem large, but in the greater scheme of things, with typical hard drive capacities now in the ½ to several TB range, relatively speaking they are not -- after all, one TB is equal to one million MB. If your startup drive is a limited capacity SSD or just full of other stuff, that may still be an issue, but it is relatively inexpensive & quite easy to offload most of these large files to a large capacity external drive. Plus, even if access times are slower, Affinity's performance optimization (& efficient memory use) make this much less of an issue than it would be with (for example) Photoshop, which is so memory inefficient that it is often necessary to dedicate a second drive for additional scratch space just for it to be able to handle large image files without choking.

 

The bottom line is, as with so many other things, there is no way to optimize everything at the same time -- it just isn't possible. Affinity's developers chose not to optimize for small native file sizes for very sound reasons. If you must have that, you can export to tiff, but that also has tradeoffs, as will anything else.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

  • Staff

Just to go into a little more detail about what we do.

 

Our data format has to preserve pixel accuracy. What you edit has to be retrieved exactly after reopening your file. We do use compression when saving raster/pixel data, but it is lossless compression.  As such it does not compress with as high a ratio of other lossy forms (such as JPEG).  JPEG will always distort pixel values, and with higher compression ratios it also introduces visible artefacts.  Many people can live with this in the end file (to be used for web or print), but would not want it during sequential editing.

 

We did some research into the balance of compression processing time against size reduction and hit upon what we felt was the best ratio for general needs.  The reality is that using common compression methods there is a sweet spot, after which the increased processing overhead (and consequently time) yields smaller and smaller returns in size improvement. In a typical test we found that in order to achieve just 3-5% more compression, it could take twice as long to compress.

 

The problem with using lossy compression becomes apparent in sequential edit-save cycles where the artefacts caused by lossy compression will be compounded, making the image worse with each edit and save.

 

You will find the same effect when using Photoshop - the PSD format also uses lossless compression.  Open a heavily compressed JPEG and save it as a PSD, and you will see a massive difference in file size.  This is not uncommon or unexpected.

 

Affinity files will be larger than PSD files, however, as we order our data in a way that provides fast incremental saving and loading times.  This is something that should be apparent when comparing the two formats.  It allows our files to be much more scalable without the massive overhead involved. Since our saves are incremental we don't have to create the entire file every time we save.  This also means that auto-backup happens largely without you noticing it.

SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB
Link to comment
Share on other sites

Affinity files will be larger than PSD files, however, as we order our data in a way that provides fast incremental saving and loading times.

This does not always seem to be true, at least for most of the files I saved in PSD format using older versions of Photoshop Elements for Mac. These were all files I edited in PSE, adding filters, masks, & so on -- the same things I now do in Photo. After importing them into Photo & re-saving them as .afphoto files, it is not unusual for me to see a reduced file size, sometimes as much as 30%.

 

Some of this may be because on a few files I did some editing in AP that simplified the file structure in some way, or because I had set PSE to embed all possible Mac & Windows thumbnail & previews in the PSD's, but as best as I can remember I don't think I ever saw the .afphoto versions end up as larger than the .psd ones.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

All I know is Affinity Photo is not quite ready for prime time. I have not used it after the first week. Hope the developers can do something about the file size and other things holding back a product with great promise.

A bit ironic that you said "prime time." One of the several reasons I enjoy using AP is the responsiveness of the app, particularly for panning & zooming quickly with no stuttering, previewing filter effects & layer modes in near realtime, & the like. For me, this is where time is my prime concern, & where I find other apps lacking.

 

For that I will gladly live with larger file sizes.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

  • 7 months later...
On 3.2.2017 at 10:34 AM, Ben said:

We did some research into the balance of compression processing time against size reduction and hit upon what we felt was the best ratio for general needs.  The reality is that using common compression methods there is a sweet spot, after which the increased processing overhead (and consequently time) yields smaller and smaller returns in size improvement. In a typical test we found that in order to achieve just 3-5% more compression, it could take twice as long to compress.

http://www.zstd.net/

you surely considered different approaches just wanting to add this one stood somewhat out to me as already being used be many larger projects and with less dramatic falloff in compression gain vs processing time 

 

chinging something like this is probably a bit .... non trivial decision though so this is more of a long short 

 

 

Link to comment
Share on other sites

  • Staff

Thanks for this.

 

We did a lot of the compression work early on, but it has been written to allow it to be extended to new compression methods.  Looking at the figures, clearly it'll be worth us looking into this again.  Either ZStandard or LZFSE might be our next move. The timings for LZ4 look promising if the sacrifice of compression ratio is not too much.

 

Of course, timings and ratios are subjective.  I did all my testing using our own data format based on real life raster sources (or photos as normal people call them).  The numbers might look different with the sort of more random data patterns you get from images.  We already do a certain amount of work separating channels, tiling, and scanline prediction before compression, so it'll be interesting to see what further gains we could make using an alternative compression library.

 

 

SerifLabs team - Affinity Developer
  • Software engineer  -  Photographer  -  Guitarist  -  Philosopher
  • iMac 27" Retina 5K (Late 2015), 4.0GHz i7, AMD Radeon R9 M395
  • MacBook (Early 2015), 1.3GHz Core M, Intel HD 5300
  • iPad Pro 10.5", 256GB
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.