commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ebo...@apache.org
Subject svn commit: r1546096 - in /commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging: ./ formats/bmp/ formats/gif/ formats/jpeg/ formats/png/ formats/pnm/ formats/psd/ formats/tga/ formats/tiff/ formats/xpm/
Date Wed, 27 Nov 2013 16:34:26 GMT
Author: ebourg
Date: Wed Nov 27 16:34:26 2013
New Revision: 1546096

URL: http://svn.apache.org/r1546096
Log:
Naming convention for boolean values

Modified:
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImageInfo.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageInfo.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tga/TgaImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImageInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImageInfo.java?rev=1546096&r1=1546095&r2=1546096&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImageInfo.java (original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/ImageInfo.java Wed
Nov 27 16:34:26 2013
@@ -42,8 +42,8 @@ public class ImageInfo {
     private final int physicalWidthDpi;
     private final float physicalWidthInch;
     private final int width;
-    private final boolean isProgressive;
-    private final boolean isTransparent;
+    private final boolean progressive;
+    private final boolean transparent;
 
     private final boolean usesPalette;
 
@@ -78,7 +78,7 @@ public class ImageInfo {
             final int height, final String mimeType, final int numberOfImages,
             final int physicalHeightDpi, final float physicalHeightInch,
             final int physicalWidthDpi, final float physicalWidthInch, final int width,
-            final boolean isProgressive, final boolean isTransparent, final boolean usesPalette,
+            final boolean progressive, final boolean transparent, final boolean usesPalette,
             final int colorType, final String compressionAlgorithm) {
         this.formatDetails = formatDetails;
 
@@ -96,9 +96,9 @@ public class ImageInfo {
         this.physicalWidthDpi = physicalWidthDpi;
         this.physicalWidthInch = physicalWidthInch;
         this.width = width;
-        this.isProgressive = isProgressive;
+        this.progressive = progressive;
 
-        this.isTransparent = isTransparent;
+        this.transparent = transparent;
         this.usesPalette = usesPalette;
 
         this.colorType = colorType;
@@ -235,7 +235,7 @@ public class ImageInfo {
      * Returns true if the image is progressive or interlaced.
      */
     public boolean isProgressive() {
-        return isProgressive;
+        return progressive;
     }
 
     /**
@@ -320,8 +320,8 @@ public class ImageInfo {
         pw.println("Physical Width Dpi: " + physicalWidthDpi);
         pw.println("Physical Width Inch: " + physicalWidthInch);
         pw.println("Width: " + width);
-        pw.println("Is Progressive: " + isProgressive);
-        pw.println("Is Transparent: " + isTransparent);
+        pw.println("Is Progressive: " + progressive);
+        pw.println("Is Transparent: " + transparent);
 
         pw.println("Color Type: " + getColorTypeDescription());
         pw.println("Uses Palette: " + usesPalette);
@@ -341,7 +341,7 @@ public class ImageInfo {
      * Returns true if the image has transparency.
      */
     public boolean isTransparent() {
-        return isTransparent;
+        return transparent;
     }
 
     /**

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java?rev=1546096&r1=1546095&r2=1546096&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java
Wed Nov 27 16:34:26 2013
@@ -609,8 +609,8 @@ public class BmpImageParser extends Imag
         // we ought to count images, but don't yet.
         final int numberOfImages = -1;
         // not accurate ... only reflects first
-        final boolean isProgressive = false;
-        // boolean isProgressive = (fPNGChunkIHDR.InterlaceMethod != 0);
+        final boolean progressive = false;
+        // boolean progressive = (fPNGChunkIHDR.InterlaceMethod != 0);
         //
         // pixels per meter
         final int physicalWidthDpi = (int) (bhi.hResolution * .0254);
@@ -623,7 +623,7 @@ public class BmpImageParser extends Imag
                 + (char) bhi.identifier2 + ": "
                 + getBmpTypeDescription(bhi.identifier1, bhi.identifier2) + ")";
 
-        final boolean isTransparent = false;
+        final boolean transparent = false;
 
         final boolean usesPalette = colorTable != null;
         final int colorType = ImageInfo.COLOR_TYPE_RGB;
@@ -632,7 +632,7 @@ public class BmpImageParser extends Imag
         return new ImageInfo(formatDetails, bitsPerPixel, comments,
                 format, name, height, mimeType, numberOfImages,
                 physicalHeightDpi, physicalHeightInch, physicalWidthDpi,
-                physicalWidthInch, width, isProgressive, isTransparent,
+                physicalWidthInch, width, progressive, transparent,
                 usesPalette, colorType, compressionAlgorithm);
     }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java?rev=1546096&r1=1546095&r2=1546096&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java
Wed Nov 27 16:34:26 2013
@@ -556,7 +556,7 @@ public class GifImageParser extends Imag
         // we ought to count images, but don't yet.
         final int numberOfImages = -1;
 
-        final boolean isProgressive = id.interlaceFlag;
+        final boolean progressive = id.interlaceFlag;
 
         final int physicalWidthDpi = 72;
         final float physicalWidthInch = (float) ((double) width / (double) physicalWidthDpi);
@@ -567,9 +567,9 @@ public class GifImageParser extends Imag
                 + ((char) blocks.gifHeaderInfo.version2)
                 + ((char) blocks.gifHeaderInfo.version3);
 
-        boolean isTransparent = false;
+        boolean transparent = false;
         if (gce != null && gce.transparency) {
-            isTransparent = true;
+            transparent = true;
         }
 
         final boolean usesPalette = true;
@@ -579,7 +579,7 @@ public class GifImageParser extends Imag
         return new ImageInfo(formatDetails, bitsPerPixel, comments,
                 format, formatName, height, mimeType, numberOfImages,
                 physicalHeightDpi, physicalHeightInch, physicalWidthDpi,
-                physicalWidthInch, width, isProgressive, isTransparent,
+                physicalWidthInch, width, progressive, transparent,
                 usesPalette, colorType, compressionAlgorithm);
     }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java?rev=1546096&r1=1546095&r2=1546096&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java
Wed Nov 27 16:34:26 2013
@@ -1093,9 +1093,9 @@ public class JpegImageParser extends Ima
     // // we ought to count images, but don't yet.
     // int NumberOfImages = -1;
     // // not accurate ... only reflects first
-    // boolean isProgressive = firstSOFNSegment.marker == SOF2_MARKER;
+    // boolean progressive = firstSOFNSegment.marker == SOF2_MARKER;
     //
-    // boolean isTransparent = false; // TODO: inaccurate.
+    // boolean transparent = false; // TODO: inaccurate.
     // boolean usesPalette = false; // TODO: inaccurate.
     // int ColorType;
     // if (Number_of_components == 1)
@@ -1112,7 +1112,7 @@ public class JpegImageParser extends Ima
     // ImageInfo result = new ImageInfo(FormatDetails, BitsPerPixel, Comments,
     // Format, FormatName, Height, MimeType, NumberOfImages,
     // PhysicalHeightDpi, PhysicalHeightInch, PhysicalWidthDpi,
-    // PhysicalWidthInch, Width, isProgressive, isTransparent,
+    // PhysicalWidthInch, Width, progressive, transparent,
     // usesPalette, ColorType, compressionAlgorithm);
     //
     // return result;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageInfo.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageInfo.java?rev=1546096&r1=1546095&r2=1546096&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageInfo.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/png/PngImageInfo.java
Wed Nov 27 16:34:26 2013
@@ -30,13 +30,13 @@ public class PngImageInfo extends ImageI
             final int height, final String mimeType, final int numberOfImages,
             final int physicalHeightDpi, final float physicalHeightInch,
             final int physicalWidthDpi, final float physicalWidthInch, final int width,
-            final boolean isProgressive, final boolean isTransparent, final boolean usesPalette,
+            final boolean progressive, final boolean transparent, final boolean usesPalette,
             final int colorType, final String compressionAlgorithm,
             final List<PngText> textChunks) {
         super(formatDetails, bitsPerPixel, comments, format, formatName,
                 height, mimeType, numberOfImages, physicalHeightDpi,
                 physicalHeightInch, physicalWidthDpi, physicalWidthInch, width,
-                isProgressive, isTransparent, usesPalette, colorType,
+                progressive, transparent, usesPalette, colorType,
                 compressionAlgorithm);
 
         this.textChunks = textChunks;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java?rev=1546096&r1=1546095&r2=1546096&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java
Wed Nov 27 16:34:26 2013
@@ -254,7 +254,7 @@ public class PnmImageParser extends Imag
 
         final String FormatDetails = info.getImageTypeDescription();
 
-        final boolean isTransparent = info.hasAlpha();
+        final boolean transparent = info.hasAlpha();
         final boolean usesPalette = false;
 
         final int ColorType = info.getColorType();
@@ -263,7 +263,7 @@ public class PnmImageParser extends Imag
         return new ImageInfo(FormatDetails, bitsPerPixel, comments,
                 format, formatName, info.height, mimeType, numberOfImages,
                 PhysicalHeightDpi, PhysicalHeightInch, PhysicalWidthDpi,
-                PhysicalWidthInch, info.width, progressive, isTransparent,
+                PhysicalWidthInch, info.width, progressive, transparent,
                 usesPalette, ColorType, compressionAlgorithm);
     }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java?rev=1546096&r1=1546095&r2=1546096&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java
Wed Nov 27 16:34:26 2013
@@ -510,7 +510,7 @@ public class PsdImageParser extends Imag
         // we ought to count images, but don't yet.
         final int numberOfImages = -1;
         // not accurate ... only reflects first
-        final boolean isProgressive = false;
+        final boolean progressive = false;
 
         final int physicalWidthDpi = 72;
         final float physicalWidthInch = (float) ((double) width / (double) physicalWidthDpi);
@@ -519,7 +519,7 @@ public class PsdImageParser extends Imag
 
         final String formatDetails = "Psd";
 
-        final boolean isTransparent = false; // TODO: inaccurate.
+        final boolean transparent = false; // TODO: inaccurate.
         final boolean usesPalette = header.mode == COLOR_MODE_INDEXED;
         final int colorType = ImageInfo.COLOR_TYPE_UNKNOWN;
 
@@ -538,7 +538,7 @@ public class PsdImageParser extends Imag
         return new ImageInfo(formatDetails, BitsPerPixel, comments,
                 format, formatName, height, mimeType, numberOfImages,
                 physicalHeightDpi, physicalHeightInch, physicalWidthDpi,
-                physicalWidthInch, width, isProgressive, isTransparent,
+                physicalWidthInch, width, progressive, transparent,
                 usesPalette, colorType, compressionAlgorithm);
     }
 

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tga/TgaImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tga/TgaImageParser.java?rev=1546096&r1=1546095&r2=1546096&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tga/TgaImageParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tga/TgaImageParser.java
Wed Nov 27 16:34:26 2013
@@ -208,8 +208,8 @@ package org.apache.commons.imaging.forma
 //        float PhysicalHeightInch;
 //        int PhysicalWidthDpi;
 //        float PhysicalWidthInch;
-//        boolean isProgressive = false;
-//        boolean isTransparent = pixel_depth > 24;
+//        boolean progressive = false;
+//        boolean transparent = pixel_depth > 24;
 //        boolean usesPalette;
 //        int ColorType;
 //
@@ -217,7 +217,7 @@ package org.apache.commons.imaging.forma
 //        //        return new ImageInfo(FormatDetails, BitsPerPixel, Comments, Format,
 //        //                FormatName, height, MimeType, NumberOfImages,
 //        //                PhysicalHeightDpi, PhysicalHeightInch, PhysicalWidthDpi,
-//        //                PhysicalWidthInch, width, isProgressive, isTransparent,
+//        //                PhysicalWidthInch, width, progressive, transparent,
 //        //                usesPalette, ColorType);
 //
 //        //        boolean is_new_tga_format = isNewTGAFormat(byteSource);

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java?rev=1546096&r1=1546095&r2=1546096&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java
Wed Nov 27 16:34:26 2013
@@ -246,12 +246,12 @@ public class TiffImageParser extends Ima
         final String mimeType = "image/tiff";
         final int numberOfImages = contents.directories.size();
         // not accurate ... only reflects first
-        final boolean isProgressive = false;
+        final boolean progressive = false;
         // is TIFF ever interlaced/progressive?
 
         final String formatDetails = "Tiff v." + contents.header.tiffVersion;
 
-        final boolean isTransparent = false; // TODO: wrong
+        final boolean transparent = false; // TODO: wrong
         boolean usesPalette = false;
         final TiffField colorMapField = directory
                 .findField(TiffTagConstants.TIFF_TAG_COLOR_MAP);
@@ -298,7 +298,7 @@ public class TiffImageParser extends Ima
         final ImageInfo result = new ImageInfo(formatDetails, bitsPerPixel, comments,
                 format, formatName, height, mimeType, numberOfImages,
                 physicalHeightDpi, physicalHeightInch, physicalWidthDpi,
-                physicalWidthInch, width, isProgressive, isTransparent,
+                physicalWidthInch, width, progressive, transparent,
                 usesPalette, colorType, compressionAlgorithm);
 
         return result;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java?rev=1546096&r1=1546095&r2=1546096&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
Wed Nov 27 16:34:26 2013
@@ -141,13 +141,13 @@ public class XpmImageParser extends Imag
     public ImageInfo getImageInfo(final ByteSource byteSource, final Map<String, Object>
params)
             throws ImageReadException, IOException {
         final XpmHeader xpmHeader = readXpmHeader(byteSource);
-        boolean isTransparent = false;
+        boolean transparent = false;
         int colorType = ImageInfo.COLOR_TYPE_BW;
         for (final Entry<Object, PaletteEntry> entry : xpmHeader.palette
                 .entrySet()) {
          final PaletteEntry paletteEntry = entry.getValue();
          if ((paletteEntry.getBestARGB() & 0xff000000) != 0xff000000) {
-        isTransparent = true;
+        transparent = true;
          }
          if (paletteEntry.haveColor) {
         colorType = ImageInfo.COLOR_TYPE_RGB;
@@ -159,7 +159,7 @@ public class XpmImageParser extends Imag
         return new ImageInfo("XPM version 3", xpmHeader.numCharsPerPixel * 8,
                 new ArrayList<String>(), ImageFormats.XPM,
                 "X PixMap", xpmHeader.height, "image/x-xpixmap", 1, 0, 0, 0, 0,
-                xpmHeader.width, false, isTransparent, true, colorType,
+                xpmHeader.width, false, transparent, true, colorType,
                 ImageInfo.COMPRESSION_ALGORITHM_NONE);
     }
 



Mime
View raw message