As a note though, scripting components are not the best way to solve
this problem in the long term.  The reason being that when an input to
a scripting component expires, the whole component needs to be
calculated again.  With images this means reloading the image and
retrieving the individual pixel values each and every single time the
component is calculated.  This means its slow, memory intensive, and
inefficient.  With a proper implementation from David, the image data
could be kept in memory and only reloaded when the image itself
changes.  This means less loading time and more efficient access to
image data.  Hopefully this is something that David puts in sooner
rather than later.

Best Regards,
Damien

On Mar 4, 1:34 pm, ckpalmer <[email protected]> wrote:
> Evanc,
>
> There were many posts on this subject awhile back. Here is what I
> contributed:
>
> http://grasshopper3d.googlegroups.com/web/Bitmap2Block.zip?hl=en&gda=...
>
> If the link doesn't work look for the Bitmap2Block.zip in the Files
> section.
>
> Chris K. Palmer
>
> On Mar 3, 12:34 pm, evanc <[email protected]> wrote:
>
> > is it possible to pull a JPG into GH as an input, and read pixel
> > values, or convert pixels into points?
>
> > i made the following image by building a heightfield surface in rhino,
> > extracting the points, then bringing the points into GH and scaling a
> > circle in the xy plane based on the z location.
>
> >http://farm4.static.flickr.com/3663/3320021525_bac5f9b526.jpg
>
> > it would be nice to be able to get a jpg directly into grasshopper and
> > eliminate the step of generating the heightfield surface and extrcting
> > the points. can this be done with a VB script component, with the
> > ability to change the # of UV sample points?

Reply via email to