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

Mikko Koppanen's Blog:
Fill patterns
Apr 29, 2008 @ 20:24:50

Mikko Koppanen has a quick post today showing how to use PHP and Imagick to create an image of text filled with another image layer behind it:

The fill pattern is used to annotate text but the named pattern could also be used to fill any shapes that allow fill to be specified (include circles, ellipses, rectangles, polygons etc etc).

His example is pretty simple (with a "Hello World!" output) that pulls in the background image, creates the composite layer over it, adds the text to it and sets the fill to the background image's layer. The whole this is wrapped up and output as a PNG file.

tagged: fill pattern imagick tutorial example png background image

Link:

DevShed:
Creating Image Streams from Existing Graphics with the GD Library in PHP
Aug 20, 2007 @ 16:04:00

DevShed continues its look at using the GD graphics library in PHP with the second part of the tutorial series, this time focusing on the creation of images from existing images (and their streams).

As I stated at the end of the previous article of this series, the GD extension comes packaged with many other useful functions, which indeed deserve a close and detailed look. Thus, in this second tutorial I'll show you how to create different types of image streams from existing graphics, but in this case limiting the process to building GIF, JPG and PNG images.

They work through each of the types (GIF, JPG and PNG) creating an new one from a previous "clouds" image of the same type (a GIF out of a GIF, a JPG from a JPG, etc).

tagged: tutorial gd graphic create stream png jpg gif existing tutorial gd graphic create stream png jpg gif existing

Link:

DevShed:
Creating Image Streams from Existing Graphics with the GD Library in PHP
Aug 20, 2007 @ 16:04:00

DevShed continues its look at using the GD graphics library in PHP with the second part of the tutorial series, this time focusing on the creation of images from existing images (and their streams).

As I stated at the end of the previous article of this series, the GD extension comes packaged with many other useful functions, which indeed deserve a close and detailed look. Thus, in this second tutorial I'll show you how to create different types of image streams from existing graphics, but in this case limiting the process to building GIF, JPG and PNG images.

They work through each of the types (GIF, JPG and PNG) creating an new one from a previous "clouds" image of the same type (a GIF out of a GIF, a JPG from a JPG, etc).

tagged: tutorial gd graphic create stream png jpg gif existing tutorial gd graphic create stream png jpg gif existing

Link:

Stoyan Stefanov's Blog:
CSS Sprites generation tool
Jun 27, 2007 @ 15:29:00

In his latest post, Stoyan Stefanov introduces a new project he's working on, the implementation of CSS sprites:

This is a simple technique used for page load performance purposes. Since HTTP requests are the most expensive thing you can do in regards to front-end performance, you strive for making as little requests as possible. So instead of having the browser download 4 rounded corner images for example, you create one image that has all four. Then you use CSS' background-position to only show the part of the image you want.

He explains briefly how the system works and includes a simple example in PHP (showing how to use the imagemagik utility to create the custom image).

tagged: css sprite generate png image implement css sprite generate png image implement

Link:

Stoyan Stefanov's Blog:
CSS Sprites generation tool
Jun 27, 2007 @ 15:29:00

In his latest post, Stoyan Stefanov introduces a new project he's working on, the implementation of CSS sprites:

This is a simple technique used for page load performance purposes. Since HTTP requests are the most expensive thing you can do in regards to front-end performance, you strive for making as little requests as possible. So instead of having the browser download 4 rounded corner images for example, you create one image that has all four. Then you use CSS' background-position to only show the part of the image you want.

He explains briefly how the system works and includes a simple example in PHP (showing how to use the imagemagik utility to create the custom image).

tagged: css sprite generate png image implement css sprite generate png image implement

Link:

Secunia.com:
PHP "gdPngReadData()" Truncated PNG Data Denial of Service
May 22, 2007 @ 16:09:00

Secunia has posted this new advisory today about an issue with the GD graphics library functionality in PHP that could be used to cause a Denial of Service via a truncated PNG image.

The vulnerability is caused due to the incorrect use of libpng within the function "gdPngReadData()" in ext/gd/libgd/gd_png.c of the GD extension when processing truncated data. This can be exploited to cause an infinite loop by e.g. tricking an application to process a specially crafted file. (reported by Xavier Roche)

This issue has been confirmed in PHP versions 4.4.7 and 5.2.2 but may affect others. The issue has already been corrected, however, and can be fetched from the PHP CVS system to protect your system.

tagged: gd image png truncate denialofservice secunia gdpngreaddata gd image png truncate denialofservice secunia gdpngreaddata

Link:

Secunia.com:
PHP "gdPngReadData()" Truncated PNG Data Denial of Service
May 22, 2007 @ 16:09:00

Secunia has posted this new advisory today about an issue with the GD graphics library functionality in PHP that could be used to cause a Denial of Service via a truncated PNG image.

The vulnerability is caused due to the incorrect use of libpng within the function "gdPngReadData()" in ext/gd/libgd/gd_png.c of the GD extension when processing truncated data. This can be exploited to cause an infinite loop by e.g. tricking an application to process a specially crafted file. (reported by Xavier Roche)

This issue has been confirmed in PHP versions 4.4.7 and 5.2.2 but may affect others. The issue has already been corrected, however, and can be fetched from the PHP CVS system to protect your system.

tagged: gd image png truncate denialofservice secunia gdpngreaddata gd image png truncate denialofservice secunia gdpngreaddata

Link:

Richard Davey's Blog:
Easy Reflections
Oct 25, 2006 @ 21:34:00

On his blog today, Richard Davey shares a bit of code that will take an image and make a "nicely formatted reflection" of it automatically.

You can use it to give your site that 'iTunes / Apple' look if you so desire. I created it to make image uploads to a site I run look that little bit nicer, so figured I would share it with you all.

The script, Easy Reflections, can be grabbed from here along with the installation and use instructions (including the values for the six parameters to change the image).

tagged: easy reflections functionality image relfect gif jpeg png download easy reflections functionality image relfect gif jpeg png download

Link:

Richard Davey's Blog:
Easy Reflections
Oct 25, 2006 @ 21:34:00

On his blog today, Richard Davey shares a bit of code that will take an image and make a "nicely formatted reflection" of it automatically.

You can use it to give your site that 'iTunes / Apple' look if you so desire. I created it to make image uploads to a site I run look that little bit nicer, so figured I would share it with you all.

The script, Easy Reflections, can be grabbed from here along with the installation and use instructions (including the values for the six parameters to change the image).

tagged: easy reflections functionality image relfect gif jpeg png download easy reflections functionality image relfect gif jpeg png download

Link:

AddedBytes.com:
Regular Expressions Cheat Sheet
Sep 15, 2006 @ 12:46:23

One of the more elusive concepts of programming can be working with regular expressions. Now, there's lots of places to learn them and to get a handle on what they can do (such as this book), but what if you don't need the full-blown reference and just want a quick and dirty reference source? AddedBytes.com is happy to be of service with their latest cheat sheet divided up into the different formats (anchors, character classes, assertions, escape characters, etc).

The Regular Expressions cheat sheet is designed to be printed on an A4 sheet of paper and live by a designer or developer's desk, to make life a bit easier. A description of what is on the cheat sheet follows, or if you are impatient, you can go straight to the full size Regular Expressions cheat sheet.

This time, they've posted it in a few different formats, including a torrent file to make for faster/easier download. They still have the usual methods (PDF and PNG) but you'll need to visit the page for those links - it's been requested not to directly link to them.

tagged: cheat sheet regular expression pdf png torrent cheat sheet regular expression pdf png torrent

Link:


Trending Topics: