java.lang.indexoutofbound Exception..when try to convert jpg image to tiff