Version: 1.0.0-beta6 (using KDE 4.3.3) Compiler: gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.0.2) powerpc OS: Linux Installed from: Compiled From Sources On big-endian archs digikam does not save 16 bits images properly. Saving completes without errors, but when the image is loaded with any other program it looks scrabled.
Created attachment 38590 [details] Fix 16 bits PNG output on big-endian architectures. The attached patch fixes the bug I reported. It doesn't affect little-endian machines.
pochini, do you have an explanation why the loop after loading in pngloader.cpp, 449-461, works on big endian? Isn't it swapping from network byte order to little endian?
SVN commit 1064297 by mwiesweg: Fix PNG saving on big endian, patch from pochini@shiny.it BUG: 215752 M +2 -1 NEWS M +44 -31 libs/dimg/loaders/pngloader.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1064297
Created attachment 39198 [details] 16 bits PNG loader fix
(In reply to comment #2) > pochini, do you have an explanation why the loop after loading in > pngloader.cpp, 449-461, works on big endian? Isn't it swapping from network > byte order to little endian? Yes... it doesn't work. Sorry, I didn't test 16 bits PNG loading. I've just uploaded a patch that fixes it too.
SVN commit 1064788 by mwiesweg: Fix 16bit PNG loading on Big Endian, thanks to pochini@shiny.it CCBUG: 215752 M +17 -14 pngloader.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1064788