orientation property

PdfImageOrientation get orientation

Rotation angle of this image

Implementation

PdfImageOrientation get orientation {
  if (tags == null || tags![PdfExifTag.Orientation] == null) {
    return PdfImageOrientation.topLeft;
  }

  try {
    final int index = tags![PdfExifTag.Orientation] - 1;
    const orientations = PdfImageOrientation.values;
    if (index >= 0 && index < orientations.length) {
      return orientations[index];
    }
    return PdfImageOrientation.topLeft;
  } on RangeError {
    return PdfImageOrientation.topLeft;
  }
}