Bug 333081

Summary: Saving a two-layer EXR image reverses the order of layers on loading
Product: [Applications] krita Reporter: Dmitry Kazakov <dimula73>
Component: File formatsAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dmitry Kazakov 2014-04-04 17:41:54 UTC
1) Open candleglass.exr
2) Add a BG layer
3) Save
4) Open
5) The layers are reversed
Comment 1 Dmitry Kazakov 2014-04-05 19:16:27 UTC
Seems like somewhere internally when saving, the layers get sorted alphabetically! Nonesense! :(
Comment 2 Dmitry Kazakov 2014-04-10 11:53:27 UTC
Git commit f979974f6f1a194060f498e9f861685a188c691d by Dmitry Kazakov.
Committed on 10/04/2014 at 08:41.
Pushed by dkazakov into branch 'master'.

Added support to save layer attributes and order into EXR

Now we save a special EXR string attribute 'krita_layers_info' that
stores attributes and order of the Krita layers. We cannot do it by means
of EXR itself since the EXR standard does *not* define any compositioning
or ordering rules of the containing layers. So we do it ourselves.

M  +10   -0    krita/image/kis_types.h
M  +2    -0    krita/plugins/formats/exr/CMakeLists.txt
M  +107  -8    krita/plugins/formats/exr/exr_converter.cc
A  +22   -0    krita/plugins/formats/exr/exr_extra_tags.cpp     [License: GPL (v2+)]
A  +26   -0    krita/plugins/formats/exr/exr_extra_tags.h     [License: GPL (v2+)]
A  +176  -0    krita/plugins/formats/exr/kis_exr_layers_sorter.cpp     [License: GPL (v2+)]
A  +39   -0    krita/plugins/formats/exr/kis_exr_layers_sorter.h     [License: GPL (v2+)]
M  +63   -7    krita/ui/kra/kis_kra_savexml_visitor.cpp
M  +7    -0    krita/ui/kra/kis_kra_savexml_visitor.h

http://commits.kde.org/calligra/f979974f6f1a194060f498e9f861685a188c691d