Class AvifDecoder
java.lang.Object
com.idrsolutions.image.JDeliImage
com.idrsolutions.image.avif.AvifDecoder
- All Implemented Interfaces:
com.idrsolutions.image.Decoder
public class AvifDecoder
extends com.idrsolutions.image.JDeliImage
implements com.idrsolutions.image.Decoder
Class reads AVIF images as BufferedImage. Make no assumptions about the
type of BufferedImage returned (may change).
Example:
AvifDecoder decoder = new AvifDecoder();
BufferedImage decodedImage = decoder.read(avifFile);
-
Field Summary
Fields inherited from class com.idrsolutions.image.JDeliImage
bb -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisReadable(byte[] data) Checks whether the avif image data can be decoded, by validating its structure without decoding the pixelsbooleanisReadable(File imageFile) Checks whether the avif image file can be decoded, by validating its structure without decoding the pixelsread(byte[] data) readDimension(byte[] data) Decodes and returns the width and height of avif imagereadDimension(File file) Decodes and returns the width and height of avif imagereadExif(byte[] data) Decodes and returns the Exif data as IFD format if there is an IFDdata otherwise returns nullDecodes and returns the Exif data as IFD format if there is an IFDdata otherwise returns nullvoidreadImageSpecificMetaData(byte[] bytes, Metadata metadata) Read Avif specific metadata such as IFDvoidreadImageSpecificMetaData(File file, Metadata metadata) Read Avif specific metadata such as IFDMethods inherited from class com.idrsolutions.image.JDeliImage
optimiseImageMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.idrsolutions.image.Decoder
getImageCount, getImageCount, readEmbeddedThumbnail, readEmbeddedThumbnail, readImageAt, readImageAt, setMetadata
-
Constructor Details
-
AvifDecoder
public AvifDecoder()
-
-
Method Details
-
read
- Specified by:
readin interfacecom.idrsolutions.image.Decoder- Parameters:
data- source image to read- Returns:
- image contained in raw data
- Throws:
Exception- if problem reading image
-
read
- Specified by:
readin interfacecom.idrsolutions.image.Decoder- Parameters:
imageFile- source image to read- Returns:
- image read from the file
- Throws:
Exception- if problem reading image
-
readDimension
Decodes and returns the width and height of avif image- Specified by:
readDimensionin interfacecom.idrsolutions.image.Decoder- Parameters:
file- image image contained in raw data if present- Returns:
- width and height of image
- Throws:
Exception- if problem reading image
-
readDimension
Decodes and returns the width and height of avif image- Specified by:
readDimensionin interfacecom.idrsolutions.image.Decoder- Parameters:
data- image image contained in raw data if present- Returns:
- Rectangle width and height of image
- Throws:
Exception- if problem reading image
-
isReadable
Checks whether the avif image data can be decoded, by validating its structure without decoding the pixels- Specified by:
isReadablein interfacecom.idrsolutions.image.Decoder- Parameters:
data- avif image data- Returns:
- true if the image can be decoded
- Throws:
Exception- if problem reading image
-
isReadable
Checks whether the avif image file can be decoded, by validating its structure without decoding the pixels- Specified by:
isReadablein interfacecom.idrsolutions.image.Decoder- Parameters:
imageFile- avif image file- Returns:
- true if the image can be decoded
- Throws:
Exception- if problem reading image
-
readExif
-
readExif
-
readImageSpecificMetaData
Read Avif specific metadata such as IFD- Specified by:
readImageSpecificMetaDatain interfacecom.idrsolutions.image.Decoder- Parameters:
file- file to read frommetadata- image metadata object to hold all metadata- Throws:
Exception
-
readImageSpecificMetaData
Read Avif specific metadata such as IFD- Specified by:
readImageSpecificMetaDatain interfacecom.idrsolutions.image.Decoder- Parameters:
bytes- byte array to read data frommetadata- image metadata object to hold all metadata- Throws:
Exception
-