Colors in 1.1.0 again (Was Re: [Scribus] strange text display)
Sun Sep 28 14:00:09 CEST 2003
Peter Linnell wrote:
> I think the new rendering engine is the single best improvement to
> Scribus since its launch and I have been using Scribus since 0.3.7
While this is true for text, there is still the big problem on MacOSX
(and I suspect on other big-endian systems) with wrong screen colors.
How can I debug this? First of all, it would be interesting to see
whether everything works on other big-endian architectures, yellowdog
linux on the ppc, debian/ppc, sparc linux etc.
Then I would like to know how to find out whether this is scribus'
problem or a problem with my version of libart.
I have managed to find a hack that gives correct colors for filled
rectangles, but I haven't yet found where to tweak the sources to get
correct colors for included pictures. For the filled rectangles,
patching the function art_rgb_fill_run_() in scribus/art_rgb.c by
reversing the byte order in the rgb variable did the trick.
To recall the problem, I made a test file with some arbitrary foto
imported from a jpg file and put some rectangles underneath whose
background I set to the main colors. I mad 3 screenshots (170kB jpg)
comparing various scribus versions (on the right) of this file with the
Adobe Reader rendering (on the left) of the same file saved as pdf:
1. Scribus-1.0.1: No problem here http://perso.wanadoo.fr/costabel/Scr2.jpg
2. Scribus-1.1.0: Wrong colors. The foto seems to show the same symptoms
as the filled rectangles: Red is shown as black and blue and green are
3. Hacked scribus-1.1.0: In the above-mentioned function, I added the
following patch (not intended as bugfix, only as a diagnostic tool):
# diff -u scribus/art_rgb.c~ scribus/art_rgb.c
--- scribus/art_rgb.c~ Sat Sep 27 21:54:46 2003
+++ scribus/art_rgb.c Sun Sep 28 01:48:00 2003
@@ -52,11 +52,12 @@
art_rgb_fill_run_ (art_u8 *buf, art_u32 rgb, int n)
+ art_u32 bgr;
art_u32 *b = (art_u32 *)buf;
for (i = 0; i < n; i++)
- *b = rgb;
+ bgr = ((rgb & 0xff) << 24) | (((rgb >> 8) & 0xff) << 16) | (((rgb
>> 16) & 0xff) << 8);
+ *b = bgr;
The result is http://perso.wanadoo.fr/costabel/Scr3.jpg
The foto is worse, but the filled rectangles are correct now.
Does this help someone to diagnose the problem?
More information about the scribus