Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Image to Cartoon convert

Image to cartoon convert with php or javascript

7:13 am on Jun 13, 2009 (gmt 0)

5+ Year Member

Hi friends,

Any one know a real pic to convert like cartoon image via php or javascript.. i too much search but not get any nice code.. but i found some php filters that can do this thing but its not quit efficent any one plz guide my how to convert real image into cartoon like image..

guys if you not understand what my mean i am giving sample site link which work i want to do : <snip>

plz guide me how to do this...


[edited by: dreamcatcher at 9:40 am (utc) on June 13, 2009]
[edit reason] No urls please! [/edit]

7:25 am on Jun 13, 2009 (gmt 0)

5+ Year Member


I can offer some ideas to get you started.

I use the GD image system for manipulating pictures


Create Image

From File
$source = imagecreatefromjpeg(filename);

From Database
$source = imagecreatefromstring($row->imagedata);

$img = imagecreatetruecolor($width, $height);
imagecopyresampled($img, $source, ....)

imagefilter($img, IMG_FILTER_NEGATE);

header('Content-Type: image/jpeg');


Once you've got an image loaded, you can apply quite a few filters:-


I'm sure with some testing/tweaking you could get the desired cartoon effect

2:04 pm on Jun 13, 2009 (gmt 0)

5+ Year Member

Thnkx for ur reply...

but i am new to, php basically i am a web designer and i have not any php script knowledge but from web i get free php script which i am copy and paste, in this way plz if u give me a favour, plz send me a php code which is not load images from database and create a cartoon like image from a real image..

i know in photo shop first we are to an image applying filte-->Artistic-->poster edges, than bright / contrass, then fitler-->Artistic-->Cut out

in these 3 step which is above mentioned we convert a real pic to cartoon like image or pic.

but i dont know how to do this in php but so many searches i found imagic in php.. imagic have so many filters u can see in this following link : [uk3.php.net...]

but i need complete guide how to integrate it..

simple i need a php code which is convert a real image to cartoon like image.




Featured Threads

Hot Threads This Week

Hot Threads This Month