getting the thumbs-url getting the thumbs-url
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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