D25267: Improve XCF support

2020-04-15 Thread Christoph Feck
cfeck added a comment.


  Thanks for your work, Martin! Could you please add a note (or resolve) bug 
360821?

REPOSITORY
  R287 KImageFormats

REVISION DETAIL
  https://phabricator.kde.org/D25267

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: ngraham, kde-frameworks-devel, LeGast00n, cblack, michaelh, bruns


D25267: Improve XCF support

2020-04-15 Thread Martin Tobias Holmedahl Sandsmark
sandsmark added a comment.


  There, build fixed and all tests pass on msvc.

REPOSITORY
  R287 KImageFormats

REVISION DETAIL
  https://phabricator.kde.org/D25267

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: ngraham, kde-frameworks-devel, LeGast00n, cblack, michaelh, bruns


D25267: Improve XCF support

2020-04-14 Thread Albert Astals Cid
aacid added a comment.


  In D25267#647547 , @sandsmark 
wrote:
  
  > In D25267#647148 , @aacid wrote:
  >
  > > Seems like the windows build is broken :/
  > >
  > > 
https://build.kde.org/job/Frameworks/job/kimageformats/job/kf5-qt5%20WindowsMSVCQt5.14/16/console
  >
  >
  > Seems like I forgot to use the custom rand_r (to avoid exactly that + get 
the same noise function as windows) a couple of places.
  >
  > Should just be to replace `rand_r` with `RandomTable::rand_r` where it is 
missing, okay if I just do that in master?
  
  
  Yeah fixing that directly in master makes sense

REPOSITORY
  R287 KImageFormats

REVISION DETAIL
  https://phabricator.kde.org/D25267

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: ngraham, kde-frameworks-devel, LeGast00n, cblack, michaelh, bruns


D25267: Improve XCF support

2020-04-13 Thread Martin Tobias Holmedahl Sandsmark
sandsmark added a comment.


  In D25267#647148 , @aacid wrote:
  
  > Seems like the windows build is broken :/
  >
  > 
https://build.kde.org/job/Frameworks/job/kimageformats/job/kf5-qt5%20WindowsMSVCQt5.14/16/console
  
  
  Seems like I forgot to use the custom rand_r (to avoid exactly that + get the 
same noise function as windows) a couple of places.
  
  Should just be to replace `rand_r` with `RandomTable::rand_r` where it is 
missing, okay if I just do that in master?

REPOSITORY
  R287 KImageFormats

REVISION DETAIL
  https://phabricator.kde.org/D25267

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: ngraham, kde-frameworks-devel, LeGast00n, cblack, michaelh, bruns


D25267: Improve XCF support

2020-04-13 Thread Albert Astals Cid
aacid added a comment.


  In D25267#647129 , @sandsmark 
wrote:
  
  > I messed up and it got linked to the wrong phabricator review... Here it is 
anyways:
  >
  > 
https://cgit.kde.org/kimageformats.git/commit/?id=c60e77c048d32ccf743cec695743b77b2b25dc87
  
  
  Seems like the windows build is broken :/
  
  
https://build.kde.org/job/Frameworks/job/kimageformats/job/kf5-qt5%20WindowsMSVCQt5.14/16/console

REPOSITORY
  R287 KImageFormats

REVISION DETAIL
  https://phabricator.kde.org/D25267

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: ngraham, kde-frameworks-devel, LeGast00n, cblack, michaelh, bruns


D25267: Improve XCF support

2020-04-13 Thread Martin Tobias Holmedahl Sandsmark
sandsmark abandoned this revision.
sandsmark added a comment.


  I messed up and it got linked to the wrong phabricator review... Here it is 
anyways:
  
  
https://cgit.kde.org/kimageformats.git/commit/?id=c60e77c048d32ccf743cec695743b77b2b25dc87

REPOSITORY
  R287 KImageFormats

REVISION DETAIL
  https://phabricator.kde.org/D25267

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: ngraham, kde-frameworks-devel, LeGast00n, cblack, michaelh, bruns


D25267: Improve XCF support

2020-04-12 Thread Albert Astals Cid
aacid added a comment.


  the files are not uploaded correctly to phabricator so i can't check they 
work.
  
  Given we just released KF 5.69 *yesterday* i'm going to go crazy and say 
commit this and we have a "whole month" to fix regressions if it has any...

REPOSITORY
  R287 KImageFormats

