On 09/20/2009 10:05 PM, Diederik van Lierop wrote:
On 09/20/2009 05:15 PM, Tavmjong Bah wrote:
Sorry, I still see the same problem after applying the patch: no PNG or
JPG displayed with 32 bit Linux.

Tav

Thanks all for your feedback; too bad the images haven't re-appeared, but I'm not giving up yet! I'm currently setting up a virtual 32 bit Fedora installation on my 64 bit machine, because I'm sure that once I can reproduce this then it should be easy to fix.

I've managed to reproduce the problems caused by my patch; the problems arise when the processor's MMX instructions are used. A small part of libnr  has been written in assembly code to speed up the rendering and to be able to use the MMX instructions. This code needs to be changed too to handle the long long integers. My patch erroneously pushed long long integers to this assembly code anyway, which led to this bug. Unfortunately, I cannot fix this assembly code because my only assembly experience was on a Motorola 68000 processor, about 18 years ago now ;-). For now I've fixed my patch (see the attachement) by limiting it to the non-MMX c++ code. This fixes the bitmap pixel alignment issue for some users, but not for everyone. There must be someone reading this who can port this to the assembly code too. It really is only a few lines of code! Until then this bug cannot be completely solved, .... unless we start using Cairo (?)

Diederik

PS: My new patch has been tested on Fedora 10 x86_64, on a virtualised instance of Fedora 10 i686, and on a native Windows XP installation.