Access shader image through GH or Rhinocommon

Is there a way to access the shader JPG image file that is applied to a planar surface as result of using the Picture command in Rhino?

you can use Picture to insert an image file from your HD (Barack case)
with Human / Elefront I can get the material name (which is the image file name with no extensions) but I would like to access the image directly without going through the JPG file that originated it

also, you can CTRL+V an image on Rhino canvas (Cillian Murphy) and in that case the image does not exist on the HD

so is there a way to access the image used as shader directly in GH? maybe through RhinoCommon?
(all this because I need to make pixel sampling on that image, but won’t have a JPG file for it)

Thanks!

Which of those you need? :sweat_smile:
Shader … material?
The jpg file?
The System.Drawing.Bitmap?

How do you expect to use it, then?

I was planning to use its System.Drawing.Bitmap to do some weird pixel color sampling on that texture

If i’m not wrong, all materials/texture in Rhino exist as temp file.

This returns the bitmap of the first material in the document:

System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(this.RhinoDocument.Materials[0].GetBitmapTexture().FileReference.FullPath);


1 Like

oh maaaan… thank you so much!

1 Like