It’s been awhile since my last post; clearly I’m not a natural blogger. Most of life seems ok by itself without clothing (cloaking?) it in meta. But then again….
Noticed awhile ago I posted about improving the Image Conscious web site by changing the slideshow image generation from manual layouts to a programmatic rotation through an array of slides, each of which pulls up another array of product shots already on the web site, in other words updating it became as easy as updating an array, avoiding all that tedious mucking about in InDesign (apologies to the heirs of Douglas Adams, and Adobe – nothing against the mighty and fine InDesign program, which I love).
That was a huge improvement, and a real timesaver. However, the spiffiness began to pall as I still had to plug in array values for the image scaling – the images would auto-size themselves to the same height, but horizontal ones could look huge, vertical ones would look small, etc. I’d upload the array of product IDs and then spend a bunch of time adjusting the scaling values over and over again. Tedious to say the least. Time for a rewrite!
The new code now finds the image set for a given slide, polls their dimensions, works out their proportions, figures out scaling factors to equalize their area ( = visual size), then works out a second scaling factor so the group fits in the slide area. Less tedium for me, a nice head-scratching little coding project, and more rapid updates. Miles better!