[krita] [Bug 423741] Saving to ORA is broken

2020-07-04 Thread Tymond
https://bugs.kde.org/show_bug.cgi?id=423741

Tymond  changed:

   What|Removed |Added

  Latest Commit|https://invent.kde.org/grap |https://invent.kde.org/grap
   |hics/krita/commit/ca26fdaa7 |hics/krita/commit/ff8657729
   |2cd038173200f5114720b0f595b |0ffe77e0304141a375e9b6a8fcd
   |56b9|7a22

--- Comment #17 from Tymond  ---
Git commit ff86577290ffe77e0304141a375e9b6a8fcd7a22 by Agata Cacko.
Committed on 04/07/2020 at 21:32.
Pushed by tymond into branch 'krita/4.3.0'.

Fix saving broken .ora file in case of empty layer

Before this commit, saving an empty layer to .ora would result in a
broken file because the result PNG for the layer would be 0x0.
This commit artificially increases the size of the layer with one pixel
when the layer is empty to make sure there is some data (even if
invisible) to save to PNG file.

M  +6-0plugins/impex/ora/kis_open_raster_stack_save_visitor.cpp

https://invent.kde.org/graphics/krita/commit/ff86577290ffe77e0304141a375e9b6a8fcd7a22

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-04 Thread Manga Tengu
https://bugs.kde.org/show_bug.cgi?id=423741

--- Comment #16 from Manga Tengu  ---
Sure will do ! Thank you ! :-)

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-04 Thread Tymond
https://bugs.kde.org/show_bug.cgi?id=423741

Tymond  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REOPENED|RESOLVED

--- Comment #15 from Tymond  ---
@MangaTengu - I can reproduce it in 4.3.0 but I cannot reproduce it after my
changes (and InkLab's), so I think I (and/or them) fixed it :) (It's definitely
a matter of incorrect bounds). Please download the next stable version and
check if it's correct.

And yes, this corruption looks similar to the original corrupted file (messed
up x and y), so I guess we can leave it fixed (unless you find some files that
contradicts my conclusions in the Krita version after my changes).

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-04 Thread Manga Tengu
https://bugs.kde.org/show_bug.cgi?id=423741

Manga Tengu  changed:

   What|Removed |Added

 Resolution|FIXED   |---
 Status|RESOLVED|REOPENED

--- Comment #14 from Manga Tengu  ---
I linked 2 files 
myHouse.kra
myHouse.ora

I have nailed the reproduction a bit better: you need to crop the file before
exporting it to ora. Then you will see the ora file cropped even more and left
an empty gap

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-04 Thread Manga Tengu
https://bugs.kde.org/show_bug.cgi?id=423741

--- Comment #13 from Manga Tengu  ---
Created attachment 129902
  --> https://bugs.kde.org/attachment.cgi?id=129902=edit
an ora file after a kra file that has been cropped

you can see there is data loss

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-04 Thread Manga Tengu
https://bugs.kde.org/show_bug.cgi?id=423741

--- Comment #12 from Manga Tengu  ---
Created attachment 129901
  --> https://bugs.kde.org/attachment.cgi?id=129901=edit
a kra file that has been cropped at a moment

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-04 Thread Tymond
https://bugs.kde.org/show_bug.cgi?id=423741

--- Comment #11 from Tymond  ---
Git commit 28827e81f5a1eee5326319cc7d05e3879fbfd0c1 by Agata Cacko.
Committed on 04/07/2020 at 20:17.
Pushed by tymond into branch 'krita/4.3'.

Don't save fake nodes in .ora files

Before this commit, Krita would try to save reference images layer into
.ora files. Since reference images layer doesn't have any projection
(and the name for the layer is 'No Name'...), it would result in a ghost
new layer on top of the layer stack called 'No Name'.
Since there is no projection nor other information, there is no point
in saving it to .ora files.
This commit omits reference images layer (and other fake nodes)
when saving to .ora.


(cherry picked from commit 0401b14169964fcb69dc04cc613f6a9ef04ec3ea)

