We are about to switch to a new forum software. Until then we have removed the registration on this forum.
thanks in advance!
Use get() to crop a region:
Then use save() to get it as a file:
Just make sure to use clear() to have a clean transparent background:
And an online example which uses get() to obtain a PImage from a PGraphics robot drawing:
what about crop i want to do like photoshop but there seems no function to achieve it , and aftere the cut the part cut will be transparent while export to png file in processing
seems not cut yet?
can somebody give me an example??
// save board image (only)
if (key=='d' || key=='D')
PImage outIMG, diaIMG;
outIMG = get(0, 0, width, height);
diaIMG = outIMG.get(10, 80, 770, 490);
diaIMG.save("d" + timestamp() + ".png");
mask() can only be used with an image that's the same size.
the function timestamp() does not exist
this two error who can solve it？？？
can somebody told me what mask() is ， in processing language encyclopaedia seemed not concerned with cropping（My English is bad...）
but how can rotate achieve in back not show （i mean not use image（）in draw（）function drawing it and then rotating finally export）
Sorry for my cryptic post.
Here is a program to show the use of mask.
See the keypress function with 'D' key.
Hope this helps.
thanks it really helps me
but what diaIMG = outIMG.get(10, 80, 770, 490); is i saw get but can't find anything similar to image.get() ,does it work similar to get() function ?? hope someone can tell me.
http://bazaar.launchpad.net/~philho/+junk/Processing/view/head:/_QuickExperiments/TexturePaint2/TexturePaint2.pde shows an example of using mask().