forum.coppermine-gallery.net
Support => Older/other versions => cpg1.3.x Support => Topic started by: ludde on June 13, 2004, 08:04:50 pm
-
I have a problem, my thumbnails canŽt be higher then 75 pixels, and because of my page layout and design the intermediate pictures must be 540 pixels wide, or less (but only if the original image is less then 540 pixels wide).
As coppermine functions right now I must choose either height or width in the config... And the max aspect function doesnŽt really work for me either....
So basically, what IŽm asking for is where and how you change the code so I can set my thumbs to a maximum height of 75 pixels and the width of the intermediate pictures to 540 pixels.
( Is this function something you are planning to add in the future? If so, when? In days? Months? )
-
I solved it by using phpThumb.
http://prdownloads.sourceforge.net/phpthumb/phpThumb_1.4.4.zip?use_mirror=switch
The phpThumb files I addded to the coppermine directory...
Then I edited the displayimage.php
$pic_html .= "<img src=\"phpThumb.php?src=/coppermine1.3.0/" . $picture_url . "&w=520\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
And in the config youŽll have to change the maximumsize for intermediate pictures to something a high value.
This way is a real waste of resources, since the fullsize picture actually has to be resized three times, to thumbpicture, to intermediate and then again by phpthumb to the inermediate picturesize I want...
But IŽm sure this is a much better way to do this... But this solution will do until someone comes up with a better one.