Class Brand


  • public class Brand
    extends Object
    Class to attach a footer to an image using ImageMagick. Thanks Ninh Nguyen from the National Library of Australia for providing the source code. This version of the code is basically Ninh's but reorganised a little. Used with permission.
    • Constructor Detail

      • Brand

        public Brand​(int brandWidth,
                     int brandHeight,
                     Font font,
                     int xOffset)
        Constructor to set up footer image attributes.
        Parameters:
        brandWidth - length of the footer in pixels
        brandHeight - height of the footer in pixels
        font - font to use for text on the footer
        xOffset - number of pixels text should be indented from left-hand side of footer
    • Method Detail

      • create

        public BufferedImage create​(String brandLeftText,
                                    String shortLeftText,
                                    String brandRightText)
        Create the brand image
        Parameters:
        brandLeftText - text that should appear in the bottom left of the image
        shortLeftText - abbreviated form of brandLeftText that will be substituted if the image is resized such that brandLeftText will not fit. null if not required
        brandRightText - text that should appear in the bottom right of the image
        Returns:
        BufferedImage a BufferedImage object describing the brand image file