I am doing a program with ARToolKit, and i need to save a snapshot of the video frame, and save it as a jpg file for example.
Any ideia how can i do that?
Regards
Related
After reading a huge bunch of docs and tutorials I still cant find a way to add some image or text to each frame of video. Something like logo on the frame corner, or text watermark.
Iam know how to do such things with ffmpeg from cli, but for this case, C\C++ code is required.
Looks like, ffmpeg's libav allow me to do some things with frame on decode stage, using AVFrame structure of current frame and add some modifications to it with libavfilter. But how exactly this can be done?
First, you need the image in the same raw format as the AVFrame::format. Then you can patch the image anywhere on the AVFrame. It will be also useful if the "image" has an alpha channel for transparency. Otherwise, you may resort to color keying.
I would like to add a short outro video to a list of videos or add a "watermark" that covers the entire video during the last 5 seconds. How can I achieve this? I added ffmpeg in the title but if there is another free way of doing it in bulk then I am all ears. My OS is Windows 10.
Thanks!
The interesting question here is:
I want to store in a JPEG file some data (from 1kilo to 1mega). Is that possible without damaging the picture?
A practical example: I have an image in which I want to store 500 kb of text without the jpg file to lose it's property of being an image.
I hope you understand my question.
I've been googling around, and all the different answers has got me confused.
In my app I retrieve a contact picture, and put it in an Image object to be displayed to the user.
But I want to save the image to isostorage, and later retrieve it again.
How do I do this?
Can I use the Image.Source for anything?
You cannot get a filename or an ISO storage file.
The only use for ISO storage is to store a file of the bitmap and open a stream to that file to recreate a bitmap later.
The bitmap can then be assigned to the Image.Source.
I have a PDF file where every page is a (LZW) TIFF file. I know this because I created it. I want to be able to load it and save it as a bunch of TIFF files.
I can open the PDF file with CGPDFDocumentCreateWithURL, and get a page. I can even draw the page onto the screen.
What I WANT to do is draw the page into a bitmapContext, so that I can use CGBitmapContextCreateImage to get the image into a CGImageRef. However, in order to create a bitmap context, I need to know the size and resolution of the image. I can't seem to find out how to get either a CGPDFDocument or a CGPDFPage to tell me the resolution of the image object on that page.
Is there an easier way to do this that I'm not realizing?
thanks.
Ghostscript will work for you here :
gs -sDEVICE=tiff32nc -sOutputFile=foo-Page%d.tif foo.pdf
For 2 page document foo.pdf you should get :
foo-Page1.tif
foo-Page2.tif
From memory I think the output resolution from GS is that of the containing Page, not necessarily the resolution of the embedded file (unless these are the same to begin with).
If this is the case and you want to recover the image as it was originally res-wise, you can use iText (java) or iTextSharp(.net) to get to the image content stream (ie. Bytes) and write them out to disk in the format of your choice, after converting the content stream into a PdfImage iirc.
Hope the ghostscript option is applicable to save writing yet another utility...