Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
My first work around was to convert the data into a "simpler" format of a short array sorted: UY VY UY VY ...
But it is still YUV 422 and I don't know how to convert this appropriately into a Magick::Image...
Do I have to convert it first to YUV 444? But that wouldn't be a perfect solution
magick wrote:Can you post a URL to one or two DPX images that are YUV encoded? We will use them to verify that ImageMagick can write proper YUV-encoded DPX images.
Sorry, but I don't have those images. I want to create some from an array I have in VC++!
DPX supports YCbCr at 422 and at 444. Is that what you need? If DPX supports ,YUV can you point us to a reference so we can investigate. ImageMagick supports YCbCR (e.g. convert myimage -colorspace ycbcr image.dpx) but we will need to get back to you on whether it supports YCbCr at 422. If it doesn't we add support sometime this week,
OK, let me try to explain again what I have and what I need.
I'm programming in VC++. Having an array of image data (captured from a cam by myself, no stored image exists) I want to place this data into a DPX file. The data is given as 10 Bit YUV 422. This means I have (width x height) Y values and (width x height / 2) U and V values, respectively, all in 10 Bit. Those YUV values I want to store without any conversion!
Till now I tried a lot but didn't get a format so the in the end stored image is displayed all right. Amongst others I put the 10 Bit values into shorts, inserted the shorts array into a Blob, and initialized an image with that Blob. The resulting image shows something that looks like the upper left quarter of the image but in strange colors and not as accurate as it should be, I think.
You can only store YUV in DPX if the DPX standard permits YUV. We don't have access to the DPX file specification right now. That is why we asked. We do know DPX stores YCbCr but have not heard of it storing YUV. Do you know if the DPX standard supports YUV? If the standard does not support it, you cannot store YUV in DPX without some sort of color conversions (e.g. RGB or YCbCr).
Read your data as a YUV blob. It automatically converts the image to the YCbCr colorspace. Now write the image to a DPX image. If all goes well your DPX image remains in the YCbCr colorspace which we believe is what you want. Use the identify -verbose program to list the attributes of your DPX image to verity its in the YCbCr colorspace.