updated the XImageGallery and added ImageUtil common utility