Re: [GD-DEVEL] Win32 optimizing compiler causes color loss in gdImageCopyResampled()
[email protected] (Pierre)
| Newsgroups | php.gd.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Keith, On 8/16/07, Keith Craigie <[email protected]> wrote: > Hello, > > Great library! I found that with MS Visual Studio 8 (compiler version > 14.00.50727.42) with global optimizations on (/O2) and libgd release 2.0.35, > there is an issue with the gdImageCopyResampled() in gd/gd.c. Apparently > the MS compiler in its optimization causes a weird bug where it seems color > information is while scaling the image. Good catch! We met this problem in June and I did not manage to sit down to figure out what is the problem. The problem also occurs on some linux platforms with some gcc versions. > I was able to work around this bug > by using floor() instead of the (long) cast in the floor2() macro directly > above the function. See the attached patch. The patch did not make it to the list. Can you attach it again as .txt please? Or alternatively, you can register to our issues trackers: http://bugs.libgs.org Mail me once you did it (tell me the account name you use), I have to manually enable your account. We have a bug in the registration mails system... Thanks for your work! --Pierre