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
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 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.
Answers
Use get() to crop a region:
http://processing.org/reference/get_.html
Then use save() to get it as a file:
http://processing.org/reference/PImage_save_.html
Just make sure to use clear() to have a clean transparent background:
http://processing.org/reference/clear_.html
And an online example which uses get() to obtain a PImage from a PGraphics robot drawing:
http://studio.processingtogether.com/sp/pad/export/ro.9ck0KLYubLcZG/latest
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
Use mask()
seems not cut yet? can somebody give me an example??
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. https://www.dropbox.com/s/1ivryty2cxukikg/hexBoard.zip See the keypress function with 'D' key. Hope this helps.
ciao
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().