[patch] image processing fix for BE machine
Andreas Tobler
toa@pop.agri.ch
Tue Sep 21 17:19:00 GMT 2004
Hi Little endian world,
it seems that the whole swing development happens on LE machines ;)
The attached patch corrects pixel handling for BE machines. Tested here
on ppc-darwin8.
Could please anyone from the swing development team test if the attached
patch still works on LE platforms? I send it therefore with the
configure diff. Just apply in the libjava dir.
I have to test for cairo.
The patch itself is done on main, but it should work with minor nits on
gui and classpath too (Mark).
thanks for feedback.
Andreas
2004-09-20 Andreas Tobler <a.tobler@schweiz.ch>
* configure.ac: Introduce AC_C_BIGENDIAN_CROSS for WORDS_BIGENDIAN.
* configure: Regenerate.
* include/config.h.in: Likewise.
* jni/gtk-peer/gtkcairopeer.h (SWAPU32): Introduce macro to swap pixels.
* jni/gtk-peer/gtkpeer.h (SWAPU32): Likewise.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImagePainter.c: Moved SWAPU32
macro to gtkpeer.h.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics2D.c
(Java_gnu_java_awt_peer_gtk_GdkGraphics2D_getImagePixels): Convert
pixels from 0xBBGGRRAA to 0xAARRGGBB.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c (area_updated):
Likewise.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gtk-peer-be-fix-full.diff
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040921/c4f404a9/attachment.ksh>
More information about the Java-patches
mailing list