setting scaled image troubles

"Diez B. Roggisch" <[email protected]>
Newsgroups gmane.comp.cms.zms.devel
Message-ID <[email protected]>
Hi,

I'm trying to create a ZMSGraphic-like custom-object that auto-generates 
preview images to embed into the text.

I found more or less everything I need. pil_img_resize, ImageFromData.

But after creating a scaled image, I don't seem to be able to set it to 
the custom object as property, let alone invoke getHref on it.

See the below code for a debugging session. Any suggestions?

(Pdb) img = context.getObjProperty("img", request)
(Pdb) scaled_img = context.pil_img_resize(img, (20, 20))
(Pdb) scaled_blob = context.ImageFromData(scaled_img['data'])
(Pdb) p scaled_blob
<MyImage at >
(Pdb) p img
<MyImage at >
(Pdb) context.setObjProperty("scaled_img", scaled_blob, "ger")
(Pdb) context.getObjProperty("scaled_img", request)
''


Diez
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.