[50% SOLVED][Image Manager] - fixed width and max image size?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
rtkd
Forum Members
Forum Members
Posts: 126
Joined: Tue Dec 12, 2006 3:57 pm

[50% SOLVED][Image Manager] - fixed width and max image size?

Post by rtkd »

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.

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); }
}
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}  ;D

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); }
}
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
Last edited by rtkd on Thu Jul 26, 2007 3:38 pm, edited 1 time in total.
rtkd
Forum Members
Forum Members
Posts: 126
Joined: Tue Dec 12, 2006 3:57 pm

Re: [Image Manager] - fixed width and max image size?

Post by rtkd »

/*
@ bump
*/
Post Reply

Return to “CMSMS Core”