Skip to content

Commit

Permalink
Make sure the PNG filter type is always initialized: code moved from …
Browse files Browse the repository at this point in the history
…setQuality() to class constructor
  • Loading branch information
ruven committed Mar 23, 2023
1 parent 4b29a43 commit 67293ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
23/03/2023:
- Make sure the PNG filter type is always initialized: code moved from setQuality() to class constructor


22/03/2023:
- Added partial support for non-interleaved planar configuration TIFFs where each color channel is stored separately.
For the moment, only the first channel is returned for such images.
Expand Down
10 changes: 5 additions & 5 deletions src/PNGCompressor.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* IIP PNG Compressor Class:
Handles alpha channels, 8 or 16 bit data, ICC profiles and XMP metadata
Copyright (C) 2012-2021 Ruven Pillay
Copyright (C) 2012-2023 Ruven Pillay
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -93,6 +93,10 @@ class PNGCompressor : public Compressor {
// Zlib range is 0-9
this->Q = compressionLevel;

// Filters are an optional pre-processing step before Deflate compression
// - set this to the fastest set of filters
filterType = PNG_FAST_FILTERS;

};


Expand Down Expand Up @@ -159,10 +163,6 @@ class PNGCompressor : public Compressor {
if( quality < 0 ) Q = 0;
else if( quality > 9 ) Q = 9;
else Q = quality;

// Filters are an optional pre-processing step before Deflate compression
// - set this to the fastest set of filters
filterType = PNG_FAST_FILTERS;
}


Expand Down

0 comments on commit 67293ff

Please sign in to comment.