For Lasso to be able to edit an image via LassoScript, an image file or image data must first be cast as a Lasso image variable using the [Image] tag. Once a variable has been set to an image data type, various Image member tags can be used to manipulate the image. Once the image file is manipulated, it can either be served directly to the client browser, or it can be saved to disk on the Web server.
Requires either the name and path of an image file, or a binary data string to initialize an image. Once an image is cast as an object, it may be edited and saved using [Image] member tags.
Because the [Image] tags are based on ImageMagick, Lasso Professional 7 supports reading and manipulating over 88 major file formats (not including sub-formats). A comprehensive list of supported image formats can be found at the following URL. http://www.imagemagick.com/www/formats.html
Lasso is certified to work with the following iage formats out of the box without additional components installed: BMP, CMYK, GIF, JPEG, PNG, PSD, RBG, and TIFF.
[var:'Image' = (Image: '/folder/file.jpg')] [var:'Image' = (Image: -Binary: 'Binary String')]
|'File Path'||Path to image file on the server. Required if -Binary or -Base64 is not specified.|
|-Binary||Creates an image file from binary image data. Requires a valid binary string for a supported image format. Required if a file path or -Base64 is not specified.|
|-Base64||Creates an image file from Base64-encoded image data. Requires a valid Base64-encoded string for a supported image format. Required if a file path or -Binary is not specified.|
|-Info||Retrieves all attributes on an image without reading the pixel data. Allows for better performance and less memory usage when dealing with larger image files.|
Lasso can create an image from a binary string for a valid image type using the [Image] tag with the -Binary parameter. The image is initialized and created in memory only until it is saved using the [Image->Save] tag described later.
[Var:'Binary'=(Include_Raw: 'image.jpg')] [Var:'MyImage3'=(Image: -Binary=$Binary)] [$MyImage3->(Save:'image.jpg')]
Use the [Image] to initialize an image file using the -Info parameter for increased performance with larger files.
[Var:'MyImage2'=(Image: '/images/largeimage.jpg', -Info)]
Use the [Image] to initialize an image file so it can be manipulated by Lasso.
|Implementation||LCAPI||Sets||Lasso 8.5, Lasso 8.0, Lasso 7.0|
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.