homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Image to Cartoon convert
Image to cartoon convert with php or javascript

5+ Year Member

Msg#: 3932543 posted 7:13 am on Jun 13, 2009 (gmt 0)

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]



5+ Year Member

Msg#: 3932543 posted 7:25 am on Jun 13, 2009 (gmt 0)


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


5+ Year Member

Msg#: 3932543 posted 2:04 pm on Jun 13, 2009 (gmt 0)

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.



Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved