Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4829970

Image I/O does not support PNG compression

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.1
    • client-libs



      Name: rmT116609 Date: 03/10/2003


      FULL PRODUCT VERSION :
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

      FULL OS VERSION :
      Windows 2000 ver 5.00.2195 Service Pack 2

      A DESCRIPTION OF THE PROBLEM :
      When obtaining a PNGImageWriteParam it does not support PNG compression or any of the extra options it should with the JAI Image I/O library.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Try the source listed below.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Should display "Can compress? true"
      Should be able to set compression level etc.
      Displays "Can compress? false"


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------

      import java.util.*;
      import javax.imageio.*;

      public class PNGTest {

          public static void main(String[] args) {

      ImageIO.scanForPlugins();

      Iterator writers = ImageIO.getImageWritersByFormatName("png");
      ImageWriter writer = (ImageWriter) writers.next();
      System.out.println(writer.getClass());
      ImageWriteParam param = writer.getDefaultWriteParam();
      System.out.println(param.getClass());

      System.out.println("Can compress? "+param.canWriteCompressed());
          }
      }
      ---------- END SOURCE ----------
      (Review ID: 182341)
      ======================================================================

            jdv Jayathirth D V
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: