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
This commit is contained in:
parent
e77e68b7db
commit
753f58d6a9
27 changed files with 1113 additions and 208 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue