public function orient($filename) {
// based off comment on http://php.net/manual/en/function.imagerotate.php
- if(! function_exists('exif_read_data'))
+ if( (! function_exists('exif_read_data')) || ($this->getType() === 'image/png') )
return;
$exif = exif_read_data($filename);
killme();
}
- if($ph->getType() != 'image/png')
- $ph->orient($src);
+ $ph->orient($src);
@unlink($src);
$max_length = get_config('system','max_image_length');
return;
}
+ $ph->orient($src);
@unlink($src);
return profile_photo_crop_ui_head($a, $ph);
if(! function_exists('_crop_ui_head')) {
function profile_photo_crop_ui_head(&$a, $ph){
+ $max_length = get_config('system','max_image_length');
+ if(! $max_length)
+ $max_length = MAX_IMAGE_LENGTH;
+ if($max_length > 0)
+ $ph->scaleImage($max_length);
+
$width = $ph->getWidth();
$height = $ph->getHeight();
killme();
}
+ $ph->orient($src);
@unlink($src);
+ $max_length = get_config('system','max_image_length');
+ if(! $max_length)
+ $max_length = MAX_IMAGE_LENGTH;
+ if($max_length > 0)
+ $ph->scaleImage($max_length);
+
$width = $ph->getWidth();
$height = $ph->getHeight();