rhPicture and Python


Will or is rhPicture optimized for V5 and Python?
If so, where can I find some documentation?

I would like to make a plugin that reads data from an image.


(Steve Baer) #2

I doubt it, since rhPicture just wrapped a bunch of .NET functions for RhinoScript. If you want to read data from an image, use system.Drawing.Bitmap class


Ok, I figured out that I could use rhPicture as it is, it’s just a bit difficult to figure out how it works.

import rhinoscriptsyntax as rs

def NoiseExample():
    ImageFileName = rs.OpenFileName("Open", "ImageFile (*.jpg)|*.jpg|All Files (*.*)|*.*||")
    RhPicture = rs.GetPlugInObject("RhPicture")
    RhPicture.ShowImage("Greyscale noise applied")


So now I just need to hack away on this…