getting the thumbs-url getting the thumbs-url
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

getting the thumbs-url

Started by Frederick, December 21, 2005, 02:24:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Frederick

Hi all,

the reviewcom.php produces "tiny thumbnails", which I'm trying to add in one of my
own .php scripts. I've been fishing through the sources, and would like to knwo if
my approach in getting these images and their size is correct:

1. do a SELECT pid, url_prefix, filepath, filename, pwidth, pheight FROM $CONFIG['TABLE_PICTURES']
   and put it in $row
2. for each needed pid, do
     $thumb_url = get_pic_url($row, 'thumb');
3. get their size by
     $image_size = compute_img_size($row['pwidth'], $row['pheight'], $CONFIG['alb_list_thumb_size']);
4. echo the HTML with <img src="$thumb_url" {$image_size['geom']} class="image" border="0">

The reason I ask this is following:
when I start the reviewcom.php, the $image_size is slightly different from the actual
thumbsize. I figured this out by right-clicking the thumb on the produced page, hit
properties and compare it with the image-size parameters in the page's source. The dimensions
for the properties are slightly bigger than the dimensions that are used in the source code.

thanks in advance,
Fred