I noticed that when I save a kra document, it stores the visible result in full-res. For example if I have a large image inserted as a linked file layer, if I hide it, the resulting kra will be only a few kilobytes large but if I don’t hide it, it will be hundreds of megabytes large.
I need to keep my files light and I never want to store that visible part, so at the moment I just always group all the layers in a group that I hide right before saving but sometimes I forget to do it. If there was an option to disable the storage of the visible result in the general settings, I wouldn’t have to worry about that anymore.
No, I don’t think there’s a such option.
I have the same problem, but on my side I prefer to keep preview of visible part
One solution, rather than removing preview from kra file would be to save embedded preview as jpeg instead of png (reduced size and faster to save)
But this have to be discussed with developers because this is an heavy change in file format and can result with incompatibility for third party software (or for users that would like to send a kra file to another user for which Krita version is not able to read file…)
That would also break many batch scripts which rely on the PNG preview. Many people including me and I think @Deevad, use this preview PNG to process images and export artworks in batch. The kra file is just a zip, so we unzip it and extract this PNG and then export it to other formats using imagemgick
Yes I know, I already work like this by myself too
After changing scripts/plugins to read preview.png or preview.jpeg is not a big work for people who have implemented their own solutions.
It’s more for third party softwares that are currently able to read kra file through preview file that problem will occur: it can take time before change are taken in account (if they’re taken in account)
But for my own usage, a preview as jpeg file rather than png file would be a nice option, to gain place on disk AND to speedup file saving
And for @ChameleonScales case, option to not have preview file will decrease file size and speedup radically time need to save a file.
It’s not only my scripts; but also now Scribus, viewer like Nomacs, Gwenview and more software who are interested how to open/edit at least a flat projection of a Krita files.
Making it JPG would be destructive and while supporting the previewing aspect, it would break all editing/inserting for Scribus or video editing tools. So, better to keep it PNG lossless.
What I could see; a feature request for being able to save a project with crunching those extra features; with another file extension like *.krz maybe, compressing to max the zip container and not getting mergedimage.png. It could be interesting for long time archiving a project and backup.
In the File handling section of the setting there are options for compressing large files, I think it can have the option to make it “.krz” with jpeg or may be combining the jpeg option into existing compress large files option may work.
Yes I know.
That’s why I’m talking about an option, like we currently have option on PNG/JPEG file saving about compression level and/or internal storage properties.
And I know that for third party software it can take time before being able to take in account change.
With option to save preview as jpeg (or no preview) I was just thinking about personal useage.
(default option would be like today: png preview file)
But Idea of a .krz extension is good; with an alternate file extension, people won’t ask why their kra file are not properly recognized by third party software if they use option of an internal jpeg preview…
Actually, for performance and space reasons we don’t store the mergedimage in autosave kra files, so the code for that is already there. It’s not an option (either global, or on saving to kra) because I’ve always been afraid of handling support load.
I like it a lot too because then we could in theory have a simple bash command to convert all the kra projects into krz recursively from the terminal, which would be very handy for archiving.
I remember on a topic (not able to find it) that previously you tried to find the best ratio compression/speed (and set compression level to 3 if I remember well - or maybe it was only for png merged preview? )
Is the compression here is still 3? or is the compression level has been set to its maximum (9)?
I tried to take a look to commit but i did see where this compression level option is set
I think for a krz file, size is the priority, not saving speed and then compression level should be the maximum
But if krz file format is dedicated to be an archive file, the most compression level you use, the smallest file size you get.
And that was just a question.
But doing some tests, maximum compression level applied on a kra file (without merged preview) is not so smallest than a file with a lower compression level.
Probably due to LZW compression already applied on layer’s tiles…
Yes, changing the zip level compression to anything other than Z_DEFAULT_COMPRESSION doesn’t do much good : the first file is default, the second file is “best” – same image, same data…
-rw-r–r-- 1 boud boud 189677 Feb 12 12:32 bla.kra
-rw-r–r-- 1 boud boud 189687 Feb 12 12:34 bla2.kra