You are not logged in Log in Join
You are here: Home » Members » Marc's Zope Page » ImageTag_CorePatch » ImageTag hotfix for thumbnail generation » View NewsItem

Log in
Name

Password

 

ImageTag hotfix for thumbnail generation

ImageTag_Hotfix

This hotfix makes it so that all Image (and derived) object use PIL to resize when you use the tag method with integer (non-%) height and/or width parameters.

This way, stuff like the PhotoAlbum will behave (not give you a page full of full-image thumbnails).

This version should be cache aware, it's recommended for big sites to associate these with a RAMcache to cut down on PIL usage- thought it's pretty fast.

It also steals the RESPONSE.set_header code from Image so the thumbs are cached on the clients.

Since it's a hotfix it's easy to try it and see if it's working for you, and remove it if not. It does not modify any of your images - it generates the thumbs on the fly and only stores them in a RAMcache if you have one set up.

Check the README.txt for sage advice on getting PIL to work :)

Contact: [email protected]