mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 08:13:16 +00:00
Update Image Util
This commit is contained in:
parent
22e9e3df08
commit
7355e94723
1 changed files with 167 additions and 133 deletions
|
@ -119,7 +119,41 @@ class Image
|
|||
});
|
||||
} else {
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue