From 753f58d6a966a1051dcd62a3eeab8fc18798bcac Mon Sep 17 00:00:00 2001 From: rvelices Date: Tue, 27 Dec 2011 05:26:44 +0000 Subject: feature 2541 multisize - core implementation + usage on most public/admin pages - still to do: sync process, upload, gui/persistence for size parameters, migration script, center of interest ... git-svn-id: http://piwigo.org/svn/trunk@12796 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/element_set_ranks.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'admin/element_set_ranks.php') diff --git a/admin/element_set_ranks.php b/admin/element_set_ranks.php index 972a13a19..6de933904 100644 --- a/admin/element_set_ranks.php +++ b/admin/element_set_ranks.php @@ -199,7 +199,8 @@ SELECT id, file, path, - tn_ext, + representative_ext, + width, height, name, rank FROM '.IMAGES_TABLE.' @@ -214,11 +215,12 @@ if (pwg_db_num_rows($result) > 0) $current_rank = 1; $thumbnail_info=array(); $clipping=array(); + $derivativeParams = ImageStdParams::get_by_type(IMG_SQUARE); while ($row = pwg_db_fetch_assoc($result)) { - $src = get_thumbnail_url($row); + $derivative = new DerivativeImage($derivativeParams, new SrcImage($row)); - $thumbnail_size = getimagesize($src); + $thumbnail_size = $derivative->get_size(); if ( !empty( $row['name'] ) ) { $thumbnail_name = $row['name']; @@ -233,7 +235,7 @@ if (pwg_db_num_rows($result) > 0) 'width' => $thumbnail_size[0], 'height' => $thumbnail_size[1], 'id' => $row['id'], - 'tn_src' => $src, + 'tn_src' => $derivative->get_url(), 'rank' => $current_rank * 10, ); if ($thumbnail_size[0]<=128 and $thumbnail_size[1]<=128) -- cgit v1.2.3