Minor fix: dispose() now correctly invokes resetMembers() as in ImageReaderBase.

This commit is contained in:
Harald Kuhr 2018-06-11 20:45:07 +02:00
parent 7ab72f0161
commit f738e0e20d

View File

@ -100,9 +100,15 @@ public abstract class ImageWriterBase extends ImageWriter {
} }
@Override @Override
public void reset() { public void dispose() {
super.reset();
resetMembers(); resetMembers();
super.dispose();
}
@Override
public void reset() {
resetMembers();
super.reset();
} }
protected void resetMembers() { protected void resetMembers() {
@ -138,7 +144,7 @@ public abstract class ImageWriterBase extends ImageWriter {
* The AOI is defined by the {@link javax.imageio.IIOParam#setSourceRegion(java.awt.Rectangle)} * The AOI is defined by the {@link javax.imageio.IIOParam#setSourceRegion(java.awt.Rectangle)}
* method. * method.
* <p/> * <p/>
* Note: If it is possible for the reader to read the AOI directly, such a * Note: If it is possible for the writer to write the AOI directly, such a
* method should be used instead, for efficiency. * method should be used instead, for efficiency.
* *
* @param pImage the image to get AOI from * @param pImage the image to get AOI from
@ -161,7 +167,7 @@ public abstract class ImageWriterBase extends ImageWriter {
* NOTE: This method does not take the subsampling offsets into * NOTE: This method does not take the subsampling offsets into
* consideration. * consideration.
* <p/> * <p/>
* Note: If it is possible for the reader to subsample directly, such a * Note: If it is possible for the writer to subsample directly, such a
* method should be used instead, for efficiency. * method should be used instead, for efficiency.
* *
* @param pImage the image to subsample * @param pImage the image to subsample