M  +4-0plugins/impex/ora/kis_open_raster_stack_save_visitor.cpp

https://invent.kde.org/graphics/krita/commit/28827e81f5a1eee5326319cc7d05e3879fbfd0c1

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-04 Thread Tymond
https://bugs.kde.org/show_bug.cgi?id=423741

Tymond  changed:

   What|Removed |Added

  Latest Commit|https://invent.kde.org/grap |https://invent.kde.org/grap
   |hics/krita/commit/925bf97f8 |hics/krita/commit/ca26fdaa7
   |d4ed1101267fd86d99536069a05 |2cd038173200f5114720b0f595b
   |f969|56b9

--- Comment #10 from Tymond  ---
Git commit ca26fdaa72cd038173200f5114720b0f595b56b9 by Agata Cacko.
Committed on 04/07/2020 at 20:16.
Pushed by tymond into branch 'krita/4.3'.

Fix saving broken .ora file in case of empty layer

Before this commit, saving an empty layer to .ora would result in a
broken file because the result PNG for the layer would be 0x0.
This commit artificially increases the size of the layer with one pixel
when the layer is empty to make sure there is some data (even if
invisible) to save to PNG file.


(cherry picked from commit 925bf97f8d4ed1101267fd86d99536069a05f969)

M  +6-0plugins/impex/ora/kis_open_raster_stack_save_visitor.cpp

https://invent.kde.org/graphics/krita/commit/ca26fdaa72cd038173200f5114720b0f595b56b9

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-04 Thread Tymond
https://bugs.kde.org/show_bug.cgi?id=423741

--- Comment #9 from Tymond  ---
Note: while I fixed Boud's issue and I cannot reproduce any visible issue with
the following files:
- `hylti` from bug 423741 (this one)
- `input.kra` version 1 from bug 423088 comment 0
- `input.kra` version 2 from bug 423088 comment 1
- `input.kra` version 2 from bug 423088 comment 3
(bug 423088 was related)
in all three: Krita, Gimp and MyPaint, I didn't find and fix any reason for the
damage that @Manga Tengu experienced. 
So please, if it happens again and you have a proper .kra file to see the
damage, reopen this bug report and attach the .kra file that results in a
broken .ora file.

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-04 Thread Tymond
https://bugs.kde.org/show_bug.cgi?id=423741

Tymond  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
  Latest Commit||https://invent.kde.org/grap
   ||hics/krita/commit/925bf97f8
   ||d4ed1101267fd86d99536069a05
   ||f969

--- Comment #7 from Tymond  ---
Git commit 925bf97f8d4ed1101267fd86d99536069a05f969 by Agata Cacko.
Committed on 04/07/2020 at 17:33.
Pushed by tymond into branch 'master'.

Fix saving broken .ora file in case of empty layer

Before this commit, saving an empty layer to .ora would result in a
broken file because the result PNG for the layer would be 0x0.
This commit artificially increases the size of the layer with one pixel
when the layer is empty to make sure there is some data (even if
invisible) to save to PNG file.

M  +6-0plugins/impex/ora/kis_open_raster_stack_save_visitor.cpp

https://invent.kde.org/graphics/krita/commit/925bf97f8d4ed1101267fd86d99536069a05f969

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-04 Thread Tymond
https://bugs.kde.org/show_bug.cgi?id=423741

Tymond  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
  Latest Commit||https://invent.kde.org/grap
   ||hics/krita/commit/925bf97f8
   ||d4ed1101267fd86d99536069a05
   ||f969

--- Comment #7 from Tymond  ---
Git commit 925bf97f8d4ed1101267fd86d99536069a05f969 by Agata Cacko.
Committed on 04/07/2020 at 17:33.
Pushed by tymond into branch 'master'.

Fix saving broken .ora file in case of empty layer

Before this commit, saving an empty layer to .ora would result in a
broken file because the result PNG for the layer would be 0x0.
This commit artificially increases the size of the layer with one pixel
when the layer is empty to make sure there is some data (even if
invisible) to save to PNG file.

