GD requiered for upload ?

Author Message

Vincent Basset

Wednesday 21 January 2004 6:38:24 am

Hi,

My template doesn't display the images I uploaded (in articles)

The HTML source code which is generated is :

<img src="/ez331" width="" height="" border="0" alt="" title="" />

I have neither GD nor ImageMagik installed, but I thought they were needed to create image with scripts, not to upload or display images ???
Am I wrong ?
Is it the source of my problem ????

++++++++++++

Here is my template for displaying the image of an info page while viewinf its parent directory : (class id 10 is an info page)

{let children_pays=fetch('content', 'list', hash(parent_node_id, $node.node_id, class_filter_type, "include", class_filter_array, array(10)) ) }
{section name=Child loop=$children_pays}
{attribute_view_gui attribute=$Child:item.object.data_map.image}
{/section}
{/let}

THX :)

Marco Zinn

Wednesday 21 January 2004 1:00:34 pm

No, your image is probably uploaded fine.
What happens: the template uses some predefined default size ("small" or so) to display the image, when you use the attribute_view_gui .
This required the image to be scaled and THIS scaling needs some image processing (ImageMagick or GD).
If you don't have any of those two, you can only display the image in "original" size.
You can try
{attribute_view_gui attribute=$Child:item.object.data_map.image size=original}
but I don't know, if this works.

You should have a look at the "embed"-templates, there must be one for images. This is used, when you embed an image(image object) in an XML field.
Or look for the "view attribute" template of the image datatype. Probably somewhere in design/standard/datatypes/view/image or the like.
Hope, that helps.

Marco
http://www.hyperroad-design.com

Vincent Basset

Thursday 22 January 2004 6:33:12 am

Hi Marco,

{attribute_view_gui attribute=$Child:item.object.data_map.image size=original}

=> it doesn't works... :(

Or look for the "view attribute" template of the image datatype. Probably somewhere in design/standard/datatypes/view/image or the like.

=> do you mean design/standard/templates/content/datatype/view/ezimage.tpl ?
If yes, what am I supposed to change here ??? :/

Lazaro Ferreira

Friday 23 January 2004 11:11:18 am

Hi,

I'm not sure but take a look at your Settings in your image.ini or image.ini.append

if you don't have neither ImageMag.. nor Gd installed, probably you will need to change the settings value to match your setup

We have a similar problem, but in our case EZP was trying to use Imagemag.. for conversion, so we have to change the settings to :

[ConverterSettings]
UseConvert=false
UseGD=true

[Rules]
DefaultRule=image/jpeg;gd
Rules[]=image/jpeg;image/jpeg;gd
Rules[]=image/png;image/png;gd
Rules[]=image/gif;image/png;gd
Rules[]=image/xpm;image/png;gd
Rules[]=image/tiff;image/png;gd

-----------------------------------------------
The Rules settings have the mime type of the images accepted by EZP and the conversion method
could be 'convert', or 'gd' (convert for imagemagick)

This is a setup, which do not have Imagemagick instead GD

I think that your setup should be something like this :

[ConverterSettings]
UseConvert=false
UseGD=false

[Rules]
DefaultRule=image/jpeg
Rules[]=image/jpeg;image/jpeg
Rules[]=image/png;image/png
Rules[]=image/gif;image/png
Rules[]=image/xpm;image/png
Rules[]=image/tiff;image/png

-----------------------------------------
The ConverterSettings changes, seems trivial!
The Rules changes, may or may not work, but you could try it

Hope this help
Lazaro

Lazaro
http://www.mzbusiness.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 18 2025 22:20:09
Script start
Timing: Jan 18 2025 22:20:09
Module start 'layout'
Timing: Jan 18 2025 22:20:09
Module start 'content'
Timing: Jan 18 2025 22:20:10
Module end 'content'
Timing: Jan 18 2025 22:20:10
Script end

Main resources:

Total runtime0.8958 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0118 587.9297152.6250
Module start 'layout' 0.01180.0047 740.554739.4453
Module start 'content' 0.01660.8779 780.0000597.9141
Module end 'content' 0.89450.0013 1,377.914112.1641
Script end 0.8958  1,390.0781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4611160.0003
Check MTime0.00150.1619160.0001
Mysql Total
Database connection0.00120.131710.0012
Mysqli_queries0.827492.3578620.0133
Looping result0.00070.0729600.0000
Template Total0.856295.620.4281
Template load0.00180.202520.0009
Template processing0.854495.374920.4272
Template load and register function0.00020.017810.0002
states
state_id_array0.00080.092810.0008
state_identifier_array0.00110.124020.0006
Override
Cache load0.00170.1849720.0000
Sytem overhead
Fetch class attribute can translate value0.00070.081830.0002
Fetch class attribute name0.00150.167950.0003
XML
Image XML parsing0.00080.092530.0003
class_abstraction
Instantiating content class attribute0.00000.001550.0000
General
dbfile0.00220.2421160.0001
String conversion0.00000.001340.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
15content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
12content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 34
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs