We are about to switch to a new forum software. Until then we have removed the registration on this forum.
My program saves videos from some webcams connected to the pc. I used to draw the Capture to the screen,add some information of the video(duration,time ...) and then take a screenshot of the sketch,and tehn repeat for every webcam. Now to extend the program I directly save the Capture as PImage, but how do I add the text to the image?
Answers
Put the PImage in a PGraphics, then you can add text and draw other stuff.
can it then be saved in a file like a PImage?
PGraphics is a datatype derived/inherited from PImage.
So anything that can be done to a PImage is equaly true to a PGraphics too.
https://processing.org/reference/PImage.html
For example we can invoke PImage's method save() for a PGraphics too:
https://processing.org/reference/PImage_save_.html
However, if we wish to get a "pure" PImage outta some PGraphics, just invoke get() upon it.
https://Processing.org/reference/PImage_get_.html
P.S.: Notice that Capture datatype inherits from PImage too! :-bd