Search Box


Sunday, February 18, 2007

ever wanted to make a face to others ?

Subject : Face cropping in flash, irregular image cropping, cropping of irregular shapes and of irregular symmetry.

I do not know why but amongst all the new features of flash player 8, BitmapData stands out of the rest shining like DHRUVA guiding and seemingly being the solution to all image/graphic related issue in flash (those issues are now history anyway).

But i would say that BitmapData ROCKS. Few days back i was just feeling i am getting to love this class very much and wanted to mention about her again and again. The rest of the blog is all about a small application that i had developed to meet the need like cutting a face or cutting a portion of the image using flash. I mean basically think it as an application/tool for cutting the beautiful face of yours and adding it to the headless cartoon with Superman's body. I know you have already suspected that i am upto some mischief. Maybe but even though it is so, but the end result is a tool being developed with the power of flash and php.

First of all i would like to thank "SEPIROTH" for his wonderful class tha does the saving of BitmapData and sending it to php safely. Hei man your class really rocks.

Next coming to the flash part (kudos to ME), which is the easiest part than php. Here is the place where some points are added to the image and in turn the points are interconnected with the lines and filled duly thus making a shape of irregular symmetry. No problem i have at all the times keep monitoring the individual points for their x,y coordinates and thus using them to compute the rectangle formed by these collection of points.

Do not get overwhelmed at this point for once you see the output you will start to understand howExaggerating i was in this summarisation. But still if you still wish to proceed by reading further read on, else jump to the bottom where there is a link pointing to the location of the files. No problem at all jumping and do not feel bad.

But before jumping to the link make sure you have all this in your system to test the tool !

PHP server with GD library installed.

Note: To install GD library (if not installed, make sure you take a backup of you php.ini before you make any changes.), open you php.ini file and remove the ';' symbol before the line ";extension=php_gd2.dll". This is for windows and i dont know what it looks like to enable GD library in php on linux box. i guess it should be "" instead of ".dll".

Link to the image cropping files.

Link to the screenshot of the tool

(incase you are finding it difficult to download the file then mail me : i will see to that i will be in a position to sort it.)

Hope you enjoy and use this tool for your wildest uses and adventures.


Ashok Srinivasan.