Hi
I'm trying to convert a tif file to a jpeg file with jimi, but i get only a black jpeg as result.
My code looks like this;
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import com.sun.jimi.core.Jimi;
import com.sun.jimi.core.JimiException;
public class TiffConverter {
/**
* @param args
*/
public static void main(String[] args) {
File tifFile = new File("test.tif");
File jpgFile = new File("test.jpg");
ConvTif2Jpg(jpgFile, tifFile);
}
/**
* Convert
* @param jpgF
* @param tifF
*/
public static void ConvTif2Jpg(File jpgF, File tifF){
Image image = Jimi.getImage(tifF.getAbsolutePath());
try {
Jimi.putImage(image, jpgF.getAbsolutePath());
} catch (JimiException ex) {
ex.printStackTrace();
}
}
}
anyone know why i get only a black jpeg ? is there an other way to transform the tif ?
thanks a lot !!