Proportional Image Scaling: Possible?

Author Message

Alex Jones

Wednesday 09 July 2003 2:17:47 pm

Is it possible to scale the images proportional to their original size instead of by pixels? If so, how? If not, is this something that can be created via a module or operator? I know both ImageMagick and GD can do it, so perhaps it wouldn't be too hard to hack if need be.

It would be nice to provide the choice within the image settings.

Thanks,

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Jan Borsodi

Thursday 10 July 2003 7:11:57 am

All image operations are done with proportions intact. The sizes set in site.ini only controls the desired size, if one side of an image is larger than the other that side will be longer than the specified size and the other side will have the exact pixel size.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Alex Jones

Thursday 10 July 2003 8:19:27 am

I think I didn't phrase my question as well as I could have. Let me try again.

Is it possible to size the images based on set percentages? For example:
small: 25% of original image size
medium: 50% of original image size
large: 100% of original image size

Thanks!

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Alex Jones

Tuesday 22 July 2003 7:37:36 am

Anyone? Please? :)

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Ekkehard Dörre

Wednesday 13 August 2003 1:19:09 am

Look http://www.imagemagick.org/www/convert.html for the possibilities of imagemagick or in php
http://de.php.net/manual/en/function.imagecopyresized.php
the posting with function imagecopypercentsize

Greetings ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Alex Jones

Thursday 14 August 2003 7:54:33 am

ekke, I appreciate the reply. I have begun tracking down the code that performs the scaling and am modifying it to do what I need. I was hoping to avoid editing the code directly as I don't like the risk of overwriting it in a future upgrade, but I think it is unavoidable. Ahh well. When I have a solution I will post it for others. :)

Thanks!

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

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 19 2025 03:32:59
Script start
Timing: Jan 19 2025 03:32:59
Module start 'layout'
Timing: Jan 19 2025 03:32:59
Module start 'content'
Timing: Jan 19 2025 03:33:00
Module end 'content'
Timing: Jan 19 2025 03:33:00
Script end

Main resources:

Total runtime1.0105 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0072 589.1797152.6250
Module start 'layout' 0.00720.0174 741.804739.4453
Module start 'content' 0.02460.9841 781.2500618.8906
Module end 'content' 1.00870.0017 1,400.140616.1563
Script end 1.0104  1,416.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.3743160.0002
Check MTime0.00160.1537160.0001
Mysql Total
Database connection0.00060.062810.0006
Mysqli_queries0.927891.8197680.0136
Looping result0.00070.0719660.0000
Template Total0.954294.420.4771
Template load0.00220.217620.0011
Template processing0.952094.213320.4760
Template load and register function0.00010.011610.0001
states
state_id_array0.00110.107910.0011
state_identifier_array0.00160.155920.0008
Override
Cache load0.00180.1819340.0001
Sytem overhead
Fetch class attribute can translate value0.00070.069630.0002
Fetch class attribute name0.00180.173690.0002
XML
Image XML parsing0.00170.165630.0006
class_abstraction
Instantiating content class attribute0.00000.0028120.0000
General
dbfile0.00120.1223290.0000
String conversion0.00000.001440.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
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs