Re: AW: feature request: sffx in pil_img_resize
Thorsten Weber <[email protected]> Fri, 16 Apr 2010 15:01:15 +0200
| Newsgroups | gmane.comp.cms.zms.devel |
|---|---|
| Message-ID | <[email protected]> |
I am working with ZMS2 2.12.1-10 (Build #132e) ... eventually not the lastest build. ;)
seems as if it is moved from _fileutil.py to _pilutil.py:
http://zmslabs.org/trac/browser/ZMS/trunk/_pilutil.py#L100
maybe it would be more flexible if the sffx param could be used for custom suffixes
nevertheless - if sffx == 'none' or sffx == '' - it could default to '_thumbnail'
maybe i got it wrong anyway ?!
but when i use the following function for more than one image, like ...
pil_img_resize(getObjProperty('image_source',REQUEST),
(400,160),
mode='resize',
sffx='big',
qual=75)
pil_img_resize(getObjProperty('image_source',REQUEST),
(195,78),
mode='resize',
sffx='small',
qual=50)
then both images are named name_image_source_thumbnail.jpg
the other way it would result to:
name_image_source_big.jpg
name_image_source_small.jpg
i hope i could make the point clear enough ...
regards, Th. Weber
Am 16.04.2010 um 14:24 schrieb Dr. Frank Hoffmann:
> Hello,
> You are working with a former ZMS version?
> The API function now is placed into the pilutil module :
> http://zmslabs.org/trac/browser/ZMS/trunk/_pilutil.py
> http://zmslabs.org/trac/changeset/918
>
> Maybe you send us the py code for a better understanding of your proposal?
>
> Thanks
> fh, moderator
>
> ________________________________
>
> Von: [email protected] [mailto:[email protected]]
> Im Auftrag von Thorsten Weber
> Gesendet: Freitag, 16. April 2010 12:09
> An: [email protected]
> Betreff: [zms-developers] feature request: sffx in pil_img_resize
>
> Hello.
>
> is it possible to change the usage of parameter 'sffx' (line 447 in
> _fileutil.pil_img_resize) for future releases?
>
> thumb_sffx = '_thumbnail' as default is good ... but
> thumb_sffx = '_' + sffx would allow to process images with custom sffx ...
> !?
>
> regards, Thorsten
> thorsten weber
>
>