My favorites | Sign in
Project Logo
                
Search
for
Updated Mar 02, 2009 by re5etsmyth
trickyImg  
an overview of trickyImg, an image helper file included for the hell of it

trickyImg

trickyImg is a php script I have been using lately to speed up the design / development of sites, so I thought I might as well throw it in here, especially because I made filters to work with it.

By default, trickyImg is located at /trickyinc/images/trickyImg.php

At the moments, it has two modes, pixel and gradient, described below:


pixel mode

Pixel mode allows you to create transparent pixels to use as tiled background images.

usage

trickyImg.php?type=pixel&o=50&r=255&b=255&green=255

parameters

type ('pixel'|'gradient')
type=pixel is used to tell trickyImg to make a pixel. Pixel is the default mode, so at the moment, you don't actually have to pass this.

o (integer, 0-100)
How opaque the image should be. If you don't pass this, it will default to 80

color (3|6 character hexideximal)
A hexadecimal color representation. Can be 3 or 6 characters. If this is passed, the r,g and b parameters will not be used.

r (integer, 0-255)
How much red to use. If you don't pass this, it will default to 0. Can only be used if color is not passed.

g (integer, 0-255)
How much green to use. If you don't pass this, it will default to 0. Can only be used if color is not passed.

b (integer, 0-255)
How much blue to use. If you don't pass this, it will default to 0. Can only be used if color is not passed.


Gradient Mode

gradient mode allows for the generation of vertical or horizontal gradients

usage

trickyImg.php?type=gradient&d=h&start=0F0&end=F0F&height=100&width=300

parameters

type ('pixel'|'gradient')
type=gradient is used to tell trickyImg to make a gradient.

d ('h')
d=h is used to tell trickyImg to make a horizontal gradient. If this is not passed it will make a vertical gradient.

start (3|6 character hexideximal)
the color to start with. A hexadecimal color representation. Can be 3 or 6 characters. If this is not passed it defaults to 'FFF'

end (3|6 character hexideximal)
The color that is transitioned to from the start color. A hexadecimal color representation. Can be 3 or 6 characters. If this is not passed it defaults to '000'

height (integer, 1 or greater)
The output gradients height in pixels. Defaults to 500.

width (integer, 1 or greater)
The output gradients width in pixels. Defaults to 500.


Sign in to add a comment
Hosted by Google Code