tkormann    01/09/19 05:16:23

  Modified:    sources/org/apache/batik/transcoder/image PNGTranscoder.java
  Log:
  - remove traces and 80 columns fix
  
  Revision  Changes    Path
  1.8       +19 -19    
xml-batik/sources/org/apache/batik/transcoder/image/PNGTranscoder.java
  
  Index: PNGTranscoder.java
  ===================================================================
  RCS file: 
/home/cvs/xml-batik/sources/org/apache/batik/transcoder/image/PNGTranscoder.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PNGTranscoder.java        2001/09/19 11:16:37     1.7
  +++ PNGTranscoder.java        2001/09/19 12:16:23     1.8
  @@ -25,15 +25,14 @@
    * This class is an <tt>ImageTranscoder</tt> that produces a PNG image.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Thierry Kormann</a>
  - * @version $Id: PNGTranscoder.java,v 1.7 2001/09/19 11:16:37 vhardy Exp $
  + * @version $Id: PNGTranscoder.java,v 1.8 2001/09/19 12:16:23 tkormann Exp $
    */
   public class PNGTranscoder extends ImageTranscoder {
       /**
        * Constructs a new transcoder that produces png images.
        */
       public PNGTranscoder() { 
  -        hints.put(KEY_FORCE_TRANSPARENT_WHITE, 
  -                  new Boolean(false));
  +        hints.put(KEY_FORCE_TRANSPARENT_WHITE, new Boolean(false));
       }
   
       /**
  @@ -66,21 +65,22 @@
           params.setSRGBIntent(PNGEncodeParam.INTENT_PERCEPTUAL);
   
           //
  -        // This is a trick so that viewers which do not support
  -        // the alpha channel will see a white background (and not
  -        // a black one).
  +        // This is a trick so that viewers which do not support the alpha
  +        // channel will see a white background (and not a black one).
           //
           boolean forceTransparentWhite = true;
   
           if (hints.containsKey(KEY_FORCE_TRANSPARENT_WHITE)) {
  -            forceTransparentWhite = 
((Boolean)hints.get(KEY_FORCE_TRANSPARENT_WHITE)).booleanValue();
  +            forceTransparentWhite = 
  +             ((Boolean)hints.get
  +              (KEY_FORCE_TRANSPARENT_WHITE)).booleanValue();
           }
   
  -        if(forceTransparentWhite){
  -            System.out.println("Forcing transparent white");
  +        if (forceTransparentWhite) {
               int w = img.getWidth(), h = img.getHeight();
               DataBufferInt biDB = (DataBufferInt)img.getRaster().getDataBuffer();
  -            int scanStride = 
((SinglePixelPackedSampleModel)img.getSampleModel()).getScanlineStride();
  +            int scanStride = ((SinglePixelPackedSampleModel)
  +                           img.getSampleModel()).getScanlineStride();
               int dbOffset = biDB.getOffset();
               int pixels[] = biDB.getBankData()[0];
               int p = dbOffset;
  @@ -118,16 +118,16 @@
       // --------------------------------------------------------------------
       // Keys definition
       // --------------------------------------------------------------------
  +
       /**
  -     * The 'forceTransparentWhite' key.
  -     * It controls whether the encoder should force the image's fully transparent
  -     * pixels to be fully transparent white instead of fully transparent black. 
  -     * This is usefull when the encoded PNG is displayed in a browser which
  -     * does not support PNG transparency and lets the image display
  -     * with a white background instead of a black background. <br />
  -     * However, note that the modified image will display differently
  -     * over a white background in a viewer that supports transparency.
  -     */
  +     * The 'forceTransparentWhite' key.  It controls whether the encoder should
  +     * force the image's fully transparent pixels to be fully transparent white
  +     * instead of fully transparent black.  This is usefull when the encoded PNG
  +     * is displayed in a browser which does not support PNG transparency and
  +     * lets the image display with a white background instead of a black
  +     * background. <br /> However, note that the modified image will display
  +     * differently over a white background in a viewer that supports
  +     * transparency.  */
       public static final TranscodingHints.Key KEY_FORCE_TRANSPARENT_WHITE
           = new BooleanKey();
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to