开发者

JPEG to JFIF conversion

开发者 https://www.devze.com 2023-02-03 15:23 出处:网络
I need to convert jpeg image to jfif format this is because i need to send MMS开发者_如何学Python data. Can any one tell me how do convert it using java.Have you tried ImageIO?

I need to convert jpeg image to jfif format this is because i need to send MMS开发者_如何学Python data. Can any one tell me how do convert it using java.


Have you tried ImageIO? I really dont know if it will work and I can't test it now (because I'm not in my home) but you can get ImageIO image formats using:

String[] formatNames = ImageIO.getReaderFormatNames();

As I said, I cant test this code, but you can try:

    try {
        File input = new File("srcImage.jpeg");
        BufferedImage image = ImageIO.read(input);

        File output = new File("dstImage.jfif");
        ImageIO.write(image, "jfif", output);

        System.out.println("Your image has been converted successfully");
    } catch(Excpetion e){
        System.out.println("Error:"+e.getMessage());
    }

To be honest, I dont think this will work. Maybe you can try a 3rd party plugin (if exists).

0

精彩评论

暂无评论...
验证码 换一张
取 消