Hello,
Thanks, I have displayed the images which them was stored in a Oracle's BLOB field, with:
<dtml-call expr="RESPONSE.setHeader('content-type','image/jpeg')"> <dtml-in SQLMethod_with_a_Only_Row> <dtml-var expr="BLOB_FIELD.read()"> </dtml-in>
However, I would like to resize this image. I can not do it with the "height" and "width" attributes, because the image is obtained from a Oracle's BLOB field, and no from image object (i.e.: I can not use <dtml-var "ImageObject.tag(border='5', align='left')">).
How can I do it ?
Thanks again !
Hi Juan,
Juan Javier Carrera Obrero wrote:
Hello,
Thanks, I have displayed the images which them was stored in a Oracle's BLOB field, with:
<dtml-call expr="RESPONSE.setHeader('content-type','image/jpeg')"> <dtml-in SQLMethod_with_a_Only_Row> <dtml-var expr="BLOB_FIELD.read()"> </dtml-in>
However, I would like to resize this image. I can not do it with the "height" and "width" attributes, because the image is obtained from a Oracle's BLOB field, and no from image object (i.e.: I can not use <dtml-var "ImageObject.tag(border='5', align='left')">).
How can I do it ?
You have to set the height and width atributes of the tag you are generating for the browser to view the image. It is not the responsibility of the BLOB reading method to set the width and height atributes of the img tag.
cheers, Leo
From: Juan Javier Carrera Obrero
Thanks, I have displayed the images which them was stored in a Oracle's
BLOB field, with:
<dtml-call expr="RESPONSE.setHeader('content-type','image/jpeg')"> <dtml-in SQLMethod_with_a_Only_Row> <dtml-var expr="BLOB_FIELD.read()"> </dtml-in>
However, I would like to resize this image. I can not do it with the
"height" and "width" attributes, because the image is >obtained from a Oracle's BLOB field, and no from image object (i.e.: I can not use <dtml-var "ImageObject.tag(border='5', >align='left')">).
How can I do it ?
I don't understand why this would make any difference. The code above is to send the actual image data, the resizing is done when you create the IMG-tag, which I assume you create somewhere else. Or don't you have an IMG-tag at all, just a link?
If you actually want to resize the image itself to send less image-data, the PIL library can be used to do that. But it seems easier to resize the image before putting it into the database in that case.
I'm not really sure when this was asked ( I dont think it was '99) :)
The <img> tag is in the containing document, not the actual method which returns the image... Somewhere else you have an <img src="myZopeUrlWhichReturnsAnImage"> which is where you slap the height and width tags.
On Friday, November 12, 1999, at 07:40 AM, Juan Javier Carrera Obrero wrote:
Hello, Thanks, I have displayed the images which them was stored in a Oracle's BLOB field, with:
<dtml-call expr="RESPONSE.setHeader('content-type','image/jpeg')"> <dtml-in SQLMethod_with_a_Only_Row> <dtml-var expr="BLOB_FIELD.read()"> </dtml-in> However, I would like to resize this image. I can not do it with the "height" and "width" attributes, because the image is obtained from a Oracle's BLOB field, and no from image object (i.e.: I can not use <dtml-var "ImageObject.tag(border='5', align='left')">). How can I do it ? Thanks again !