Ever want to be able to allow people to download some of your sweet wallpapers that you've designed? The problem is, what resolution do you offer? Tricky, no? In a lot of ways it echoes the same issues of web design -- do you design for the lowest common denominator, i.e. 800×600, or do you make a bunch of them at different sizes? That seems dumb -- and a lot of work. Not to mention what about the crazy laptop resolutions out there like 1440×768. Are you gonna offer that size too?
Don't bother -- I have the solution for you! the One-Size-Fits-All Desktop Downloader -- let's call it the OSFADD. It uses JavaScript to detect the system resolution, then sends an AJAX request to PHP that auto-generates a sized image for you and then returns the image to the browser -- all without leaving the page. Another nice feature is that it only creates new images if it hasn't yet -- cutting down on unnecessary server load. I'm posting the source up -- lets start thinking smarter not harder kids.
Oh, and BTW, I am also using some pretty tricky PHP stuff to use the url to figure out the image using the PHP Fancy Hidden Extension Technique. So, if I had a different source image besides "wallpaper.png", say "other.png" you could change the last portion of the url from "wallpaper" to "other" and it will grab that PNG instead. Pretty slick, huh?
Try out the OSFADD now!
Trackbacks
Comments