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

com.drew.metadata.heif.boxes.ImageRotationBox 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.

There is a newer version: 2.17.1.0
Show 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.15
 */
public class ImageRotationBox extends Box
{
    int angle;

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

        // First 6 bits are reserved
        angle = reader.getUInt8() & 0x03;
    }

    public void addMetadata(HeifDirectory directory)
    {
        if (!directory.containsTag(HeifDirectory.TAG_IMAGE_ROTATION)) {
            directory.setInt(HeifDirectory.TAG_IMAGE_ROTATION, angle);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy