From 6524c95bb8ea0339908ab9bff03211f8c42e77d9 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Thu, 3 Aug 2006 20:45:57 +0200 Subject: add TIFFOutputImage --- src/JPEGOutputImage.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/JPEGOutputImage.cxx') diff --git a/src/JPEGOutputImage.cxx b/src/JPEGOutputImage.cxx index 9e00458..3f7fd11 100644 --- a/src/JPEGOutputImage.cxx +++ b/src/JPEGOutputImage.cxx @@ -101,11 +101,13 @@ JPEGOutputImage::next_line_internal() { int JPEGOutputImage::done_internal() { - next_line_internal(); jpeg_finish_compress(&cinfo); - fclose(fp); - fp = NULL; jpeg_destroy_compress(&cinfo); + + if (fp) { + fclose(fp); + fp = NULL; + } if (row) { free(row); } -- cgit v1.2.3