Hi everyone,
I was trying to convert YUY2 (UYUV 422) Format to png, but I can't. I've tried this command:
convert -size 1280x720 -depth 8 -format YUV -sampling-factor 4:2:2 yuv:frame.yuv -colorspace rgb png:frame.png
But it doesn't work. I can see the image in the correct size but It appears with green and pick colours. I think I need somehow tell the convert application to configure in YUY2 mode.
Can anyone help me?
Best regards.
How to convert YUY2 (YUYV 422) to png format
-
- Posts: 2
- Joined: 2016-11-28T05:23:52-07:00
- Authentication code: 1151
-
- Posts: 2
- Joined: 2016-11-28T05:23:52-07:00
- Authentication code: 1151
Re: How to convert YUY2 (YUYV 422) to png format
Hi everyone,
I was trying to solve the problem. I've got two image examples from this web: http://www.sunrayimage.com/examples.html
tulips_uyvy422_prog_packed_qcif.yuv
tulips_yuyv422_prog_packed_qcif.yuv
With this command and the image with the YUV format: uyuv 4:2:2 it seems to be that works fine :
display -size 176x144 -depth 8 -sampling-factor 4:2:2 -colorspace RGB yuv:tulips_uyvy422_prog_packed_qcif.yuv
The problem is when I try to use an image with the UYV format: yuyv 4:2:2. The image is displayed with green and pink tones, something that it's normal due to YU and YV are swapped:
display -size 176x144 -depth 8 -sampling-factor 4:2:2 -colorspace RGB yuv:tulips_yuyv422_prog_packed_qcif.yuv
So, right now the problem is: How can I tell the display application that the UY and UV are swapped?
Best regards.
I was trying to solve the problem. I've got two image examples from this web: http://www.sunrayimage.com/examples.html
tulips_uyvy422_prog_packed_qcif.yuv
tulips_yuyv422_prog_packed_qcif.yuv
With this command and the image with the YUV format: uyuv 4:2:2 it seems to be that works fine :
display -size 176x144 -depth 8 -sampling-factor 4:2:2 -colorspace RGB yuv:tulips_uyvy422_prog_packed_qcif.yuv
The problem is when I try to use an image with the UYV format: yuyv 4:2:2. The image is displayed with green and pink tones, something that it's normal due to YU and YV are swapped:
display -size 176x144 -depth 8 -sampling-factor 4:2:2 -colorspace RGB yuv:tulips_yuyv422_prog_packed_qcif.yuv
So, right now the problem is: How can I tell the display application that the UY and UV are swapped?
Best regards.