diff --git a/include/tool/Editing.php b/include/tool/Editing.php
index 9a9a8b2..794ac87 100644
--- a/include/tool/Editing.php
+++ b/include/tool/Editing.php
@@ -1008,7 +1008,8 @@ namespace gp\tool{
$img_alt = str_replace('_', ' ', basename(pathinfo($image, PATHINFO_FILENAME)));
echo '
';
- echo ''; // title="'.htmlspecialchars($caption).'"
+ // echo ''; // title="'.htmlspecialchars($caption).'"
+ echo '';
echo '
';
echo ''.$caption.'';
echo '';
diff --git a/include/tool/Image.php b/include/tool/Image.php
index 63310c5..010afd6 100644
--- a/include/tool/Image.php
+++ b/include/tool/Image.php
@@ -477,9 +477,15 @@ namespace gp\tool{
if( !$new_h ){
$new_h = $dst_h;
}
+
+ /* $original_w = imagesx($src_img);
+ $original_h = imagesy($src_img);
+ $new_h = $original_h * ($new_w / $original_w); */
-
- $dst_img = imagecreatetruecolor($new_w, $new_h);
+ $new_w = intval($new_w);
+ $new_h = intval($new_h);
+ $dst_img = imagecreatetruecolor($new_w, $new_h);
+
if( !$dst_img ){
trigger_error('dst_img not created');
return false;