Hi; I saw somewhere someone adding code like this: <img src="myimage.jpg/resize" /> that would automatically resize his image according to a predetermined standard. Does anyone know how this or something similar is done? TIA, Tony ________________________________________________________________________ AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.
--On 4. März 2007 09:10:13 -0500 tonylabarbara@aol.com wrote:
Hi; I saw somewhere someone adding code like this: <img src="myimage.jpg/resize" /> that would automatically resize his image according to a predetermined standard. Does anyone know how this or something similar is done? TIA,
This is nonsense. This code will generate an image with a fixed URL without any additional functionality - neither on the server nor on the client side. -aj
Hmm. I have it working on the server from which I am moving to another server. I didn't build the code. But it sure does work just fine. Sorry. Not nonsense. Anyone else have any ideas? TIA, Tony -----Original Message----- From: lists@zopyx.com To: tonylabarbara@aol.com; zope@zope.org Sent: Sun, 4 Mar 2007 10:16 AM Subject: Re: [Zope] Resizing Images In Page Templates --On 4. März 2007 09:10:13 -0500 tonylabarbara@aol.com wrote:
Hi; I saw somewhere someone adding code like this: <img src="myimage.jpg/resize" /> that would automatically resize his image according to a predetermined standard. Does anyone know how this or something similar is done? TIA,
This is nonsense. This code will generate an image with a fixed URL without any additional functionality - neither on the server nor on the client side. -aj ________________________________________________________________________ AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.
(Sun, Mar 04, 2007 at 09:20:06AM -0500) tonylabarbara@aol.com wrote/schrieb/egrapse:
Hmm. I have it working on the server from which I am moving to another server. I didn't build the code. But it sure does work just fine. Sorry. Not nonsense. Anyone else have any ideas?
There is a photo resizing product that IIRC works like that. It lets you specify sizes and even some simple image manipulations in the image path. It's a bit older and I think it worked with PIL. It's in the products list on zope.org. You might want to look through those products. Regards, Sascha
ImageTag_Hotfix. Got it! Thanks! Tony -----Original Message----- From: zopelist@betabug.ch To: zope@zope.org Sent: Sun, 4 Mar 2007 4:41 PM Subject: Re: [Zope] Resizing Images In Page Templates (Sun, Mar 04, 2007 at 09:20:06AM -0500) tonylabarbara@aol.com wrote/schrieb/egrapse:
Hmm. I have it working on the server from which I am moving to another server. I didn't build the code. But it sure does work just fine. Sorry. Not nonsense. Anyone else have any ideas?
There is a photo resizing product that IIRC works like that. It lets you specify sizes and even some simple image manipulations in the image path. It's a bit older and I think it worked with PIL. It's in the products list on zope.org. You might want to look through those products. Regards, Sascha _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ________________________________________________________________________ AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.
Hmm. I have it working on the server from which I am moving to another server. I didn't build the code. But it sure does work just fine. Sorry. Not nonsense. Anyone else have any ideas? Ehm... but this code is a nonsense or rather, you made a mistake when you've written previous e-mail
<img src="myimage.jpg/resize" /> It is plain html. something like: <img tal:attributes="src myimage.jpg/resize" /> may do something 'dynamic'. -- Maciej Wisniowski
Hmm. I have it working on the server from which I am moving to another server. I didn't build the code. But it sure does work just fine. Sorry. Not nonsense. Anyone else have any ideas? Ehm... but this code is a nonsense or rather, you made a mistake when you've written previous e-mail
<img src="myimage.jpg/resize" /> OK, I thinked again about this. This may work :) You may have object with id 'myimage.jpg' with resize method, and it may be referenced this 'hardcoced' way.
-- Maciej Wisniowski
Maciej Wisniowski <maciej.wisniowski@coig.katowice.pl> writes:
<img src="myimage.jpg/resize" /> OK, I thinked again about this. This may work :) You may have object with id 'myimage.jpg' with resize method, and it may be referenced this 'hardcoced' way.
Or there exists another object named 'resize' which can be acquired this way. That's how I have done this sometimes (e.g. resize is a python script which expects to be called with an image or file object as it's context) stefan.
Hi tony
I saw somewhere someone adding code like this: <img src="myimage.jpg/resize" /> that would automatically resize his image according to a predetermined standard. Does anyone know how this or something similar is done? Yes, I have seen this. Silva, a zope based CMS, has a class called SivaImage. Inside that object, you can specify a scale. Then inside another class called SilvaDocument, it will be called as follows:
<img src="myId.jpg/hires_image"> -> Will get the image with its real resolution <img src="myId.jpg/image"> -> Will get a resized version of the image I know that class uses PIL. You could download it from: http://www.infrae.org/ and take a look at it. The only thing I don't like is that when saving an image, its name will be either "hires_image.jpg" or "image.jpg" instead of the real name. Regards Josef
participants (6)
-
Andreas Jung -
Josef Meile -
Maciej Wisniowski -
Sascha Welter -
Stefan Bund -
tonylabarbara@aol.com