// get dimensions for image and video and save it to params into
// attributes
if (variantType == VariantType.IMAGE
|| variantType == VariantType.VIDEO) {
PixelDimensionsMetaData dimMetaData =
(PixelDimensionsMetaData) selectedVariant
.getVariant().getMetaData();
// get the Map of parameters
Map params = attributes.getParamMap();
// save height and width in pixels unit to object's parameter map
if (dimMetaData.getHeight() != 0) {
params.put("height", StringConvertor.valueOf(dimMetaData
.getHeight()));
}
if (dimMetaData.getWidth() != 0) {
params.put("width", StringConvertor.valueOf(dimMetaData
.getWidth()));
}
}
// convert image if needed