All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.drew.metadata.heif.boxes.PixelInformationBox Maven / Gradle / Ivy

Go to download

This is a fork of com.drewnoakes' metadata-extractor that relocates com.adobe.internal to com.adobe. Java library for extracting EXIF, IPTC, XMP, ICC and other metadata from image and video files.

The newest version!
package com.drew.metadata.heif.boxes;

import com.drew.lang.SequentialReader;
import com.drew.metadata.heif.HeifDirectory;

import java.io.IOException;

/**
 * ISO/IEC 23008-12:2017 pg.13
 */
public class PixelInformationBox extends FullBox
{
    int numChannels;
    int[] channels;

    public PixelInformationBox(SequentialReader reader, Box box) throws IOException
    {
        super(reader, box);

        numChannels = reader.getUInt8();
        channels = new int[numChannels];
        for (int i = 0; i < channels.length; i++) {
            channels[i] = reader.getUInt8();
        }
    }

    public void addMetadata(HeifDirectory directory)
    {
        if (!directory.containsTag(HeifDirectory.TAG_BITS_PER_CHANNEL)) {
            directory.setIntArray(HeifDirectory.TAG_BITS_PER_CHANNEL, channels);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy