Debian Codegraph @

src/com/drew/metadata/heif/boxes/ImageRotationBox.java

raw symbols SCIP
1 package com.drew.metadata.heif.boxes;
2
3 import com.drew.lang.SequentialReader;
4 import com.drew.metadata.heif.HeifDirectory;
5
6 import java.io.IOException;
7
8 /**
9 * ISO/IEC 23008-12:2017 pg.15
10 */
11 public class ImageRotationBox extends Box
12 {
13 int angle;
14
15 public ImageRotationBox(SequentialReader reader, Box box) throws IOException
16 {
17 super(box);
18
19 // First 6 bits are reserved
20 angle = reader.getUInt8() & 0x03;
21 }
22
23 public void addMetadata(HeifDirectory directory)
24 {
25 if (!directory.containsTag(HeifDirectory.TAG_IMAGE_ROTATION)) {
26 directory.setInt(HeifDirectory.TAG_IMAGE_ROTATION, angle);
27 }
28 }
29 }