-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2012-07-10 05:53, Seiichiro MATSUMURA wrote:
Hi,
I try to do the similar thing, capturing from pix_video, saving a specific frame of [pix_buffer] to jpg files. However, the color space and the resolution of saved jpg file is changed. Even saving tiff is the same result.
i'm pretty suzre, that the resolution of the image does not change, even on OSX. with chnaged "color space", do you mean that the colors are stored in the wrong order? or do you mean that your YUV pix ends up as an ARGB image? the latter is not a bug, the former is.
I know one of the ways is converting Gemlist from YUV to RGBA using [pix_rgba] before inputing [pix_buffer_write], but it is told "CPU-consumptive".
are you only told that it is CPU-consumptive, or do you experience any actual problems?
if the conversion is indeed too CPU intensive and you only take snapshots every now and then (not every frame), you could put the [pix_rgba] in a branch that is only executed when needed.
e.g.
gemlist | [r spigot] | | [spigot ] | [t a b] | | | [; spigiot 0( | [pix_rgba] | [r writer] | | [pix_buffer_write foo] | [save /tmp/foo.jpg 0( | [pix__buffer foo[
and click this to capture an image: [; spigot 1; writer 0(
So, is there any solutions to save YUV data in pix_buffer directly to jpg file with keeping colorspace and resolution. I am using Mac OS 10.7.4 and pd-extended 0.42.5.
sorry, i cannot keep track of all the various distributions of Gem.
so, which version of Gem are you using? which image-writing backends are installed (Gem should printout something like "Image saving support: QuickTime")
mfgds IOhannes