loci.formats.services

## Class JPEGXRServiceImpl

- java.lang.Object
- - loci.common.services.AbstractService
  - - loci.formats.services.JPEGXRServiceImpl

- All Implemented Interfaces:
    loci.common.services.Service, JPEGXRService

      public class JPEGXRServiceImpl
      extends loci.common.services.AbstractService
      implements JPEGXRService

  Interface defining methods for working with JPEG-XR data

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static short` | `BGR_24`
    `private static short` | `BGR_32`
    `private static short` | `BGRA_32`
    `private static org.slf4j.Logger` | `LOGGER`
    `private static short` | `PBGRA_32`
    `private static int` | `PIXEL_FORMAT_TAG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JPEGXRServiceImpl()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `decompress(byte[] compressed)` Decompress the given JPEG-XR compressed byte array and return as a byte array.
    `private int` | `getBGRComponents(short[] format)`
    `private short[]` | `getPixelFormat(byte[] stream)`
    `private boolean` | `isBGR(short[] format)`

    - ### Methods inherited from class loci.common.services.AbstractService

      `checkClassDependency`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### PIXEL_FORMAT_TAG

          private static final int PIXEL_FORMAT_TAG

      See Also:
        Constant Field Values

    - #### BGR_24

          private static final short BGR_24

      See Also:
        Constant Field Values

    - #### BGR_32

          private static final short BGR_32

      See Also:
        Constant Field Values

    - #### BGRA_32

          private static final short BGRA_32

      See Also:
        Constant Field Values

    - #### PBGRA_32

          private static final short PBGRA_32

      See Also:
        Constant Field Values

    - #### LOGGER

          private static final org.slf4j.Logger LOGGER

  - ### Constructor Detail

    - #### JPEGXRServiceImpl

          public JPEGXRServiceImpl()

  - ### Method Detail

    - #### decompress

          public byte[] decompress(byte[] compressed)
                            throws FormatException

      Description copied from interface: `JPEGXRService`
      Decompress the given JPEG-XR compressed byte array and return as a byte array. Opening and closing of decoders and streams is handled internally.
      Specified by:
        `decompress` in interface `JPEGXRService`
      Parameters:
        `compressed` - the complete JPEG-XR compressed data
      Returns:
        raw decompressed bytes
      Throws:
        `FormatException` - if an error occurs during decompression
      See Also:
        `decompress(byte[])`

    - #### getPixelFormat

          private short[] getPixelFormat(byte[] stream)
                                  throws FormatException,
                                         java.io.IOException

      Throws:
        `FormatException`
        `java.io.IOException`

    - #### isBGR

          private boolean isBGR(short[] format)

    - #### getBGRComponents

          private int getBGRComponents(short[] format)

Copyright © 2026 Open Microscopy Environment