ImageRead
Last updated
Was this helpful?
ImageRead( path )path
String
Yes
The file path or URL to the image to read.
BoxImage — The image object loaded from the specified path.
Loads an image from a file path or URL and returns it as a BoxImage object. This BIF is used to import images into BoxLang for further processing or manipulation.
// Load an image from a file
img = ImageRead( "images/photo.png" );
// Load an image from a URL
img = ImageRead( "https://example.com/image.jpg" );ImageNew
ImageCopy
ImageGetWidth
ImageGetHeight
The path argument must be a non-empty string representing a valid file path or URL.
If the image cannot be loaded, an error is thrown.
Returns a BoxImage object for use in other image BIFs.
File handles are properly closed - no file locking issues on Windows after reading.
Files can be deleted immediately after ImageRead() completes.
Images are fully loaded into memory - no lazy loading issues.
Safe to use immediately without needing to call info() first.
Last updated
Was this helpful?
Was this helpful?
