Uploaded image for project: 'Commons Imaging'
  1. Commons Imaging
  2. IMAGING-128

TIFF Image Writer is not flushing output

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • Review Patch
    • None
    • None

    Description

      The writeImage() method in the TiffImageWriterBase class takes an java.io.OutputStream argument as the destination for its output. It does not explicitly call flush() on the output stream when it is finished writing data. If the calling application allows the output stream to go out of scope, rather than explicitly calling close(), any pending output will be lost and the output image file will be left in a broken state. Although, ideally, applications SHOULD explicitly call close() on an i/o file, we should probably add a call to flush to the writeImage method to provide some robustness.

      This behavior was observed in Java 7.

      Attachments

        1. Imaging_128_Patch_1.patch
          0.5 kB
          Gary Lucas

        Activity

          People

            Unassigned Unassigned
            gwlucas Gary Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: