Update Image Util

This commit is contained in:
Daniel Supernault 2020-01-28 21:31:05 -07:00
parent 22e9e3df08
commit 7355e94723
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -119,7 +119,41 @@ class Image
}); });
} else { } else {
if(config('media.exif.database', false) == true) { if(config('media.exif.database', false) == true) {
$media->metadata = json_encode($metadata); $meta = [];
$keys = [
"COMPUTED",
"FileName",
"FileSize",
"FileType",
"Make",
"Model",
"MimeType",
"ColorSpace",
"ExifVersion",
"Orientation",
"UserComment",
"XResolution",
"YResolution",
"FileDateTime",
"SectionsFound",
"ExifImageWidth",
"ResolutionUnit",
"ExifImageLength",
"FlashPixVersion",
"Exif_IFD_Pointer",
"YCbCrPositioning",
"ComponentsConfiguration",
"ExposureTime",
"FNumber",
"ISOSpeedRatings",
"ShutterSpeedValue"
];
foreach ($metadata as $k => $v) {
if(in_array($k, $keys)) {
$meta[$k] = $v;
}
}
$media->metadata = json_encode($meta);
} }
$img->resize($aspect['width'], $aspect['height'], function ($constraint) { $img->resize($aspect['width'], $aspect['height'], function ($constraint) {