Code solutions to PHP, JS, CSSCode source PHP, JS, CSS

Spread your code soluces to the world

Love me

PHP GD IMAGE Source code

Image class resize and rounded mask

02/02/2012 by Dux   /   5/5 (1 ratings)
This PHP GD class offers several useful features. It resizes images, apply a rounded mask with various options : • output size • crop mode : crop to fill, fill to fit • rounded corners or square • color of the rounded mask It is complete and usable in all cases. This class use the PNG mask round_440.png

PHP watermark

01/13/2012 by Dux   /   5/5 (3 ratings)
This script applies a watermark on a JPG, GIF or PNG image. The watermark comes from a 24-bit PNG that preserve empty areas around the logo. I recommend Photoshop to make it. This is the only script that changes the opacity of an image before pasting to another. For indeed, PHP5 and GD2 library does not own filter opacity. Operation is simple....

Isolate a color

06/06/2011 by Dux   /   not rated
Here is a class to isolate a primary color rendering of a photo black and white. The choice of using Object-oriented programming instead of a function gives the advantage to add filters or other image effects thereafter. Instantiation [code]$obj = new image_effect(); // Optional : ratio size of the working image. default : 2 ...

Simple image gallery PHP

06/01/2011 by Dux   /   3.8/5 (9 ratings)
The following code is an image gallery script in PHP as easy as possible. A single file of a few lines of code is sufficient to list the images, create thumbnails and display them. Copy the entire code into a PHP file. Name it as you wish and drop it in a directory containing images. For reasons of simplicity, this code has no error handling....

Adjust the rate of image colors

05/25/2011 by Dux   /   2/5 (1 ratings)
This script adjusts the amount of colors in a jpg, gif or png picture. By modifying the value $variant between -25 and 15, you get a picture more or less colorful. Original picture

Automatically adjust brightness contrast of an image

05/18/2011 by Dux   /   4.8/5 (6 ratings)
This script adjusts the brightness and contrast of an image using PHP5 and the GD2 library. Set the variable $url_img with the path of your initial image. You can change the variable  which corresponds to the size of the working image of the script.