Summary: | Endianness bug saving 16 bits images [patch] | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | pochini |
Component: | DImg-Core | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles, marcel.wiesweg, pochini |
Priority: | NOR | ||
Version: | 1.0.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 1.0.0 | |
Sentry Crash Report: | |||
Attachments: |
Fix 16 bits PNG output on big-endian architectures.
16 bits PNG loader fix |
Description
pochini
2009-11-22 22:39:28 UTC
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 |