Hi Andreas,

On Sat, 2006-07-22 at 00:00 +0200, Andreas Tobler wrote:
> But he also suggested to reorganise the code path to 
> check for (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) only once 
> and not for all pixels. Thanks Assen!
> 
> I attach a patch which does this. The improvement is not bad, around a 
> factor 5 for a BufferedImage 816x616 RGBA.
> 
> Comments? Ok for head?

Seems like a good idea!
Just one coding style nitpick:

+      } else {
+      for (int i = 0; i < data.length; i++ )
+       {

That should be:

       }
     else
       {
         for (int i = 0; i < data.length; i++)
           {

But looks fine otherwise.

Thanks,

Mark


Reply via email to