REVISION DETAIL
  https://phabricator.kde.org/D25267

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D25267: Improve XCF support

2020-04-12 Thread Martin Tobias Holmedahl Sandsmark
sandsmark updated this revision to Diff 79925.
sandsmark added a comment.


  Fixed the layer composition modes, so now my fruit pilot got colors.
  
  Now I think this is fairly complete, it should support most "normal" XCF 
files (as opposed to before, the current master only supports v0 files).

REPOSITORY
  R287 KImageFormats

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25267?vs=79924=79925

REVISION DETAIL
  https://phabricator.kde.org/D25267

AFFECTED FILES
  CMakeLists.txt
  autotests/read/xcf/fruktpilot.png
  autotests/read/xcf/fruktpilot.xcf
  src/imageformats/gimp_p.h
  src/imageformats/xcf.cpp

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D25267: Improve XCF support

2020-04-12 Thread Martin Tobias Holmedahl Sandsmark
sandsmark updated this revision to Diff 79924.
sandsmark added a comment.


  Implemented the last few properties that were missing for my beautiful XCF 
(not actually using them, though, I'm not in the mood to implement blending in 
the LAB color space).

REPOSITORY
  R287 KImageFormats

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25267?vs=79920=79924

REVISION DETAIL
  https://phabricator.kde.org/D25267

AFFECTED FILES
  CMakeLists.txt
  autotests/read/xcf/fruktpilot.png
  autotests/read/xcf/fruktpilot.xcf
  src/imageformats/gimp_p.h
  src/imageformats/xcf.cpp

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D25267: Improve XCF support

2020-04-12 Thread Martin Tobias Holmedahl Sandsmark
sandsmark updated this revision to Diff 79920.
sandsmark added a comment.


  Added test files (my own beautiful drawing).

REPOSITORY
  R287 KImageFormats

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25267?vs=69618=79920

REVISION DETAIL
  https://phabricator.kde.org/D25267

AFFECTED FILES
  CMakeLists.txt
  autotests/read/xcf/fruktpilot.png
  autotests/read/xcf/fruktpilot.xcf
  src/imageformats/gimp_p.h
  src/imageformats/xcf.cpp

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D25267: Improve XCF support

2019-11-12 Thread Albert Astals Cid
aacid added a comment.


  this very much needs test files :)

REPOSITORY
  R287 KImageFormats

REVISION DETAIL
  https://phabricator.kde.org/D25267

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25267: Improve XCF support

2019-11-11 Thread Martin Tobias Holmedahl Sandsmark
sandsmark updated this revision to Diff 69618.
sandsmark added a comment.


  Fixed masks as well, now even some more complex XCF files work again.

REPOSITORY
  R287 KImageFormats

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25267?vs=69617=69618

REVISION DETAIL
  https://phabricator.kde.org/D25267

AFFECTED FILES
  src/imageformats/gimp_p.h
  src/imageformats/xcf.cpp

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25267: Improve XCF support

2019-11-11 Thread Martin Tobias Holmedahl Sandsmark
sandsmark updated this revision to Diff 69617.
sandsmark added a comment.


  Forgot to fix the layer offset reading, and read the precision after instead 
of before the image properties

REPOSITORY
  R287 KImageFormats

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D25267?vs=69616=69617

REVISION DETAIL
  https://phabricator.kde.org/D25267

AFFECTED FILES
  src/imageformats/gimp_p.h
  src/imageformats/xcf.cpp

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns


D25267: Improve XCF support

2019-11-11 Thread Martin Tobias Holmedahl Sandsmark
sandsmark created this revision.
sandsmark added reviewers: aacid, cfeck, apol, vkrause.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
sandsmark requested review of this revision.

REVISION SUMMARY
  Now it can at least handle the simplest XCF files I have.
  
  Biggest difference seems to be that they changed to 64bit for offsets from 
version 11 and upwards.
  
  Still some issues with more complex layers (aka. not completely plain 
images), but this is better than nothing.

TEST PLAN
  Tested with some simple XCFs I had laying around that didn't get thumbnails 
earlier.

REPOSITORY
  R287 KImageFormats

REVISION DETAIL
  https://phabricator.kde.org/D25267

AFFECTED FILES
  src/imageformats/gimp_p.h
  src/imageformats/xcf.cpp

To: sandsmark, aacid, cfeck, apol, vkrause
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns