SmileyGenerators.com Basic smiley generator tutorial.

NO REDISTRIBUTION!
You may learn from this application and develop your own smileygenerator based on this code but you may NOT use this code or supplied images verbatum in any public application! This tutorial remains the sole property of Smileygenerators.com and all rights are reserved.
Body: Mouth: Eye:


Generated Image

This is an example of a very basic smiley generator.
All image parts are prepositioned on on a static canvas and saved to the proper parts folder.
Notice in the drop down values that the full relative path is given rather than just the image id.
The reason for this will become apparent in future tutorials.
The entire application consists of the following:

The temp folder must be chmodded to "0777" on linux servers in order for the image to be saved.
Any number of elements may be placed in each parts folder as long as each element is also defined in the drop down list for that image component.
Use the existing values as a template.
A 30x30 PSD file with a body, mouth, and eyes is supplied as an example.
*NOTE: Be sure the body position never changes! Then position new elements over the body and correct the position of those individually.
You can lock the body layer in Photoshop and it's probably a good idea to do so.
Hide/unhide elements and save the prepositioned elements without trimming.
The final image element size must always be 30x30!

Once your forms are in place and all image parts defined, start by creating a 30x30 working canvas.


As you can see, the canvas is created with no pallette, no transparency.

Next, we define a "dummy" transparency by allocating a seldom used color and setting it transparent.


Next we create each image element that will be used in the smiley.

The final task is to merge all parts with our working canvas and save the finished image to the temp folder


You can view the .phps file below to see how all this works or you can download the entire tutorial package here



SmileyGenerators.com Basic smiley generator tutorial
©2006 smileygenerators.com
ALL RIGHTS RESERVED