Creating ZMSGraphic Objects

Tobias Greitzke <[email protected]>
Newsgroups gmane.comp.cms.zms.devel
Organization tog.is information design
Message-ID <[email protected]>
Dear ZMS-Developers,

I'm facing some difficulties generating a ZMSGraphic by dtml or python 
script. First thing is that I would like to crate a ZMSGraphic by using 
a Zope-Photo Object, second to zip-upload images and auto-create thumbnails.

1) So fare I managed to read the image information from the photo object 
but I can't figure out how to load it into the ZMSGraphic.

I tried to add the graphic with the following function while "ob" 
contains the photo-image file:

manage_addZMSGraphic({'id_prefix':'id','active':1,'img':ob},context.REQUEST)

I could find out that img needs something like a dictionary but I can't 
find out how it should look like and what the ZMSGraphic is doing with it.

2) right now zip-uploading images into the mediafolder creates only one 
image size. I tried to rewrite the onChangeObjEvt method of the 
ZMS-MediaFolder but I can't figure out how to enable the 
generate_preview_imghires or generate_preview_imgsuperres.
This is what I tried:

<dtml-call "REQUEST.set('img',manage_addZMSGraphic(
  {'id_prefix':'files'
  ,'active':1
  ,'generate_preview_imghires:int':1
  ,'generate_preview_imgsuperres:int':1
  ,'imgsuperres':ob
  },REQUEST))">


ZMS-Version: 2.10.5-23



Thanks
Tobias Greitzke




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/zms-developers/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/zms-developers/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.