Page 1 of 1

image gallery thumbnail

Posted: Wed Jun 21, 2006 9:44 am
by lennon
Hi Im having a little issue /probelm with the imagegallery. I'm using the latest versions.

Its all fine except the quality of the thumb. I think my client may pull me up on it. Is there a way to increase the quality??

I was looking the code:

Code: Select all

//Else we are on thumb generation & normal page
$output .= '<div id="'.$divID.'">'. "\n";
$i = 1;
foreach($liste as $key => $value) {
$bigPic = $picFolder . $value;
list($bigPicWidth, $bigPicHeight) = getImageSize($bigPic);
$thumbPic = $picFolder . 'thumb_' . $value;
$thumbSize = @getImageSize($thumbPic) or ($thumbSize[0] = 100) and ($thumbSize[1] = 100);
$output .= '<div class="thumb">';
if($type == "click") $output .= '<a href="' . $self . '&img=' . $key . '">' . "\n";
if($type == "popup") $output .= '<a href="javascript:PopupPic(\'' . $bigPic . '\',\'' . ($key+1) . '\',\'' . $bigPicWidth . '\',\''. $bigPicHeight . '\')">' . "\n";
$path_parts = pathinfo($bigPic);
$extension='.'.$path_parts['extension'];
$ImageFileName = basename($bigPic); 
$bigPicName = basename($bigPic, $extension);
Is there any way to change this?

As usual any help is greatly appreicated...

Re: image gallery thumbnail

Posted: Wed Jun 21, 2006 1:44 pm
by Dr.CSS
Quality?
do you mean size?
that is set to show the thumb at 100% size...
the quality of the thumb is dependant on your image...
where are your thumbs coming from?
if you are using Image Manager it defaults to make them, width of 96px and then height is proportional...
if you want them bigger you would have to make them yourself...

Re: image gallery thumbnail

Posted: Wed Jun 21, 2006 2:18 pm
by lennon
My thumbs are being generated from my large images by the imagegallery.

I don't mean size, I mean the image quality is poor - pixelated.

Is the best way to add my own thumb nails and over write what is generated by the module?

Here's the page so you can see what I talking about....

http://www.ontheqt.ie/index.php?page=nightclub-gallery

Re: image gallery thumbnail

Posted: Wed Jun 21, 2006 3:20 pm
by Dr.CSS
you are using an img./thumbnail that is 96px x 72px and showing it at 154px x 116px so it ends up pixaleted, if you make the thumbs yourself at that size they will look better, or just let them show at normal size w/o pixalation, or start at normal size and increace till you get the thumbnail to a size that isn't so pix. looking...

Re: image gallery thumbnail

Posted: Wed Jun 21, 2006 3:27 pm
by lennon
Thought as much. Why are the images going in at 96? Can I not set them to go in at 154px default? Where is the 96px coming from.

I've changed the previous code I posted to

Code: Select all

//Else we are on thumb generation & normal page
$output .= '<div id="'.$divID.'">'. "\n";
$i = 1;
foreach($liste as $key => $value) {
$bigPic = $picFolder . $value;
list($bigPicWidth, $bigPicHeight) = getImageSize($bigPic);
$thumbPic = $picFolder . 'thumb_' . $value;
$thumbSize = @getImageSize($thumbPic) or ($thumbSize[0] = 154) and ($thumbSize[1] = 154);
$output .= '<div class="thumb">';
if($type == "click") $output .= '<a href="' . $self . '&img=' . $key . '">' . "\n";
if($type == "popup") $output .= '<a href="javascript:PopupPic(\'' . $bigPic . '\',\'' . ($key+1) . '\',\'' . $bigPicWidth . '\',\''. $bigPicHeight . '\')">' . "\n";
$path_parts = pathinfo($bigPic);
$extension='.'.$path_parts['extension'];
$ImageFileName = basename($bigPic); 
$bigPicName = basename($bigPic, $extension);
thanks mark

Re: image gallery thumbnail

Posted: Wed Jun 21, 2006 3:30 pm
by lennon
just realised that its probably a global setting in cms in the image manger not the gallery...is this the case?

Re: image gallery thumbnail

Posted: Wed Jun 21, 2006 3:32 pm
by Dr.CSS
it's hard coded in the Image Manager...
if you look thru all the files in the IM folder you will find one that sets that and you could change it...
the code you have posted is just for showing what is already a diff. size img. at larger size...

Re: image gallery thumbnail

Posted: Wed Jun 21, 2006 3:43 pm
by lennon
Cheers again mark.

Fixed it. For anyone whos interested:

Went to lib/filemanger/imagemanager/config.inc.php

Just changed the default to my new values.


Thanks Mark as usual you've been a great help.

:)