Package org.dspace.app.mediafilter
Class Brand
- java.lang.Object
-
- org.dspace.app.mediafilter.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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BufferedImagecreate(String brandLeftText, String shortLeftText, String brandRightText)Create the brand image
-
-
-
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 pixelsbrandHeight- height of the footer in pixelsfont- font to use for text on the footerxOffset- 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 imageshortLeftText- abbreviated form of brandLeftText that will be substituted if the image is resized such that brandLeftText will not fit.nullif not requiredbrandRightText- text that should appear in the bottom right of the image- Returns:
- BufferedImage a BufferedImage object describing the brand image file
-
-