Bug 321106

Summary: Exporting to .ora fileformat forces the ppi to 72x72
Product: [Applications] krita Reporter: Jens Reuterberg <ohyran>
Component: File formatsAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: dimula73, halla
Priority: NOR    
Version: 2.5.5   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: The patch adds the resolution information to the xml file of the ORA.

Description Jens Reuterberg 2013-06-13 11:48:34 UTC
I exported the kra files to ORA since I wanted to open them in Gimp to add text. The original files where 300x300 ppi but when I opened the ora files in Gimp they where 72x72. There where no choices to specify the ppi settings and it didn't force the 300x300 setting either.

Reproducible: Always

Steps to Reproduce:
1. Save a 300x300 ppi KRA file
2. Export to .ora
3. Open .ora file and check the image properties
Actual Results:  
The file is 72x72 ppi 

Expected Results:  
Either force the original ppi onto the .ora file as well or allow for a setting where the ppi can be specified.

There are ways around it though - you can export it as something else instead of .ora but considering how versatile .ora are (since most programs accept the file format) it would be good not to have to.
Comment 1 Halla Rempt 2013-06-21 09:07:08 UTC
Hrm... OpenRaster doesn't specifiy a resolution, probably because mypaint doesn't support that. Let's see... The embedded png files should have the right resolution in any case.
Comment 2 Halla Rempt 2013-06-21 09:27:01 UTC
Git commit f36f18f946228461a80495e1bc02bb277644526e by Boudewijn Rempt.
Committed on 21/06/2013 at 09:21.
Pushed by rempt into branch 'master'.

Load the resultion information from the embedded PNG images

Now Krita can roundtrip the resolution information in ora files,
but other apps will still reset that to 72 DPI. We need to extend
OpenRaster for this.

M  +3    -4    krita/plugins/formats/ora/ora_load_context.cc
M  +4    -1    krita/plugins/formats/ora/ora_load_context.h
M  +1    -1    krita/ui/ora/kis_open_raster_load_context.h
M  +8    -2    krita/ui/ora/kis_open_raster_stack_load_visitor.cpp

http://commits.kde.org/calligra/f36f18f946228461a80495e1bc02bb277644526e
Comment 3 Halla Rempt 2013-06-21 09:27:36 UTC
Mailed http://lists.freedesktop.org/mailman/listinfo/create about extending the spec.
Comment 4 Halla Rempt 2013-08-20 12:07:05 UTC
*** Bug 323769 has been marked as a duplicate of this bug. ***
Comment 5 Sahil 2014-02-21 12:38:41 UTC
Created attachment 85260 [details]
The patch adds the resolution information to the xml file of the ORA.

Krita, now saves the X resolution ( "xres" ) and the Y resolution ("yres") in the stack.xml file of the ORA, while saving the file. And, while loading the .ora file, it searches for "xres" and the "yres" information in the stack.xml file. if found the value of resolution is set to the corresponding values of resolution else the The default value that is 75 ppi is set as the resolution.
Comment 6 Halla Rempt 2014-02-21 13:28:27 UTC
Git commit 32d1b40c05568fe00a17e41d2408475501dc9645 by Boudewijn Rempt.
Committed on 21/02/2014 at 13:27.
Pushed by rempt into branch 'master'.

Save resolution info in .ora files

Patch by Sahil Nagpal
CCMAIL:nagpal.sahil01@gmail.com

M  +14   -3    krita/ui/ora/kis_open_raster_stack_load_visitor.cpp
M  +6    -0    krita/ui/ora/kis_open_raster_stack_save_visitor.cpp

http://commits.kde.org/calligra/32d1b40c05568fe00a17e41d2408475501dc9645
Comment 7 Halla Rempt 2014-02-21 13:28:38 UTC
Git commit eacedef701deaa57b6544bbb6400c6e9ec881fb0 by Boudewijn Rempt.
Committed on 21/02/2014 at 13:27.
Pushed by rempt into branch 'calligra/2.8'.

Save resolution info in .ora files

Patch by Sahil Nagpal
CCMAIL:nagpal.sahil01@gmail.com

M  +14   -3    krita/ui/ora/kis_open_raster_stack_load_visitor.cpp
M  +6    -0    krita/ui/ora/kis_open_raster_stack_save_visitor.cpp

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