Skip to content

Commit

Permalink
Merge pull request #16 from Spudley/master
Browse files Browse the repository at this point in the history
Just a few minor tidy-ups.
  • Loading branch information
Oberto committed Aug 26, 2019
2 parents 3dfbf8a + 0589d6b commit a0d4427
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions classPhpPsdReader.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php
/* This file is released under the GPL, any version you like
*
* PHP PSD reader class, v1.3
Expand Down Expand Up @@ -293,4 +293,3 @@ function imagecreatefrompsd($fileName) {
if (isset($psdReader->infoArray['error'])) return '';
else return $psdReader->getImage();
}
?>
10 changes: 5 additions & 5 deletions php_image_magician.php
Original file line number Diff line number Diff line change
Expand Up @@ -1699,21 +1699,21 @@ public function getExif($debug=true)
$exifData = exif_read_data($this->fileName, 'IFD0');

// *** Format the apperture value
$ev = $exifData['ApertureValue'];
$ev = isset($exifData['ApertureValue']) ? $exifData['ApertureValue'] : '';
$apPeicesArray = explode('/', $ev);
if (count($apPeicesArray) == 2) {
$apertureValue = round($apPeicesArray[0] / $apPeicesArray[1], 2, PHP_ROUND_HALF_DOWN) . ' EV';
} else { $apertureValue = '';}

// *** Format the focal length
$focalLength = $exifData['FocalLength'];
$focalLength = isset($exifData['FocalLength']) ? $exifData['FocalLength'] : '';
$flPeicesArray = explode('/', $focalLength);
if (count($flPeicesArray) == 2) {
$focalLength = $flPeicesArray[0] / $flPeicesArray[1] . '.0 mm';
} else { $focalLength = '';}

// *** Format fNumber
$fNumber = $exifData['FNumber'];
$fNumber = isset($exifData['FNumber']) ? $exifData['FNumber'] : '';
$fnPeicesArray = explode('/', $fNumber);
if (count($fnPeicesArray) == 2) {
$fNumber = $fnPeicesArray[0] / $fnPeicesArray[1];
Expand All @@ -1725,11 +1725,11 @@ public function getExif($debug=true)


// *** Resolve MeteringMode
$mm = $exifData['MeteringMode'];
$mm = isset($exifData['MeteringMode']) ? $exifData['MeteringMode'] : '';
$mm = $this->resolveMeteringMode($mm);

// *** Resolve Flash
$flash = $exifData['Flash'];
$flash = isset($exifData['Flash']) ? $exifData['Flash'] : '';
$flash = $this->resolveFlash($flash);


Expand Down

0 comments on commit a0d4427

Please sign in to comment.