Skip to content

Commit 04de0cf

Browse files
committed
remove code that is dependent on exiftool from the native space
1 parent 61ad331 commit 04de0cf

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

lib/PHPExif/Adapter/Native.php

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -201,27 +201,6 @@ public function getExifFromFile(string $file): Exif
201201
$this->getIncludeThumbnail()
202202
);
203203

204-
if ($mimeType === 'image/avif') {
205-
$output_array = [];
206-
exec("exiftool -j " . escapeshellarg($file), $output_array); // Safe\exec will throw exception if fails
207-
$tempExif = [];
208-
209-
if (count($output_array) > 0) {
210-
$json = implode("\n", $output_array);
211-
$tempExif = json_decode($json, true)[0] ?? [];
212-
}
213-
214-
$data = array_merge(
215-
['FileName' => basename($file), 'MimeType' => $mimeType],
216-
$tempExif
217-
);
218-
219-
// Ensure FileSize is integer
220-
if (isset($data['FileSize'])) {
221-
$data['FileSize'] = (int) preg_replace('/\D/', '', $data['FileSize']);
222-
}
223-
}
224-
225204
// exif_read_data failed to read exif data (i.e. not a jpg/tiff)
226205
if (false === $data) {
227206
$data = [];

0 commit comments

Comments
 (0)