Function __global->adjust_pic_orientation
Definitions
sources/images_cleanup_pipeline.php
- Adjust an image to take into account EXIF rotation.Based on a comment in:http://stackoverflow.com/questions/3657023/how-to-detect-shot-angle-of-photo-and-auto-rotate-for-website-display-like-desk.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$image | resource | No | No | required parameter | N/A | N/A | GD image resource |
$exif | ~array | No | No | required parameter | N/A | N/A | EXIF details (false: could not load) |
Returns
- A pair: Adjusted GD image resource, Whether a change was made
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Adjust an image to take into account EXIF rotation.Based on a comment in:http://stackoverflow.com/questions/3657023/how-to-detect-shot-angle-of-photo-and-auto-rotate-for-website-display-like-desk.
*
* @param resource $image GD image resource
* @param ~array $exif EXIF details (false: could not load)
* @return array A pair: Adjusted GD image resource, Whether a change was made
*/
function adjust_pic_orientation($image, $exif) : array
* Adjust an image to take into account EXIF rotation.Based on a comment in:http://stackoverflow.com/questions/3657023/how-to-detect-shot-angle-of-photo-and-auto-rotate-for-website-display-like-desk.
*
* @param resource $image GD image resource
* @param ~array $exif EXIF details (false: could not load)
* @return array A pair: Adjusted GD image resource, Whether a change was made
*/
function adjust_pic_orientation($image, $exif) : array