[PD] Importing gridflow's grid format in Gem

Mathieu Bouchard matju at artengine.ca
Wed Mar 22 00:07:45 CET 2006


On Tue, 21 Mar 2006, Ivica Ico Bukvic wrote:

> Mathieu Bouchard I've learned about the #pix_import and #pix_export

#import_pix and #export_pix

> them further. Where I am at a loss is when Gridflow processes image and
> outputs data in "grid" format, how to feed this back to Gem (regular pix
> format, or whatever that is, is easily returned back via #pix_import,
> but the "grid" format is giving me trouble)?

In GridFlow, an image is just a grid whose size is
(rows,columns,channels). Channels is 1 for greyscale (Y), 3 for RGB, 3 for
YUV, 4 for RGBA, and it's not limited (you can use channels=88 if you 
have a use for it!)

GridFlow images are a _kind_ of grid. (or maybe saying "subset" is more 
appropriate...)

> The reason for this need is that I would like to maintain Gem window as
> the only visible window which contains both the output from Gem and
> Gridflow (i.e. a 3D cube with its faces textured with the output from
> the Gridflow).

You just have to do #export_pix on every image stream that you want to 
display.

> place in respect to the Gridflow, for instance object #remap_image. This
> object outputs a "grid" which I have no idea how to convert back to a
> format that can be imported back to Gem.

[#remap_image] outputs a grid of the same shape as its input, so if you 
really gave it an image, it'll give you back an image.

> All linking with Gem objects
> results in errors of various types suggesting that the two are obviously
> not compatible.

In your patch, if I just connect the left outlet of #remap_image to the 
right inlet of #export_pix, it doesn't produce any errors.

 _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada




More information about the Pd-list mailing list