Get the orientation of this image.

@return int ORIENTATION_SQUARE | ORIENTATION_PORTRAIT | ORIENTATION_LANDSCAPE
966035
public function getOrientation()
    {
        $width = $this->getWidth();
        $height = $this->getHeight();
        if ($width > $height) {
            return Image_Backend::ORIENTATION_LANDSCAPE;
        } elseif ($height > $width) {
            return Image_Backend::ORIENTATION_PORTRAIT;
        } else {
            return Image_Backend::ORIENTATION_SQUARE;
        }
    }
665006
public function getImageAsString()
    {
        $data = null;
        ob_start();
        $this->show(true);
        $data = ob_get_contents();
        ob_end_clean();

        return $data;
    }
823862
public function correctOrientation()
    {
        try {
            $exif = exif_read_data($this->file);
        } catch (\Exception $e) {
            return $this;
        }
        if (!empty($exif['Orientation'])) {
            switch ($exif['Orientation']) {
                case 8:
                    $this->image = imagerotate($this->image, 90, 0);
                    break;
                case 3:
                    $this->image = imagerotate($this->image, 180, 0);
                    break;
                case 6:
                    $this->image = imagerotate($this->image, -90, 0);
                    break;
            }
        }
        return $this;
    }
8557
protected function getImageSizes()
    {
        if (is_callable($this->_imageSizes)) {
            return call_user_func($this->_imageSizes, $this->owner);
        } else {
            return $this->_imageSizes;
        }
    }
454547
public function getImageAttribute()
    {
        if ($this->thumbnail and $this->thumbnail->attachment) {
            return $this->thumbnail->attachment->guid;
        }
    }
576805
public function getOrientation()
    {
        if ($this->orientation === 'AUTO') {
            if ($this->width > $this->height) {
                $this->orientation = 'LANDSCAPE';
            } elseif ($this->width < $this->height) {
                $this->orientation = 'PORTRAIT';
            } elseif ($this->width == $this->height) {
                $this->orientation = 'SQUARE';
            }
        }

        return $this->orientation;
    }
909101
public function getImageUrlAttribute()
    {
        if ($this->exists) {
            $image = $this->image();

            if ($image) {
                return $image->url;
            }

            return config('media.image.default');
        }

        return config('media.image.default');
    }
651743
public function getGeoLocation()
	{
		if (!$this->checkPackageRequirements('exif'))
		{
			$this->setError(\Lang::txt('You need the PHP exif library installed to rotate image based on Exif Orientation value.'));
			return false;
		}

		try
		{
			$this->exif_data = exif_read_data($this->source);
		}
		catch (Exception $e)
		{
			$this->exif_data = array();
		}

		if (isset($this->exif_data['GPSLatitude']))
		{
			$lat      = $this->exif_data['GPSLatitude'];
			$lat_dir  = $this->exif_data['GPSLatitudeRef'];
			$long     = $this->exif_data['GPSLongitude'];
			$long_dir = $this->exif_data['GPSLongitudeRef'];

			$latitude  = $this->geo_single_fracs2dec($lat);
			$longitude = $this->geo_single_fracs2dec($long);
			$latitude_formatted  = $this->geo_pretty_fracs2dec($lat) . $lat_dir;
			$longitude_formatted = $this->geo_pretty_fracs2dec($long) . $long_dir;

			if ($lat_dir == 'S')
			{
				$latitude *= -1;
			}

			if ($long_dir == 'W')
			{
				$longitude *= -1;
			}

			$geo = array(
				'latitude'  => $latitude,
				'longitude' => $longitude,
				'latitude_formatted'  => $latitude_formatted,
				'longitude_formatted' => $longitude_formatted
			);
		}
		else
		{
			$geo = array();
		}

		return $geo;
	}
111420
public Axis getOrientationAxis() {
        final Axis axis;
        switch(getOrientation()) {
            case HORIZONTAL:
                axis = Axis.X;
                break;
            case VERTICAL:
                axis = Axis.Y;
                break;
            case STACK:
                axis = Axis.Z;
                break;
            default:
                Log.w(TAG, "Unsupported orientation %s", mOrientation);
                axis = Axis.X;
                break;
        }
        return axis;
    }
632325
public function dimensions()
	{
		if (!$this->dimensions)
		{
			$this->dimensions = array(0, 0);

			if ($this->isImage() && file_exists($this->path()))
			{
				$this->dimensions = getimagesize($this->path());
			}
		}

		return $this->dimensions;
	}
980348
public function getImagineImage()
    {
        if (null === $this->imagineImage) {
            $app = Application::getFacadeApplication();
            $resource = $this->getFileResource();
            $mimetype = $resource->getMimeType();
            $imageLibrary = $app->make(ImagineInterface::class);

            switch ($mimetype) {
                case 'image/svg+xml':
                case 'image/svg-xml':
                case 'text/plain':
                    if ($imageLibrary instanceof \Imagine\Gd\Imagine) {
                        try {
                            $imageLibrary = $app->make('image/imagick');
                        } catch (Exception $x) {
                            $this->imagineImage = false;
                        } catch (Throwable $x) {
                            $this->imagineImage = false;
                        }
                    }
                    break;
            }

            if (null === $this->imagineImage) {
                $metadataReader = $imageLibrary->getMetadataReader();
                if (!$metadataReader instanceof ExifMetadataReader) {
                    if ($app->make('config')->get('concrete.file_manager.images.use_exif_data_to_rotate_images')) {
                        try {
                            $imageLibrary->setMetadataReader(new ExifMetadataReader());
                        } catch (NotSupportedException $e) {
                        }
                    }
                }
                try {
                    $this->imagineImage = $imageLibrary->load($resource->read());
                } catch (FileNotFoundException $e) {
                    $this->imagineImage = false;
                }
            }
        }

        return $this->imagineImage ?: null;
    }
114183
public function getMetaImage()
    {
        $metaImage = $this->getTranslationAttribute('meta_image');

        if ($metaImage = get_nuclear_cover($metaImage))
        {
            return $metaImage;
        }

        if ($coverImage = $this->getCoverImage())
        {
            return $coverImage;
        }

        return null;
    }
451890
public function getStylesAttribute()
    {
        if (!$this->isImage)
            return null;

        $styles = [];
        foreach ($this->image_styles as $style)
            $styles[$style->style->name] = $style->file;

        return $styles;
    }
803489
public function getDefaultImageAlignment()
    {
        if ($alignment = $this->owner->ImageDefaultAlignment) {
            return $alignment;
        }
        
        if ($this->owner->hasExtension(MetaDataExtension::class)) {
            return $this->owner->getFieldFromParent('DefaultImageAlignment');
        }
    }
826406
function get_orientation() {
        if (imagesx($this->image) > imagesy($this->image)) {
            return 'landscape';
        }
        if (imagesx($this->image) < imagesy($this->image)) {
            return 'portrait';
        }
        return 'square';
    }
249258
public function getThumbAttribute()
    {
        if (!$this->isImage)
            return null;

        $thumb_style = ImageStyle::where('name', 'Chronos Thumbnail')->first()->id;
        $thumb = $this->image_styles()->where('image_style_id', $thumb_style)->first();

        if ($thumb)
            return $thumb->file;
        else
            return $this->file;
    }
122382
public function getWidth()
    {
        if (null === $this->width && !$this->initialised) {
            $this->refreshDimensions();
        }

        if (null === $this->width) {
            $width = getenv('COLUMNS');
            if (false !== $width) {
                $this->width = (int) trim($width);
            }
        }

        return $this->width ?: static::DEFAULT_WIDTH;
    }