Package org.apache.ofbiz.product.image
Class ScaleImage
java.lang.Object
org.apache.ofbiz.product.image.ScaleImage
ScaleImage Class
Scale the original image into 4 different size Types (small, medium, large, detail)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionscaleImageInAllSize
(Map<String, ? extends Object> context, String filenameToUse, String viewType, String viewNumber) scaleImageInAllSizescaleImageManageInAllSize
(Map<String, ? extends Object> context, String filenameToUse, String viewType, String viewNumber, String imageType)
-
Field Details
-
SIZE_TYPE_LIST
-
-
Constructor Details
-
ScaleImage
public ScaleImage()
-
-
Method Details
-
scaleImageInAllSize
public static Map<String,Object> scaleImageInAllSize(Map<String, ? extends Object> context, String filenameToUse, String viewType, String viewNumber) throws IllegalArgumentException, ImagingOpException, IOException, org.jdom.JDOMExceptionscaleImageInAllSizeScale the original image into all different size Types (small, medium, large, detail)
- Parameters:
context
- ContextfilenameToUse
- Filename of future image filesviewType
- "Main" view or "additional" viewviewNumber
- If it's the main view, viewNumber = "0"- Returns:
- URL images for all different size types
- Throws:
IllegalArgumentException
- Any parameter is nullImagingOpException
- The transform is non-invertibleIOException
- Error prevents the document from being fully parsedorg.jdom.JDOMException
- Errors occur in parsing
-
scaleImageManageInAllSize
public static Map<String,Object> scaleImageManageInAllSize(Map<String, ? extends Object> context, String filenameToUse, String viewType, String viewNumber, String imageType) throws IllegalArgumentException, ImagingOpException, IOException, org.jdom.JDOMException- Throws:
IllegalArgumentException
ImagingOpException
IOException
org.jdom.JDOMException
-