Minor - correcting indentation

skala
Julio Montoya 14 years ago
parent 770c678cd5
commit d0a0052411
  1. 44
      main/inc/lib/image.lib.php

@ -40,16 +40,14 @@ class image {
$size [1] = $this->bgy;
if ($border == 1) {
if ($specific_size) {
$width = $thumbw;
$height = $thumbh;
} else {
$scale = min($thumbw / $size[0], $thumbh / $size[1]);
$width = (int)($size[0] * $scale);
$height = (int)($size[1] * $scale);
}
if ($specific_size) {
$width = $thumbw;
$height = $thumbh;
} else {
$scale = min($thumbw / $size[0], $thumbh / $size[1]);
$width = (int)($size[0] * $scale);
$height = (int)($size[1] * $scale);
}
$deltaw = (int)(($thumbw - $width) / 2);
$deltah = (int)(($thumbh - $height) / 2);
$dst_img = @ImageCreateTrueColor($thumbw, $thumbh);
@ -58,31 +56,23 @@ class image {
}
$this->bgx = $thumbw;
$this->bgy = $thumbh;
}
elseif ($border == 0) {
if ($specific_size) {
$width = $thumbw;
$height = $thumbh;
} else {
$scale = ($size[0] > 0 && $size[1] > 0) ? min($thumbw / $size[0], $thumbh / $size[1]) : 0;
$width = (int)($size[0] * $scale);
$height = (int)($size[1] * $scale);
}
} elseif ($border == 0) {
if ($specific_size) {
$width = $thumbw;
$height = $thumbh;
} else {
$scale = ($size[0] > 0 && $size[1] > 0) ? min($thumbw / $size[0], $thumbh / $size[1]) : 0;
$width = (int)($size[0] * $scale);
$height = (int)($size[1] * $scale);
}
$deltaw = 0;
$deltah = 0;
$dst_img = @ImageCreateTrueColor($width, $height);
$this->bgx = $width;
$this->bgy = $height;
}
$src_img = $this->bg;
@ImageCopyResampled($dst_img, $src_img, $deltaw, $deltah, 0, 0, $width, $height, ImageSX($src_img), ImageSY($src_img));
$this->bg=$dst_img;
@imagedestroy($src_img);
}

Loading…
Cancel
Save