How to make a thumbnail square?

Author Message

Noicokuna Niemoge

Wednesday 11 March 2009 5:25:35 am

Just as the topic says:

I'd like to center the source image in gallery thumbnail and make it square if the source image isn't a square. At the same time I'd like to retain proportions, meaning that somewhere in the thumbnail there will be added black or white space. How can I do this?

Shiki soku ze ku...

Jean-Yves Zinsou

Wednesday 11 March 2009 7:42:05 am

Hi there,

you should look at imagemagick options, and then define your options as an image filter in image.ini...

Hope this helps

Do Androids Dream of Electric Sheep?
I dream of eZpubliSheep....
------------------------------------------------------------------------
http://www.alma.fr

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:12:28
Script start
Timing: Jan 18 2025 19:12:28
Module start 'layout'
Timing: Jan 18 2025 19:12:28
Module start 'content'
Timing: Jan 18 2025 19:12:28
Module end 'content'
Timing: Jan 18 2025 19:12:28
Script end

Main resources:

Total runtime0.8668 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 587.9141152.6250
Module start 'layout' 0.00610.0053 740.539139.4609
Module start 'content' 0.01130.8541 780.0000517.8203
Module end 'content' 0.86540.0014 1,297.82038.1641
Script end 0.8668  1,305.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4028160.0002
Check MTime0.00140.1667160.0001
Mysql Total
Database connection0.00070.084810.0007
Mysqli_queries0.822794.9120540.0152
Looping result0.00060.0721520.0000
Template Total0.826695.420.4133
Template load0.00210.245520.0011
Template processing0.824495.108320.4122
Template load and register function0.00090.103110.0009
states
state_id_array0.00180.209910.0018
state_identifier_array0.00080.088220.0004
Override
Cache load0.00170.1947100.0002
Sytem overhead
Fetch class attribute can translate value0.00160.187920.0008
Fetch class attribute name0.00160.184930.0005
XML
Image XML parsing0.00060.074420.0003
class_abstraction
Instantiating content class attribute0.00000.001330.0000
General
dbfile0.00070.0815160.0000
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs