Hi All,

We wrote some general purpose image filtering code that runs on Windows 2000.

Later we discovered this same  code wasn’t running on the mac. I changed the color model from “BufferedImage.TYPE_INT_RGB” to BufferedImage.TYPE_3BYTE_BGR.  I’m having some success running on the mac at this point.  Does anyone know if this is correct?  Should I do something else?  Code snipped below.

              Erik

 

public void filterImageAndDraw(BufferedImage image, Graphics g, VisibleArea va) // VisibleArea is a CoordinateMapper

    {

        // filter this image

        BufferedImage bif = new BufferedImage(va.getViewWidth(), va.getViewHeight(), BufferedImage.TYPE_3BYTE_BGR);

       

       

        itsColorFilter.getFilterOp().filter(image, bif);

 

        if (showSaturation)

        {

            // show saturation

            BufferedImage bis = new BufferedImage(va.getViewWidth(), va.getViewHeight(), BufferedImage.TYPE_3BYTE_BGR);

           

            itsColorFilter.getSaturationFilter().filter(bif, bis);

 

            g.drawImage(bis, 0, 0, null);

        }

        else

        {

            g.drawImage(bif, 0, 0, null);

        }

    }

Reply via email to