~hjd/ubuntu/wily/xmlgraphics-commons/debian-merged

« back to all changes in this revision

Viewing changes to src/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderFactoryRawCCITTFax.java

  • Committer: Hans Joachim Desserud
  • Date: 2015-11-11 18:22:53 UTC
  • mfrom: (9.1.5 sid)
  • Revision ID: hans_joachim_desserud-20151111182253-zwi0frfm97j0wddn
  * Merge from Debian unstable.  Remaining changes:
    - d/control: Drop dependencies required for unit testing as they
      include libmockito-java which would pull maven into main, disable unit
      test execution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 * limitations under the License.
16
16
 */
17
17
 
18
 
/* $Id: ImageLoaderFactoryRawCCITTFax.java 924666 2010-03-18 08:26:30Z jeremias $ */
 
18
/* $Id: ImageLoaderFactoryRawCCITTFax.java 1681698 2015-05-26 07:49:35Z ssteiner $ */
19
19
 
20
20
package org.apache.xmlgraphics.image.loader.impl;
21
21
 
102
102
        if (compression == null) {
103
103
            return false;
104
104
        }
105
 
        switch (compression.intValue()) {
 
105
        switch (compression) {
106
106
        case TIFFImage.COMP_FAX_G3_1D:
107
107
        case TIFFImage.COMP_FAX_G3_2D:
108
108
        case TIFFImage.COMP_FAX_G4_2D:
109
109
            Integer stripCount = (Integer)imageInfo.getCustomObjects().get("TIFF_STRIP_COUNT");
110
 
            boolean supported = (stripCount != null && stripCount.intValue() == 1);
 
110
            boolean supported = (stripCount != null && stripCount == 1);
111
111
            if (!supported) {
112
112
                log.trace("Raw CCITT loading not supported for multi-strip TIFF image");
113
113
            }