Reputation: 4372
If I have a buffer in memory, which contains an image in YUV format, how can I save the buffer contents to a file, i.e., what file format should I use, and can I view the file later in an image viewer?
Upvotes: 0
Views: 639
Reputation: 63481
If you're in a hurry and it's proprietary, just dump it out. It's a lot easier than linking to PNG or TIFF libraries and getting the support code right. I don't seem to recall most image viewers supporting UYVY format. This would be for television video, right? I used to just use my own formats and have a Cg shader in OpenGL to display the image.
[Edit] For a very simple and portable image format, read this: http://paulbourke.net/dataformats/ppm/
Upvotes: 1