Class ImageioNative

java.lang.Object
io.github.ghosthack.imageio.ImageioNative

public final class ImageioNative extends Object
Unified cross-platform API for native image decoding.

Automatically delegates to the correct platform backend:

  • macOS → Apple ImageIO (CGImageSource / Apple Media Engine)
  • Windows → Windows Imaging Component (WIC / DXVA)

Use this when you want more control than javax.imageio.ImageIO.read() provides. The SPI-based auto-registration still works in parallel — this API is an alternative, not a replacement.


 if (ImageioNative.isAvailable()) {
     Dimension size = ImageioNative.getSize(bytes);
     BufferedImage img = ImageioNative.decode(bytes);
 }
 
For platform-specific features (e.g., Windows codec installation checks), use AppleImageio or WindowsImageio directly.