Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Kae Verens' Blog:
pre-parsing HTML for incorrectly-sized images
Jul 29, 2008 @ 17:03:55

Kae Verens has a recent blog post that looks at a method for helping to protect users from themselves when working with images - a method for handling ones incorrectly sized.

Every now and then, I get a call from a client who is puzzled why their site is running slow. I would look at their page and see an innocuous image inserted into a paragraph. When I examine the image, though, I see that the client has artificially resized the image using HTML. One recent example showed on-screen as a 300px-wide image. When I examined it, it was actually 3000px wide (approx).

The script looks through some HTML markup and, based on the sizes in the image tags, resizes the images appropriately. An example and the source are provided.

tagged: html image size height width parse resize

Link:

Richard Davey's Blog:
Easy Reflections v2
Mar 07, 2007 @ 14:32:00

Richard Davey has updated his Easy Reflections PHP class according to a new post today:

I have updated my Easy Reflections code and released v2. Thanks to feedback and some code from Monte Ohrt (co-developer of Smarty) he added in cache support and fixed a banding issue with the alpha levels. It all works really nicely now - and the new version, with the new docs are available at http://reflection.corephp.co.uk.

The script takes any image (jpeg/png) and makes a reflection for it (he gives the album cover reflection in Apple's iTunes as an example). Configuration of the reflection is available including intensity, background, and height. Check out the galleries on motortopia.com for an example of it in action.

tagged: easyreflections version release height intensity background cache easyreflections version release height intensity background cache

Link:

Richard Davey's Blog:
Easy Reflections v2
Mar 07, 2007 @ 14:32:00

Richard Davey has updated his Easy Reflections PHP class according to a new post today:

I have updated my Easy Reflections code and released v2. Thanks to feedback and some code from Monte Ohrt (co-developer of Smarty) he added in cache support and fixed a banding issue with the alpha levels. It all works really nicely now - and the new version, with the new docs are available at http://reflection.corephp.co.uk.

The script takes any image (jpeg/png) and makes a reflection for it (he gives the album cover reflection in Apple's iTunes as an example). Configuration of the reflection is available including intensity, background, and height. Check out the galleries on motortopia.com for an example of it in action.

tagged: easyreflections version release height intensity background cache easyreflections version release height intensity background cache

Link:


Trending Topics: