crazyDev Posted December 7, 2015 Share Posted December 7, 2015 I want to load an image, have the user crop a part of it as polygon or free form, and then have it saved for later use as a resource. Is it possible with Phaser or do I need something else to achieve that? Link to comment Share on other sites More sharing options...
tips4design Posted December 7, 2015 Share Posted December 7, 2015 So you want to crop a polygon from a shape (and have rest of pixels set to transparent) ? You could store the polygon where the user clicks, maybe get a library for that, and then for each point in the image if it is also in the polygon, save it, otherwise remove it. Most probably Phaser doesn't have this built in, as it is not a core trivial functionality. Link to comment Share on other sites More sharing options...
Tilde Posted December 8, 2015 Share Posted December 8, 2015 Well, I dunno about freeform on the user's part, but it is possible to mask an image using graphics data. Link to comment Share on other sites More sharing options...
crazyDev Posted December 9, 2015 Author Share Posted December 9, 2015 My goal is to take an image and make a cartoon out of it like Saddam Hussein's character in the South Park movie. So the goal is to have the user select a person's face out of the image and then divide it into the lower jaw and rest of the face, and have them saved for use as resources. Here you can see what I'm trying to achieve: https://www.youtube.com/watch?v=yADrtfAmLTo Link to comment Share on other sites More sharing options...
Recommended Posts