Image modeling
Brightspot includes a wide variety of image editing capabilities, including cropping, brightness, sharpness and color adjustment, image rotation, blurring, and text overlays.
Image setup
Brightspot includes a wide variety of image editing capabilities, including cropping, brightness, sharpness and color adjustment, image rotation, blurring, and text overlays.
To begin using and editing images in Brightspot, define a storage mechanism.
Configuring storage
You configure storage locations for images (and any other binary file) in the Tomcat context.xml file. For information about the various configuration scenarios, see Configuring StorageItem.
Choosing an image editor
Brightspot offers two image editors, Java Image Editor for testing and DIMS Image Editor for production. Configure an image editor in the Tomcat context.xml file. See Image editor configuration for more information.
An Image object with StorageItem and renderer must be created to begin using images. See Image object model for more information.
Image object model
To begin using and editing images in Brightspot, the Image object needs to be created by creating an Image.java class with a StorageItem as the file to be uploaded to the default storage mechanism:
1public class Image extends Content {23private String name;4private StorageItem file;5private String altText;67// Getters and Setters8}
Once the Image object is in place, you can begin to work with image content in Brightspot. Several functionalities can be added to image content by adding annotations.
Preview
To allow an image to be previewed in Brightspot but not, as by default, in the text field, add the following annotation to the Image class.
1@PreviewField("file")2public class Image extends Content {34private String name;5private StorageItem file;6private String altText;78//Getters and Setters9}
The system will use the StorageItem field as a preview.
Adding to rich text
You can reference images in the rich-text editor and add them as enhancements to your content. To enable an image for reference, add the following annotation:
1@ToolUi.Referenceable2public class Image extends Content {34private String name;5private StorageItem file;6private String altText;78//Getters and Setters9}
Bulk upload
Brightspot’s bulk upload feature, located on the dashboard, allows you to upload multiple files simultaneously. To upload images and automatically populate any required fields, add the following as a beforeSave to automatically use the original file name as the image name.
1@Override2public void beforeSave() {3if (StringUtils.isBlank(name)) {4if (file != null) {5Map<string, object=""> metadata = file.getMetadata();6if (!ObjectUtils.isBlank(metadata)) {7String fileName = (String) metadata.get("originalFilename");8if (!StringUtils.isEmpty(fileName)) {9name = fileName;10}11}12}13}14}