Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just a few minor tidy-ups. #16

Merged
merged 2 commits into from
Aug 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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