• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

davidmharding

technically enthusiastic

  • welcome
  • portfolio
  • resumé
  • contact

Product Slideshow Revisited

You are here: Home / design/art / Product Slideshow Revisited

February 19, 2015 by dmh

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!Screen Shot 2015-02-19 at 8.21.28 PM

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!

Filed Under: design/art, self-promotion, webdev

Primary Sidebar

Recent Posts

  • includes v. indexOf
  • Bashing
  • Product Slideshow Revisited
  • AcademyX JS for Programmers + jQuery Brush-Ups
  • AcademyX Marks the Spot

Recent Comments

    Archives

    • May 2016
    • October 2015
    • February 2015
    • June 2013
    • February 2013
    • April 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011

    Categories

    • art/design
    • design/art
    • dev
    • education
    • self-promotion
    • Uncategorized
    • webdev

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org

    Footer

    • LinkedIn
    • Pinterest
    • Twitter

    Copyright © 2023 · Studio Pro on Genesis Framework · WordPress · Log in