mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-06-02 12:41:32 +00:00
Remove deprecated package, re-implement in ImageIO
This commit is contained in:
parent
95e97e2ae6
commit
8a3ee78f58
|
@ -23,7 +23,7 @@ import java.awt.image.BufferedImage;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
|
||||||
import com.sun.image.codec.jpeg.JPEGCodec;
|
import javax.imageio.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SunJpegImage is a specific implementation of AppleImage that handles all
|
* SunJpegImage is a specific implementation of AppleImage that handles all
|
||||||
|
@ -60,7 +60,7 @@ public class SunJpegImage extends AppleImage {
|
||||||
* Save the image.
|
* Save the image.
|
||||||
*/
|
*/
|
||||||
public void save(OutputStream outputStream) throws IOException {
|
public void save(OutputStream outputStream) throws IOException {
|
||||||
JPEGCodec.createJPEGEncoder(outputStream).encode(image);
|
ImageIO.write(image, "jpg", outputStream);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Return the width of the image.
|
* Return the width of the image.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user