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

IOhannes m zmoelnig zmoelnig at iem.at
Tue Jul 10 09:02:01 CEST 2012


-----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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/702AACgkQkX2Xpv6ydvQT/QCg1pqNQkZ6XRuhR+PYOWAnt6Lu
QHkAoKgfftr7nCytv7dkrZfDC2uRaAUb
=W6zJ
-----END PGP SIGNATURE-----

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2320 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120710/a84c1dba/attachment.bin>


More information about the Pd-list mailing list