[PD] Reading a specific image from [pix_buffer] and saving it using [pix_write]

Seiichiro MATSUMURA sei at low-tech-ism.com
Tue Jul 10 05:53:04 CEST 2012


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 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".
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.
Thanks in progress.

Sei
--
__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/
Seiichiro Matsumura

sei at low-tech-ism.com
http://low-tech-ism.com/
__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/



2012/3/22 Antonio Roberts <antonio at hellocatfood.com>:
> Thanks for the help on this. I've attached the updated patch. After
> choosing a directory to save the files all of the shots will be saved
> as jpgs.
>
> I noticed some weird behaviour when pressing the Record (big red)
> button. The save message is trying to save from a buffer slot that
> isn't yet filled. I thought it was a race condition, so added a [t b
> b] but that didn't solve it. I don't know what the exact problem is,
> but the workdaround that I used seems to work
>
> Antonio
>
> On 20 March 2012 12:06, IOhannes m zmoelnig <zmoelnig at iem.at> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 2012-03-20 12:21, Antonio Roberts wrote:
>>> I've been attempting to build on the stop-motion animation patch that
>>> guido built some time ago (attached). I want to output each new frame
>>> to an image but there's one problem: [pix_write] reads what is
>>> currently in the frame buffer, which could be one of the old pictures.
>>> Is there any way to make it read from a specific point in the frame
>>> buffer?
>>
>> a "framebuffer" in openGL- and Gem-land usually means a "canvas" where
>> you draw to. [gemwindow] is a typical framebuffer, [gemframebuffer]
>> (what's that name..?) as well.
>>
>> [pix_write] will indeed read from this framebuffer.
>> you can specify where in the framebuffer it reads via the "offset" &
>> "dimension" parameters.
>>
>>
>> [pix_buffer], while being a "buffer" that holds "frames", is NOT a
>> framebuffer in this parlance.
>>
>> you can use the [save foo.jpg 42( message to save a pix from the
>> [pix_buffer] to the disk. the last argument ("42" in this case) denotes
>> the slot to read the image from.
>>
>> fgasdr
>> IOhannes
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.11 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAk9oct4ACgkQkX2Xpv6ydvSdSQCgpS3lASLj8qZ5Y2vI2xX2FFJU
>> tYIAoKEx3CZRE++bKPOUakALFUxZIyb7
>> =G992
>> -----END PGP SIGNATURE-----
>>
>
>
>
> --
> ============================
> antonio at hellocatfood.com
> http://www.hellocatfood.com
> ============================
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>

-- 
--
__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/
Seiichiro Matsumura

sei at low-tech-ism.com
http://low-tech-ism.com/
__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/__/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixbuffer_savetest.pd
Type: application/octet-stream
Size: 1940 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120710/70bff1b8/attachment.obj>


More information about the Pd-list mailing list