Duncan Webb wrote: > Chandan Pitta wrote: > > It was you patch with, but using: > new_image = image.scale_preserve_aspect(config.WWW_IMAGE_THUMBNAIL_SIZE) > Which means that resize_image_to_square could go, but I see we need this. > > This means that I can now change freevo cache to create these images. > And this means that the library.rpy need to read the cached image size. > I'll let you know when this is done.
I have now completed the creation of cache webserver images. To do this I have added some helper functions, they are: utils.fileops.www_link_cachedir() returns the path to the link cache utils.fileops.www_image_cachedir() the same for image caches utils.fileops.cache_www_image(filename) creates the cache image and returns it's size. Uses kaa.imlib2.scale_preserve_aspect. Because of the way cache works it caches every image, including movie and audio images. This may be better for movies and audio, the cached images look better too. I think that we can dump the THRESHOLD_SIZE stuff as every image is cached. Tried to only process images bigger than the threshold, but it means opening every image to get its size. I think that this makes life easier, I haven't done the code changes in library.rpy. I added WEBSERVER_CACHEDIR to freevo_config to allow the cache to be stored somewhere else. The default value is FREEVO_CACHEDIR. Still need to implement the deletion of images when something changes or have been deleted, but there is no rush for this. Duncan ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Freevo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-devel
