* @throws IOException if there was a problem reading the image file.
*/
public VariantBuilder createGenericImageVariant(File imageFile,
String assetGroup, int widthHint) throws IOException {
VariantBuilder variantBuilder =
factory.createVariantBuilder(VariantType.IMAGE);
GenericImageSelectionBuilder generic =
factory.createGenericImageSelectionBuilder();
generic.setWidthHint(widthHint);
variantBuilder.setSelectionBuilder(generic);
ImageMetaDataBuilder image = createImageMetaData(imageFile);
variantBuilder.setMetaDataBuilder(image);
URLContentBuilder content = createURLContent(assetGroup, imageFile);
variantBuilder.setContentBuilder(content);
return variantBuilder;
}