GithubHelp home page GithubHelp logo

scifio-jai-imageio's Introduction

JAI-ImageIO

Purpose

A fork of the Java API to handle JPEG and JPEG2000 files. Used by SCIFIO to read images compressed with JPEG2000 and lossless JPEG. Modified from the 2008-10-14 source to include support for the YCbCr color space. Several files in the com.sun.media.jai packages were removed, as they are not needed by SCIFIO, and created an additional dependency. This project will be removed once our changes have been added to the official JAI CVS repository.

Building the Java Advanced Imaging Image I/O Tools Packages

To build the Java Advanced Imaging Image I/O Tools packages, you must first checkout the jai-imageio-core CVS repository on java.net. For example, run the cvs checkout command as follows:

  • cd cvs-root-dir
  • cvs checkout jai-imageio-core

Any operating environment that supports J2SE should work. We have built jai-imageio-core on the following operating environments:

  • Solaris-sparc: Sparc (Ultra60 or better) running Solaris 9
  • Solaris-x86: i386/i586 running Solaris-x86 9
  • Linux: i386/i586 running SuSE 9 or RedHat 9.0
  • Windows: Windows/XP, Windows 2000

The following software must be installed:

Building Java Advanced Imaging Image I/O Tools

Before you start building, your PATH must include these directories:

  • ant-root-dir/bin
  • jdk-root-dir/bin

and Java Advanced Imaging (JAI) must be be referenced either by JAI being installed in the J2SDK used for the build; or jai_core.jar being on the CLASSPATH.

Setting the JAVA_HOME or JAVACMD environment variable will supersede jdk-root-dir/bin for ant. For further details please refer to the ant manual.

The default target, jar, creates both optimized and debug jar files.

To build:

  • cd cvs-root-dir/jai-imageio-core
  • ant

The above steps build the Java code for the jj2000, com.sun.media.imageio, com.sun.media.imageioimpl, com.sun.media.jai.imageioimpl and com.sun.media.jai.operator packages. The build will be placed in jai-imageio-core/build/platform/opt where platform is determined from the ant echo command:

  • ant echo

Jar files are placed in jai-imageio-core/build/platform/opt/lib/ext. Binaries for native libraries are part of the project and are copied to the jai-imageio-core/build/platform/opt/jrenativesubdir directory as part of the build, where jrenativesubdiris determined from the ant echo command as above.

To see other targets that are available, type "ant -projecthelp". Note that ant must be run from the top-level directory.

Running Java Advanced Imaging Image I/O Tools

To run Java Advanced Imaging Image I/O Tools, please checkout the jai-imageio-demos project and then refer to README-build.html in jai-imageio-demos for details on building and running Java Advanced Imaging Image I/O Tools demo programs.

scifio-jai-imageio's People

Contributors

ctrueden avatar melissalinkert avatar hinerm avatar qidane avatar chris-allan avatar dscho avatar joshmoore avatar sbesson avatar

Stargazers

vad babushkin avatar  avatar

Watchers

Matt McCormick avatar  avatar  avatar Stephan Saalfeld avatar  avatar  avatar Lee Kamentsky avatar Deborah Schmidt avatar James Cloos avatar Michael avatar Christian Dietz avatar  avatar Stephan Preibisch avatar Alison Walter avatar

scifio-jai-imageio's Issues

Some issues that may be wanted to be reviewed

In PktDecoder.java(https://github.com/scifio/scifio-jai-imageio/blob/master/src/main/java/io/scif/jj2000/j2k/codestream/reader/PktDecoder.java)

Bitwise OR of signed byte value

    val |= sopArray[1];

and

   val |= ephArray[1];

should be:

   val |= (sopArray[1]&0xff);

and

val |= (ephArray[1]&0xff);

=======================

In Box.java(https://github.com/scifio/scifio-jai-imageio/blob/master/src/main/java/io/scif/media/imageioimpl/plugins/jpeg2000/Box.java)

Bitwise OR of signed byte value

        t = (t <<8) | buf[i];

should be

        t = (t <<8) | (buf[i]&0xff);

=====================================

In ChannelDefintionBox.java(https://github.com/scifio/scifio-jai-imageio/blob/master/src/main/java/io/scif/media/imageioimpl/plugins/jpeg2000/ChannelDefinitionBox.java)

Bitwise OR of signed byte value

    num = (short)((data[0] << 8) | data[1]);

should be

    num = (short)(((data[0]&0xff) << 8) | (data[1] & 0xff));

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.