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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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/