static GrabbableIntPixels grabbableIntPixels_fastOrSlow(BufferedImage image) { pcall { GrabbableIntPixels gp = grabbableIntPixels(image); if (gp != null) ret gp; } // Use pixelGrabber if quick method fails int w = image.getWidth(), h = image.getHeight(); PixelGrabber pixelGrabber = new(image, 0, 0, w, h, data, 0, w); if (!pixelGrabber.grabPixels()) fail("Could not grab pixels"); ret GrabbableIntPixels(data, w, h, 0, w); }