Imagemagick: How to change images generated names

Author Message

Jorge estévez

Wednesday 08 October 2008 11:53:12 am

Hello,

Please see my previous post at http://ez.no/developer/forum/developer/image_variations_some_do_some_don_t

In windows there is a problem with long names for folders and files due to the 256 limit, this issue can be found at http://issues.ez.no/IssueView.php?Id=11248&activeItem=15

The name of the directory where the variations of the images will be saved (generated by imagemagick) and also, the name of the images are made from the pattern of the object (the default is attribute <name>) defined at the class definition form.

Once (my problem!!) you change the pattern by using more attributes (name + code + any other attribute) then the images generated in all variations defined at image.ini are indeed "big names", so the 256 limit at windows comes to an end (pity windows).

I would like to hack the precise code that will limit the use of all the pattern used at the administration class object pattern definition, so only <name> is used, and by doing this generate only short names for folders and names.

This will not save windows responsibility :-), but it will indeed save me from my client as images are not been generated (randomly) depending of the length of all attrributes that makes the pattern object.

thanks

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Jorge estévez

Thursday 09 October 2008 3:32:01 am

Any clues?

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Kristof Coomans

Thursday 09 October 2008 5:36:53 am

Hi Jorge

The path used is generated in eZImageAliasHandler::imagePath(), imagePathByNode(), the image name by imageName() and imageNameByNode().

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Jorge estévez

Thursday 09 October 2008 7:57:57 am

Thanks, I will try to change the code...

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

Jorge estévez

Sunday 14 December 2008 5:13:40 am

Hello,

Cannot find that piece of code, can you tell me where to look?
thanks

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

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 01:17:28
Script start
Timing: Jan 19 2025 01:17:28
Module start 'layout'
Timing: Jan 19 2025 01:17:28
Module start 'content'
Timing: Jan 19 2025 01:17:28
Module end 'content'
Timing: Jan 19 2025 01:17:28
Script end

Main resources:

Total runtime0.6407 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0042 589.2891152.6406
Module start 'layout' 0.00420.0023 741.929739.4766
Module start 'content' 0.00650.6326 781.4063554.7109
Module end 'content' 0.63920.0015 1,336.117212.1250
Script end 0.6407  1,348.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4629160.0002
Check MTime0.00120.1877160.0001
Mysql Total
Database connection0.00060.086910.0006
Mysqli_queries0.591192.2525630.0094
Looping result0.00090.1362610.0000
Template Total0.615396.020.3076
Template load0.00200.308720.0010
Template processing0.613395.718020.3066
Template load and register function0.00020.031910.0002
states
state_id_array0.00070.103810.0007
state_identifier_array0.00050.084120.0003
Override
Cache load0.00160.2525230.0001
Sytem overhead
Fetch class attribute can translate value0.00180.282120.0009
Fetch class attribute name0.00130.206960.0002
XML
Image XML parsing0.00060.090220.0003
class_abstraction
Instantiating content class attribute0.00000.006760.0000
General
dbfile0.00080.1203160.0000
String conversion0.00000.000740.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/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
1content/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: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs