Summary: | JPEG display miscoloured after rendering | ||
---|---|---|---|
Product: | [Applications] gwenview | Reporter: | Lee Braiden <lee_b> |
Component: | general | Assignee: | Gwenview Bugs <gwenview-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | screenshot of rendering bug |
Description
Lee Braiden
2005-07-24 14:10:01 UTC
Created attachment 11904 [details]
screenshot of rendering bug
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. 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]) |