How did they do this?

Discussion in 'HTML & Website Design' started by Dee2007, Dec 21, 2012.

  1. #1
    Hi

    This site below allows you to preview what the dog tags look like before ordering, anyone know how they done it, or I should rephrase that because it is probably a custom script, so does anyone know of a script that allows you to do that?

    http://www.mydogtag.com/order.php#preview

    I just seen it and was curious.

    Thanks

    Dee
     
    Dee2007, Dec 21, 2012 IP
  2. Deluxious

    Deluxious Greenhorn

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #2
    They're rendering the images on the fly on the server. So you can change your name or details or whatever, and when the image updates, a rendering script runs on the server. Check the url of the images being served - the img src is "dogtagrender.php" with a query string. PHP comes with basic image rendering capabilities by default, and some of the more complicated ones can be installed.

    My guess is they have pre-generated all the letters and numbers in photoshop and then simply arrange them in the image rendering script to deliver a single image.

    Check out the php image processing documentation here: http://php.net/manual/en/refs.utilspec.image.php
     
    Deluxious, Dec 22, 2012 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    The laugh being it could just as easily be done client side with scripting or built using HTML. You'd just set up a bunch of fixed size span for where letters could go with classes on them to chose which part of a CSS sprite should be shown.

    If you built that server side first, then used scripting to handle it in realtime, it would probably be far more impressive.
     
    deathshadow, Dec 22, 2012 IP