low quality images after importing them into silva document

"Valentim Branquinho" <[email protected]> Mon, 23 Jul 2007 10:13:50 +0100
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
Hi all!

When working in Silva, importing images and putting them into a Silva
Document, I was feeling that something wrong was happening with images, in
Kupu.
Importing images into Silva, OK, working fine. But when I "place reference"
in Kupu and put a image in a document, the image seems to lose quality
(became blur and without definition).
I do some tests and you can see the different between files, in Silva image
proprieties and the same image in published document or in Kupu editor,
after "place reference":

Take a look in this print:
http://www.uc.pt/pessoal/valentim/kupu_image_blur.jpg

It's obvious that the image was been compressed. But why?
In the mIRC, I asked Daniel Nouri for help on this, if he already saw this
effect in Kupu.
He was so surprised as I and after some tests he realized that something
wrong was happing when putting images in documents.
Seems that the image is being resized, to 100%, when setting a new
modification date.
'An image scaling to 100% is done even if the image doesn't need to be
scaled' and so, the final image loses quality.

To solve this, Daniel told me to make some changes in Silva/Image.py:
# In line 502
if self.web_scale == '100%' and image.info.get('duration', 0):
# changed to:
if self.web_scale == '100%':

After some tests, this change seems to be working perfectly, the images now
doesn't lose any quality.

Regards!

................................
Valentim Branquinho
Taskforce Internet CIUC GCI
University of Coimbra UC.PT
 
Tel: +351 239 853 188
Email: [email protected]

_______________________________________________
silva-dev mailing list
silva-dev-IAPFreCvJWM6s/[email protected]
https://lists.infrae.com/mailman/listinfo/silva-dev
smime.p7s (application/x-pkcs7-signature, 3 KB) - not displayed