I have a suggestion regarding your thoughts on generating sets of image sizes depending on your predicted needs.
This is a fairly common thing to do and makes a lot of sense out the outset. However, down the road, you might run into headaches if you decide that your presentation code needs an image size that doesn't exist. I would suggest looking into the idea of holding on to the original and generating the 'called' size, the size as needed by the presentation code, rather than bulk resizing. You could then generate some procedures that would check on the file system for image image1_300x200.jpg (for example) and if it cannot find it, it would then call the image resizing proc to create one and then look for the file again. For instance, let's say you have two types of greeting cards. One with the BIG image, on with the SMALL image. The user could view the available images on the preview page (with thumbnails called by the preview presentation code), and then pick the image size they want. That way you have generated 3 total images - one for the thumbnail, one for the BIG size, and one for the SMALL size (assuming they previewed each). That's three images instead of defaulting to 5 every time and you're set up to handle x number of sizes. Not a big deal at first, but later, ughhh! On 7/12/07, Dennis Daupert <[EMAIL PROTECTED]> wrote:
I am writing a Gallery application in perl/Catalyst. These are lots of interesting choices to make! If any one on this list has engaged in such a mad enterprise, I'd be interested in your experience. I am interested in any advice, links to how-tos, best practices, articles, or tips. I have questions such as: What precautions should be taken for security? What is a good file upload size limit, if any? What subset of (all possible) file formats should be supported? What gotchas might there be? And I have a few "software architecture" questions. I have a central gallery where images would be uploaded to. From there, images of varying sizes could be linked to articles, stories, eCards, thumbnail lists, etc. Because different sizes of the same image might be needed for different uses, I thought I'd generate a whole set of image sizes for each uploaded image. So, I'd have subdirectories for _orig original, _t thumbnails, _sm small, _med medium, and _lrg large file sizes. Does this approach seem reasonable? If the initial image file is REALLY large (such as a RAW formatted digital image), should I convert that file to a smaller size (say, 1024x768) and save as the "original?" Should I convert the original image to a png to reduce lossiness of subsequent transformations, even tho that may inflate the initial file size? /dennis _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
_______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