M  +6-0plugins/impex/ora/kis_open_raster_stack_save_visitor.cpp

https://invent.kde.org/graphics/krita/commit/925bf97f8d4ed1101267fd86d99536069a05f969

--- Comment #8 from Tymond  ---
Git commit 0401b14169964fcb69dc04cc613f6a9ef04ec3ea by Agata Cacko.
Committed on 04/07/2020 at 17:33.
Pushed by tymond into branch 'master'.

Don't save fake nodes in .ora files

Before this commit, Krita would try to save reference images layer into
.ora files. Since reference images layer doesn't have any projection
(and the name for the layer is 'No Name'...), it would result in a ghost
new layer on top of the layer stack called 'No Name'.
Since there is no projection nor other information, there is no point
in saving it to .ora files.
This commit omits reference images layer (and other fake nodes)
when saving to .ora.

M  +4-0plugins/impex/ora/kis_open_raster_stack_save_visitor.cpp

https://invent.kde.org/graphics/krita/commit/0401b14169964fcb69dc04cc613f6a9ef04ec3ea

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-01 Thread Boudewijn Rempt
https://bugs.kde.org/show_bug.cgi?id=423741

Boudewijn Rempt  changed:

   What|Removed |Added

   Assignee|krita-bugs-n...@kde.org |tamtamy.tym...@gmail.com
 Status|CONFIRMED   |ASSIGNED

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-01 Thread Boudewijn Rempt
https://bugs.kde.org/show_bug.cgi?id=423741

--- Comment #6 from Boudewijn Rempt  ---
My broken file and the source kra are here:

https://www.dropbox.com/s/ab1vpg9q8gt594z/broken_ora.ora?dl=0
https://www.dropbox.com/s/euj549z9ba1fh3w/hylti_p28_0002.kra?dl=0

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-01 Thread Boudewijn Rempt
https://bugs.kde.org/show_bug.cgi?id=423741

--- Comment #5 from Boudewijn Rempt  ---
* I was able to reproduce a broken with the krita/4.3 branch
* It doesn't look like a problem with calculating the end projection, because
that's fine in Manga Tengu's test file, though it was broken in mine.

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-01 Thread Manga Tengu
https://bugs.kde.org/show_bug.cgi?id=423741

--- Comment #4 from Manga Tengu  ---
since it's empty, the file was super light :D

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-01 Thread Manga Tengu
https://bugs.kde.org/show_bug.cgi?id=423741

--- Comment #3 from Manga Tengu  ---
Created attachment 129815
  --> https://bugs.kde.org/attachment.cgi?id=129815=edit
my original corrupted file

Sure! Here you go!

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-01 Thread Boudewijn Rempt
https://bugs.kde.org/show_bug.cgi?id=423741

--- Comment #2 from Boudewijn Rempt  ---
Oh, and can you attach one of the krita files that saved as a broken file as
well, or make a link so I can download them?

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 423741] Saving to ORA is broken

2020-07-01 Thread Boudewijn Rempt
https://bugs.kde.org/show_bug.cgi?id=423741

Boudewijn Rempt  changed:

   What|Removed |Added

 Status|REPORTED|CONFIRMED
   Severity|normal  |critical
 CC||b...@valdyas.org
 Ever confirmed|0   |1

--- Comment #1 from Boudewijn Rempt  ---
* This is only about ora, right? Not .kra like you say in the first page?
* Could you start Krita from Terminal.app like
/Applications/krita/MacOS/Content/krita (or was it
/Applications/krita/Content/MacOS/krita ?) and check whether there are errors
like this:

libpng warning: Image width is zero in IHDR
libpng warning: Image height is zero in IHDR
libpng error: Invalid IHDR data

I have just checked by saving a complex .kra file as ora, and one layer was
invalid and both the mergedimage.png and the preview.png seemed corrupt.

-- 
You are receiving this mail because:
You are watching all bug changes.