src/share/classes/com/sun/imageio/plugins/bmp/BMPImageWriter.java
Print this page
rev 9230 : imported patch 8033716
*** 1323,1336 ****
private void writeEmbedded(IIOImage image,
ImageWriteParam bmpParam) throws IOException {
String format =
compressionType == BI_JPEG ? "jpeg" : "png";
! Iterator iterator = ImageIO.getImageWritersByFormatName(format);
ImageWriter writer = null;
if (iterator.hasNext())
! writer = (ImageWriter)iterator.next();
if (writer != null) {
if (embedded_stream == null) {
throw new RuntimeException("No stream for writing embedded image!");
}
--- 1323,1336 ----
private void writeEmbedded(IIOImage image,
ImageWriteParam bmpParam) throws IOException {
String format =
compressionType == BI_JPEG ? "jpeg" : "png";
! Iterator<ImageWriter> iterator = ImageIO.getImageWritersByFormatName(format);
ImageWriter writer = null;
if (iterator.hasNext())
! writer = iterator.next();
if (writer != null) {
if (embedded_stream == null) {
throw new RuntimeException("No stream for writing embedded image!");
}