-
Bug
-
Resolution: Unresolved
-
P4
-
26
-
None
The JDK's ImageIO PNG, BMP, WBMP and JPG writers call ImageOutputStream.flush() before returning. The TIFF and GIF ones do not.
This means that if an application then closes the underlying java.io.OutputStream that the TIFF and GIF image data can't be flushed.
This ought not to be a problem for a correct application - which should call
ImageOutputStream.close() before calling java.io.OutputStream.close()
And arguably the PNG, BMP, WBMP and JPG writers are just rewarding that bad behavior.
But also arguably the writers should all call ImageOutputStream.flush() when they are done with a complete image.
This means that if an application then closes the underlying java.io.OutputStream that the TIFF and GIF image data can't be flushed.
This ought not to be a problem for a correct application - which should call
ImageOutputStream.close() before calling java.io.OutputStream.close()
And arguably the PNG, BMP, WBMP and JPG writers are just rewarding that bad behavior.
But also arguably the writers should all call ImageOutputStream.flush() when they are done with a complete image.
- links to
-
Review(master) openjdk/jdk/26703