Description of the component
The ShapeDiverImageImport component is a way to let online users upload an image that can be used as an input to the Grasshopper definition. There are two ways to import an image using this component:
- By giving a URL to the URI input parameter (possible locally in Grasshopper and in the online viewer)
- By double-clicking on the button generated by the component, after the file is uploaded to the platform (possible only in the online viewer). The button opens a dialog allowing online users to upload their local files.
In Grasshopper, the component can only be tested using the option 1, both with public online URLs and with files stored locally (using the path of the file on the local machine).
The files must be hosted in a publicly accessible online location that allows downloading. Read more about how to store files online and use them in the ShapeDiver viewer.
The component outputs a Grasshopper Bitmap object, as well as the width and height of the image.
Double-clicking on this component opens a dialog box with the options to set a maximum file size for the parameter and to enable different file types.
Supported file formats
The following image file formats are currently supported by the Image Import component:
- bmp (MIME type: image/bmp)
- gif (MIME type: image/gif)
- jpeg (MIME type: image/jpeg)
- png (MIME type: image/png)
- tiff (MIME type: image/tiff)
Let us know through the forum if you need to import more image formats.
Combining image imports with the ShapeDiver Image components and Squid (ShapeDiver edition) you can process images using geometric algorithms and use them as parametric textures for personalised products (e.g.T-Shirts, Mugs,etc.).
- Component name: ShapediverImageImport
- Default Nickname: SDImageImport
|URI||U||The default URI to import the image from if no file is uploaded.||
|Bitmap||B||Grasshopper Bitmap object containing the imported image.||
|Width||W||The width of the imported bitmap.||
|Height||H||The height of the imported bitmap.||
- Double-click on the component to define which file types are accepted by the component and a maximum size for the uploaded images.