[50% SOLVED][Image Manager] - fixed width and max image size?
Posted: Wed Jul 25, 2007 8:37 am
hi,
i want the thumbnails created by the image manager to always have the same width,
regardless if the are horizontal or vertical format.
i tried to manipulate this in Thumbnail.php, but didn't archive the desired effekt.
is there also a way to automatically resize the original image after uploading?
//EDIT
i found out that using the following code generates thumbs with the same width regardless if they are
horizontal or vertical format.
what made me not recocnise this for a long time was {$album->autothumbnailsize}
now, if anyone could tell me where i can set a max. width for images being uploaded through the
file manager, so that they will be automatically resized when above that size?
the feature in the album module strangely doesn't work... every time i try to set a different value than
the predifined 800 it doesn't save this value and switches back to 800.
greets&thx, rtkd
i want the thumbnails created by the image manager to always have the same width,
regardless if the are horizontal or vertical format.
i tried to manipulate this in Thumbnail.php, but didn't archive the desired effekt.
Code: Select all
if ($this -> proportional) {
$width = $this -> driver -> img_x;
$height = $this -> driver -> img_y;
if ($width > $height) { $this -> height = intval ($this -> width / $width * $height); }
else if ($height > $width) { $this -> width = intval ($this -> height / $height * $width); }
}
//EDIT
i found out that using the following code generates thumbs with the same width regardless if they are
horizontal or vertical format.
what made me not recocnise this for a long time was {$album->autothumbnailsize}
Code: Select all
if ($this -> proportional) {
$width = $this->driver->img_x;
$height = $this->driver->img_y;
if ($width > $height) { $this -> height = intval ($this -> width / $width * $height); }
else if ($height > $width) { $this -> height = intval ($this -> width / $width * $height); }
}
file manager, so that they will be automatically resized when above that size?
the feature in the album module strangely doesn't work... every time i try to set a different value than
the predifined 800 it doesn't save this value and switches back to 800.
greets&thx, rtkd