HeifResourceFormat
class HeifResourceFormat
Implements: IResourceFormat
Package: dev.joid.lib.resource.format.impl · Module: core · Source: HeifResourceFormat.java
The built-in format that recognizes HEIF and AVIF images, which JOID cannot decode, to fail with a clear message.
Description
Section titled “Description”The resource fails, and the dev-mode warning asks for PNG, JPEG or WebP instead.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| HeifResourceFormat() | Creates the format. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
boolean | supports(byte[] header) | If true, header is an ISO media file of a HEIF or AVIF brand (heic, avif, mif1…). |
IResourceDecoder | decoder(Asset asset, byte[] header) | Throws IllegalArgumentException that names the file and asks to convert it. |
Creation details
Section titled “Creation details”HeifResourceFormat
Section titled “HeifResourceFormat”HeifResourceFormat()
Creates the format.
Method details
Section titled “Method details”supports
Section titled “supports”boolean supports(byte[] header)
If true, header is an ISO media file of a HEIF or AVIF brand (heic, avif, mif1…).
decoder
Section titled “decoder”IResourceDecoder decoder(Asset asset, byte[] header)
Throws:
IllegalArgumentException: … is a HEIF or AVIF image, which JOID cannot decode, convert it to PNG, JPEG or WebP
Throws IllegalArgumentException that names the file and asks to convert it.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
