Harmony
  1. Harmony
  2. HARMONY-6447

[classlib] [imageio] Implement missing functionality in imageio module

    Details

    • Type: Task Task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None

      Description

      The imageio module has a significant amount of missing functionality in the javax.imageio, javax.imageio.spi and javax.imageio.stream packages. See:

      http://people.apache.org/~hindessm/japi/sun50-hydrlvm50.html#pkg_javax_imageio

      It is expected that an implementation and tests would be provided to complete this task.

      1.
      Implementation of getImageWriter, getImageReader Sub-task Closed Tim Ellison
       
      2.
      Test cases for HARMONY-6482 Sub-task Closed Alexei Fedotov
       
      3.
      [classlib][imageio] ServiceRegistry.registerServiceProvider failed to return correct value Sub-task Closed Alexei Fedotov
       
      4.
      [classlib][imageio] Implementation for ordering feature of ServiceRegistry Sub-task Closed Alexei Fedotov
       
      5.
      Remove the exception in method IIOServiceProvider.onDeregistration Sub-task Closed Alexei Fedotov
       
      6.
      implementation of ImageWriterSpi.isOwnWriter and ImageReaderSpi.isOwnReader Sub-task Closed Alexei Fedotov
       
      7.
      Implementation of method deregisterServiceProvider(java.lang.Object, java.lang.Class) Sub-task Closed Tim Ellison
       
      8.
      Implementation of method deregisterServiceProvider(Object) Sub-task Closed Tim Ellison
       
      9.
      Implementation of methods: setUseCache, getUseCache, setCacheDirectory and getCacheDirectory Sub-task Closed Tim Ellison
       
      10.
      remove NotImplementedException marker for few methods that have been implemented Sub-task Closed Tim Ellison
       
      11.
      Implement ServiceRegistry.contains() Sub-task Closed Alexei Fedotov
       
      12.
      Implement ServiceRegistry.deregisterAll() Sub-task Closed Alexei Fedotov
       
      13.
      Implement ServiceRegistry.lookupProviders(class) Sub-task Closed Mark Hindess
       
      14.
      Implement ImageTypeSpecifier.createIndexed() Sub-task Closed Tim Ellison
       
      15.
      Implement ImageTypeSpecifier.createGrayscale() Sub-task Closed Tim Ellison
       
      16.
      Implement ImageTypeSpecifier.createInterleaved() Sub-task Closed Tim Ellison
       
      17.
      Implement ImageTypeSpecifier.createBufferedImage() and ImageTypeSpecifier.getBufferedImageType() Sub-task Closed Tim Ellison
       
      18.
      Implement ImageTypeSpecifier.createBanded() Sub-task Closed Tim Ellison
       
      19.
      Implement ImageTypeSpecifier.createFromBufferedImageType() Sub-task Closed Tim Ellison
       
      20.
      Implement missing functionalities in ImageOutputStreamImpl class Sub-task Closed Tim Ellison
       
      21.
      Implement ServiceRegistry.finalize() Sub-task Closed Tim Ellison
       
      22.
      [classlib][awt] Color.getBlue failed on FOP's test case Sub-task Closed Tim Ellison
       
      23.
      Implement PNGMetadataFormat Sub-task Resolved Unassigned
       
      24.
      use cache in createImageInputStream() & createImageOutputStream Sub-task Closed Mark Hindess
       
      25.
      reset bitOffset in the ImageInputStreamImpl.reset() Sub-task Closed Mark Hindess
       
      26.
      ImageOutputStreamImplTest.testWriteUTF() unit test fails with ByteOrder.LITTLE_ENDIAN Sub-task Closed Mark Hindess
       
      27.
      Implement own instance for each ThreadGroup for class IIORegistry Sub-task Closed Mark Hindess
       
      28.
      Add more informative info in the imageio.plugins.jpeg.JPEGQTable.toString() Sub-task Closed Mark Hindess
       
      29.
      Implement ServiceRegistry.getServiceProviderByClass() Sub-task Closed Mark Hindess
       
      30.
      Broadcast the progress of image completion in JPEGImageWriter class Sub-task Closed Mark Hindess
       
      31.
      Implement two java6 only methods Sub-task Resolved Lang Yang
       
      32.
      JPEGQTable.toString() format is not consistent with RI Sub-task Resolved Lang Yang
       

        Activity

        Hide
        Lang Yang added a comment -

        Implemented 4 methods:
        javax.imageio.ImageIO.getWriterFormatNames():
        javax.imageio.ImageIO.getWriterMIMETypes():
        javax.imageio.ImageIO.getReaderFormatNames():
        javax.imageio.ImageIO.getReaderMIMETypes():

        Show
        Lang Yang added a comment - Implemented 4 methods: javax.imageio.ImageIO.getWriterFormatNames(): javax.imageio.ImageIO.getWriterMIMETypes(): javax.imageio.ImageIO.getReaderFormatNames(): javax.imageio.ImageIO.getReaderMIMETypes():
        Hide
        Lang Yang added a comment -

        Hi guys,

        I have tested those four methods. The results returned are as follow:
        GetReaderFormatNames == ["gif", "GIF", "png", "PNG", "jpeg", "jpg", "JPEG", "JPG"]
        GetReaderMIMETypes == ["image/gif", "image/png", "image/jpeg"]

        GetWriterFormatNames == ["png", "PNG", "jpeg", "jpg", "JPEG", "JPG"]
        GetWriterMIMETypes == ["image/png", "image/jpeg"]

        They seems identical with the registered reader/writer Spis:

        registerServiceProvider(new JPEGImageWriterSpi());
        registerServiceProvider(new JPEGImageReaderSpi());
        registerServiceProvider(new PNGImageReaderSpi());
        registerServiceProvider(new PNGImageWriterSpi());
        registerServiceProvider(new GIFImageReaderSpi());

        Thanks,

        Lang

        Show
        Lang Yang added a comment - Hi guys, I have tested those four methods. The results returned are as follow: GetReaderFormatNames == ["gif", "GIF", "png", "PNG", "jpeg", "jpg", "JPEG", "JPG"] GetReaderMIMETypes == ["image/gif", "image/png", "image/jpeg"] GetWriterFormatNames == ["png", "PNG", "jpeg", "jpg", "JPEG", "JPG"] GetWriterMIMETypes == ["image/png", "image/jpeg"] They seems identical with the registered reader/writer Spis: registerServiceProvider(new JPEGImageWriterSpi()); registerServiceProvider(new JPEGImageReaderSpi()); registerServiceProvider(new PNGImageReaderSpi()); registerServiceProvider(new PNGImageWriterSpi()); registerServiceProvider(new GIFImageReaderSpi()); Thanks, Lang
        Hide
        Mark Hindess added a comment -

        Lang, I've applied your patch in commit r927214. Please confirm that it has been applied as expected. (For future reference,why try to avoid tabs in Harmony code and prefer 4 tab indentation. Please set your editor accordingly if possible.)

        Show
        Mark Hindess added a comment - Lang, I've applied your patch in commit r927214. Please confirm that it has been applied as expected. (For future reference,why try to avoid tabs in Harmony code and prefer 4 tab indentation. Please set your editor accordingly if possible.)
        Hide
        Mark Hindess added a comment -

        I committed a minor change in r927216 to add the image/x-png mimetype so that the results of your new methods now match the RI behaviour with respect to the plugins we have implementations for in Harmony.

        It might be easier to track any future patches as subtasks. That is, create a new JIRA that describes the particular improvement and "Link" it to this one. Thanks.

        Show
        Mark Hindess added a comment - I committed a minor change in r927216 to add the image/x-png mimetype so that the results of your new methods now match the RI behaviour with respect to the plugins we have implementations for in Harmony. It might be easier to track any future patches as subtasks. That is, create a new JIRA that describes the particular improvement and "Link" it to this one. Thanks.
        Hide
        Hudson added a comment -

        Integrated in Harmony-1.5-head-linux-x86_64 #732 (See http://hudson.zones.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/732/)
        Applied patch from "[#] [classlib] [imageio] Implement missing
        functionality in imageio module". Fixed whitespace to remove spaces.

        Show
        Hudson added a comment - Integrated in Harmony-1.5-head-linux-x86_64 #732 (See http://hudson.zones.apache.org/hudson/job/Harmony-1.5-head-linux-x86_64/732/ ) Applied patch from " [#] [classlib] [imageio] Implement missing functionality in imageio module". Fixed whitespace to remove spaces.
        Hide
        Jeremias Maerki added a comment -

        I'm happy to see that there's something happening on this front. If I may make a suggestion: you can use a current Apache FOP release (0.95 or even trunk) to test the new additions. The gaps in ImageIO are one of the last blockers to make the latest FOP releases work on Harmony. I'll try to find time to test myself. I've never built Harmony myself, yet, but will still try to do that. I also have a large set of test images accumulated from my work on FOP. That should help identifying more exotic problems. See also: http://wiki.apache.org/harmony/Apache_FOP. I'll update that page once I've looked at this once more.

        Show
        Jeremias Maerki added a comment - I'm happy to see that there's something happening on this front. If I may make a suggestion: you can use a current Apache FOP release (0.95 or even trunk) to test the new additions. The gaps in ImageIO are one of the last blockers to make the latest FOP releases work on Harmony. I'll try to find time to test myself. I've never built Harmony myself, yet, but will still try to do that. I also have a large set of test images accumulated from my work on FOP. That should help identifying more exotic problems. See also: http://wiki.apache.org/harmony/Apache_FOP . I'll update that page once I've looked at this once more.
        Hide
        Mark Hindess added a comment -

        Jeremias, thanks for the info. The FOP tests will be really useful. If you want to try harmony but don't want to setup your own harmony build, you can always grab the latest jdk from Hudson at:

        http://hudson.zones.apache.org/hudson/view/Harmony/job/Harmony-1.5-head-linux-x86_64/

        Show
        Mark Hindess added a comment - Jeremias, thanks for the info. The FOP tests will be really useful. If you want to try harmony but don't want to setup your own harmony build, you can always grab the latest jdk from Hudson at: http://hudson.zones.apache.org/hudson/view/Harmony/job/Harmony-1.5-head-linux-x86_64/
        Hide
        Lang Yang added a comment -

        Hello Jeremias, Thanks for your suggestion. I will definitely take some time to look into FOP and test new functionalities on it. Hope ImageIO module won't be a problem to FOP in few months.

        Show
        Lang Yang added a comment - Hello Jeremias, Thanks for your suggestion. I will definitely take some time to look into FOP and test new functionalities on it. Hope ImageIO module won't be a problem to FOP in few months.

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Hindess
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development