You are here

public function ImagemagickToolkit::setExifOrientation in ImageMagick 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::setExifOrientation()
  2. 8.2 src/Plugin/ImageToolkit/ImagemagickToolkit.php \Drupal\imagemagick\Plugin\ImageToolkit\ImagemagickToolkit::setExifOrientation()

Sets the source EXIF orientation.

Parameters

integer|null $exif_orientation: The EXIF orientation.

Return value

$this

1 call to ImagemagickToolkit::setExifOrientation()
ImagemagickToolkit::parseExifData in src/Plugin/ImageToolkit/ImagemagickToolkit.php
Parses the image file EXIF data using the PHP read_exif_data() function.

File

src/Plugin/ImageToolkit/ImagemagickToolkit.php, line 626

Class

ImagemagickToolkit
Provides ImageMagick integration toolkit for image manipulation.

Namespace

Drupal\imagemagick\Plugin\ImageToolkit

Code

public function setExifOrientation($exif_orientation) {
  $this->exifInfo['Orientation'] = !empty($exif_orientation) ? (int) $exif_orientation !== 0 ? (int) $exif_orientation : NULL : NULL;
  return $this;
}