Bug 109554 - JPEG display miscoloured after rendering
Summary: JPEG display miscoloured after rendering
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-24 14:10 UTC by Lee Braiden
Modified: 2012-10-19 13:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot of rendering bug (375.69 KB, image/png)
2005-07-24 14:12 UTC, Lee Braiden
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lee Braiden 2005-07-24 14:10:01 UTC
Version:           1.2.0 (using KDE KDE 3.4.0)
Installed from:    Unlisted Binary Package
OS:                Linux

When viewing an image via gwenview (ie, in the main app's full view, preview and thumbnails, and also embedded in konqueror), the image downloads and decodes/renders in progressive "blocks" as normal, but when finally drawn, there seems to be a second stage (smoothing or something, I suppose?) which then renders from top-to-bottom again.  This stage incorrectly changes the colours, leaving most images with a yellowish tint.  

Occasionally, this stage will leave non-yellow bands, which have a artifacts of a bluish tint instead.  When this banding occurs, covering the window with another window, then uncovering (ie, alt-tabbing) will re-draw this image in a different way, with the banding in a different place, and with different artifacts.

Note that this is on a PPC Kubuntu "Hoary" distro (iBook2/500Mhz, Rage Mobility M3 chipset).
Comment 1 Lee Braiden 2005-07-24 14:12:15 UTC
Created attachment 11904 [details]
screenshot of rendering bug
Comment 2 Lee Braiden 2005-07-24 14:16:39 UTC
Note: this also happens on the PNG attachment I just submitted (though apparently not on smaller PNGs, or indeed smaller JPGs).

When I choose the embedded image viewer component rather than gwenview's in konqueror, all of these images display just fine.
Comment 3 Aurelien Gateau 2005-07-24 23:00:27 UTC
This bug has been fixed in version 1.2.91. If you prefer to use 1.2.0, apply this patch on gvimageutils/scale.cpp :

Index: scale.cpp
===================================================================
--- scale.cpp   (revision 403496)
+++ scale.cpp   (revision 403497)
@@ -944,10 +944,17 @@

 // FIXME: replace with mRed, etc... These work on pointers to pixels, not
 // pixel values
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+#define A_VAL(p) ((unsigned char *)(p))[0]
+#define R_VAL(p) ((unsigned char *)(p))[1]
+#define G_VAL(p) ((unsigned char *)(p))[2]
+#define B_VAL(p) ((unsigned char *)(p))[3]
+#elif Q_BYTE_ORDER == Q_LITTLE_ENDIAN
 #define A_VAL(p) ((unsigned char *)(p))[3]
 #define R_VAL(p) ((unsigned char *)(p))[2]
 #define G_VAL(p) ((unsigned char *)(p))[1]
 #define B_VAL(p) ((unsigned char *)(p))[0]
+#endif

 #define INV_XAP                   (256 - xapoints[x])
 #define XAP                       (xapoints[x])