Interface ImageFormat
- All Known Implementing Classes:
ImageFormats
public interface ImageFormat
Allows conversion of
BufferedImage to byte array and vice versa.
Intended for adding custom image formats for programmatic video production and consumption.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintbyte[]Returns FOURCC (four character code).byte[]toBytes(BufferedImage image) Converts BufferedImage to raw image data.toImage(byte[] data, int width, int height) Converts byte array toBufferedImageof specified size.
-
Method Details
-
getPixelFormat
String getPixelFormat()- Returns:
- pixel format
-
getBytesPerPixel
int getBytesPerPixel()- Returns:
- bytes per pixel
-
getFourCC
byte[] getFourCC()Returns FOURCC (four character code).- Returns:
- FOURCC
- See Also:
-
toImage
Converts byte array toBufferedImageof specified size.- Parameters:
data- raw image datawidth- image widthheight- image height- Returns:
- BufferedImage
-
toBytes
Converts BufferedImage to raw image data.- Parameters:
image- image- Returns:
- raw data
-