This forum has been archived. All content is frozen. Please use KDE Discuss instead.

will I lose information when saving from KRA to PNG?

Tags: None
(comma "," separated)
swapjim
Registered Member
Posts
3
Karma
0
I've downloaded a KRA file which has a few layers. I don't mind losing the layers by merging them, and would like to save space, so I'm about to convert it to PNG. By converting, will I be losing any other information besides layers?

If anyone's is curious, this is the file:

http://www.peppercarrot.com/0_sources/e ... Flight.zip

Unfortunately, it's 75MB as it contains 6 hi-res KRA files.
User avatar
artur89sd
Registered Member
Posts
121
Karma
1
OS
KRA files are ZIP archives. Inside of each KRA file there is already a PNG file containing all layers merged together.
You just need to rename it to .zip and you will be able to open is as a normal ZIP file. the PNG is called "mergedimage.png".

Exporting it to PNG should not loose any color information as PNG compression is lossless. Except if you change the color depth at conversion.
swapjim
Registered Member
Posts
3
Karma
0
Since I converted around to 50 files, I wrote a script that used this line to do the conversion:

Code: Select all
krita.exe image.kra --export --export-filename image.png


I'm assuming this doesn't change the color depth, yes?
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS
Pepper and Carrot is done in 8 bits rgb, so that is safe. In general, PNG can handle:

* 8 and 16 bits RGB
* 8 and 16 bits Grayscale
* Transparency
* ICC profiles (linear and non-linear gamma)

And nothing else. Browsers and other applications will be confused, especially when colord is running, if the image contains and icc profile, is 16 bits, has linear gamma, is not tagged as sRGB if RGB. Krita 3.2 probably will contain my latest work on saving images: a system that warns you for every feature that your image uses that is missing in the save format.
swapjim
Registered Member
Posts
3
Karma
0
That feature sounds great! Will we get that in command line too?
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS
I wasn't intending to... But I can easily print the info out to stderr.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]