summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/graphics.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/helpers/graphics.php')
-rw-r--r--modules/gallery/helpers/graphics.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php
index 51437d4b..0c5f8366 100644
--- a/modules/gallery/helpers/graphics.php
+++ b/modules/gallery/helpers/graphics.php
@@ -195,9 +195,8 @@ class graphics_Core {
} else {
copy(MODPATH . "gallery/images/missing_photo.png", $item->thumb_path());
}
- $dims = getimagesize($item->thumb_path());
- $item->thumb_width = $dims[0];
- $item->thumb_height = $dims[1];
+ list ($item->thumb_width, $item->thumb_height) =
+ photo::get_file_metadata($item->thumb_path());
}
if (!empty($ops["resize"])) {
@@ -206,9 +205,8 @@ class graphics_Core {
} else {
copy(MODPATH . "gallery/images/missing_photo.png", $item->resize_path());
}
- $dims = getimagesize($item->resize_path());
- $item->resize_width = $dims[0];
- $item->resize_height = $dims[1];
+ list ($item->resize_width, $item->resize_height) =
+ photo::get_file_metadata($item->resize_path());
}
$item->save();
} catch (Exception $e) {