|
1 |
JavaTM Advanced Imaging API v1.1.2 Readme
|
|
2 |
|
|
3 |
Contents
|
|
4 |
|
|
5 |
* Introduction
|
|
6 |
o Installation and System Requirements
|
|
7 |
o Documentation
|
|
8 |
o Bugs
|
|
9 |
* Overview of JAI Functionality
|
|
10 |
o Core Functionality
|
|
11 |
o Operators
|
|
12 |
+ Native Acceleration
|
|
13 |
o How to Run the JAI 1.1 version of Remote Imaging
|
|
14 |
o How to Run the JAI 1.0.2 version of Remote Imaging
|
|
15 |
* What's New
|
|
16 |
o Core Classes
|
|
17 |
o Operations
|
|
18 |
o Network Imaging
|
|
19 |
o Widget Package
|
|
20 |
o Fixed Bugs
|
|
21 |
* Changes From JAI 1.1.2-beta to JAI 1.1.2-RC
|
|
22 |
o Bugs Fixed in JAI 1.1.2-RC
|
|
23 |
o Enhancements Added in JAI 1.1.2-RC
|
|
24 |
* Changes From JAI 1.1.2-RC to JAI 1.1.2
|
|
25 |
o Bugs Fixed in JAI 1.1.2
|
|
26 |
o Enhancements Added in JAI 1.1.2
|
|
27 |
|
|
28 |
* Feedback
|
|
29 |
|
|
30 |
Introduction
|
|
31 |
|
|
32 |
The Maintenance Review release of the 1.1 version of the Java TM Advanced
|
|
33 |
Imaging (JAI) specification contains some changes since the JAI 1.1
|
|
34 |
specification Final Release. The present reference implementation, called
|
|
35 |
Java Advanced Imaging 1.1.2, implements the Maintenance Review version of
|
|
36 |
the JAI 1.1 specification and also contains bug fixes and performance
|
|
37 |
enhancements with respect to the most recent implementation of the JAI 1.1
|
|
38 |
specification Final Release which was called JAI 1.1.1_01. It represents
|
|
39 |
development pursuant to maintenance of the Java Advanced Imaging 1.1 JSR.
|
|
40 |
|
|
41 |
The changes since JAI 1.1.1_01 are described in the "What's New" section of
|
|
42 |
this document.
|
|
43 |
|
|
44 |
The Java Advanced Imaging API home page is located at
|
|
45 |
http://java.sun.com/products/java-media/jai/. There you will find binaries,
|
|
46 |
documentation, answers to frequently asked questions, and other information.
|
|
47 |
|
|
48 |
Installation and System Requirements
|
|
49 |
|
|
50 |
For general installation instructions please refer to the INSTALL page. For
|
|
51 |
system requirements please refer to the system requirements section of the
|
|
52 |
INSTALL page.
|
|
53 |
|
|
54 |
Documentation
|
|
55 |
|
|
56 |
Links to Java Advanced Imaging documentation are available at
|
|
57 |
http://java.sun.com/products/java-media/jai/docs/
|
|
58 |
|
|
59 |
Bugs
|
|
60 |
|
|
61 |
Some bugs are known to exist - see the BUGS page for details.
|
|
62 |
|
|
63 |
Overview of JAI Functionality
|
|
64 |
|
|
65 |
Core Functionality
|
|
66 |
|
|
67 |
All areas of the JAI specification have been implemented for this release.
|
|
68 |
The com.sun.media.jai.codec package continues to be an uncommitted part of
|
|
69 |
JAI. For mode information on image reading and writing images on the Java 2
|
|
70 |
platform and in JAI please refer to the page Image I/O in Java Advanced
|
|
71 |
Imaging.
|
|
72 |
|
|
73 |
All operators outlined in the Java Advanced Imaging API specification are
|
|
74 |
implemented.
|
|
75 |
|
|
76 |
The major areas of JAI functionality are described below:
|
|
77 |
|
|
78 |
1. Tiling
|
|
79 |
|
|
80 |
Images are made up of tiles. Different images may have different tile
|
|
81 |
sizes. Each tile can be processed and stored in memory separately.
|
|
82 |
Tiles may be stored in a centrally-maintained cache for performance.
|
|
83 |
The use of tiling also facilitates the use of multiple threads for
|
|
84 |
computation. Previously allocated tiles may also be re-used to save
|
|
85 |
memory.
|
|
86 |
|
|
87 |
2. Deferred execution
|
|
88 |
|
|
89 |
Image operations performed on an image do not take place immediately
|
|
90 |
when they are defined. Calculation of pixels happens only when a
|
|
91 |
portion of the resultant image is requested, and only tiles that are
|
|
92 |
needed are processed. However, operations always appear semantically to
|
|
93 |
be completed immediately.
|
|
94 |
|
|
95 |
3. Threaded Computation
|
|
96 |
|
|
97 |
Requests for tiles are given to several running threads, allowing
|
|
98 |
potential speedups on multi-processor systems or when requesting data
|
|
99 |
over the network.
|
|
100 |
|
|
101 |
4. Object-Oriented Extensibility
|
|
102 |
|
|
103 |
Users can add their own image operators or override existing operators
|
|
104 |
by registering the new operators with the operation registry. Please
|
|
105 |
see the "The Java Advanced Imaging API White Paper," the API
|
|
106 |
documentation, the JAI tutorial, the sample code, and the jai-interest
|
|
107 |
archives for more information (in the archives search for subjects
|
|
108 |
beginning with "sample code").
|
|
109 |
|
|
110 |
Additionally, users may extend a number of non-image classes in order
|
|
111 |
to add functionality to JAI:
|
|
112 |
|
|
113 |
o Border Extension
|
|
114 |
|
|
115 |
Operators may obtain an extended view of their sources using an
|
|
116 |
extensible mechanism for generating pixel values outside of the
|
|
117 |
source image bounds. New subclasses of BorderExtender may be used
|
|
118 |
to obtain customized functionality.
|
|
119 |
|
|
120 |
o Image Warping
|
|
121 |
|
|
122 |
Subclasses of Warp may be written to perform customized image
|
|
123 |
warping.
|
|
124 |
|
|
125 |
o Pixel Interpolation
|
|
126 |
|
|
127 |
Subclasses of Interpolation may be written to perform customized
|
|
128 |
pixel interpolation.
|
|
129 |
|
|
130 |
o Color Spaces
|
|
131 |
|
|
132 |
Subclasses of ColorSpaceJAI may be written to implement
|
|
133 |
mathematically defined color space transformations without the
|
|
134 |
need for ICC profiles.
|
|
135 |
|
|
136 |
5. Graphics2D-Style Drawing
|
|
137 |
|
|
138 |
Graphics2D-style drawing may be performed on a TiledImage in a manner
|
|
139 |
analogous to that available for java.awt.image.BufferedImage.
|
|
140 |
|
|
141 |
The RenderableGraphics class provides a way to store a sequence of
|
|
142 |
drawing commands and to "replay" them at an arbitrary output
|
|
143 |
resolution.
|
|
144 |
|
|
145 |
6. Regions of interest (ROIs)
|
|
146 |
|
|
147 |
Non-rectangular portions of an image may be specified using a ROI or
|
|
148 |
ROIShape object. These ROIs may be used as parameters to the Extrema,
|
|
149 |
Mean, Histogram or Mosaic operations and the TiledImage.set() and
|
|
150 |
TiledImage.setData() methods. Operations produce an appropriate ROI
|
|
151 |
property on their output when one exists on their input.
|
|
152 |
|
|
153 |
7. Image file handling
|
|
154 |
|
|
155 |
This release of Java Advanced Imaging supports BMP, FlashPIX, GIF,
|
|
156 |
JPEG, PNG, PNM, and TIFF images as defined in the TIFF 6.0
|
|
157 |
specification, and WBMP type 0 B/W uncompressed bitmaps. TIFF G3 (1D
|
|
158 |
and 2D), G4, PackBits, LZW, JPEG, and DEFLATE (Zip) compression types
|
|
159 |
are understood.
|
|
160 |
|
|
161 |
The classes dealing with image file handling (the
|
|
162 |
com.sun.media.jai.codec package and private implementation packages
|
|
163 |
that provide support for it) are provided in a separate jai file,
|
|
164 |
jai_codec.jar. This jar file may be used separately from the
|
|
165 |
jai_core.jar file containing the various javax.media.jai packages and
|
|
166 |
their supporting classes.
|
|
167 |
|
|
168 |
As described in the Core Functionality section of this document, the
|
|
169 |
image codec classes should be considered as temporary helper functions.
|
|
170 |
They will be replaced by a new API for image I/O that has been defined
|
|
171 |
under the Java Community Process.
|
|
172 |
|
|
173 |
o BMP File Handling:
|
|
174 |
|
|
175 |
The BMP reader can read Version 2.x, 3.x and some 4.x BMP
|
|
176 |
images. BMP images with 1, 4, 8, 24 bits can be read with
|
|
177 |
this reader. Support for 16 and 32 bit images has also been
|
|
178 |
implemented, although such images are not very common.
|
|
179 |
|
|
180 |
Reading of compressed BMPs is supported. BI_RGB, BI_RLE8,
|
|
181 |
BI_RLE4 and BI_BITFIELDS compressions are handled.
|
|
182 |
|
|
183 |
The BMP reader emits properties such as type of compression,
|
|
184 |
bits per pixel etc. Use the getPropertyNames() method to get
|
|
185 |
the names of all the properties emitted.
|
|
186 |
|
|
187 |
BMP Limitations:
|
|
188 |
|
|
189 |
+ Only the default RGB color space is supported.
|
|
190 |
+ Alpha channels are not supported.
|
|
191 |
|
|
192 |
BMP Writer:
|
|
193 |
+ The BMP writer is capable of writing images in the
|
|
194 |
Version 3 format. Images which make use of a
|
|
195 |
IndexColorModel with 2, 16, or 256 palette entries will
|
|
196 |
be written in palette form.
|
|
197 |
+ RLE4 and RLE8 compression is supported when compatible
|
|
198 |
with the image data.
|
|
199 |
|
|
200 |
o FlashPIX file handling:
|
|
201 |
|
|
202 |
A limited FlashPIX reader is provided that is capable of
|
|
203 |
extracting a single resolution from a FlashPIX image file.
|
|
204 |
Only simple FlashPix files are decoded properly.
|
|
205 |
|
|
206 |
The image view object is ignored, and image property
|
|
207 |
information is not exported.
|
|
208 |
|
|
209 |
There is no FlashPIX writer.
|
|
210 |
|
|
211 |
o GIF file handling:
|
|
212 |
|
|
213 |
There is no GIF writer due to the patent on the LZW
|
|
214 |
compression algorithm.
|
|
215 |
|
|
216 |
o JPEG file handling:
|
|
217 |
|
|
218 |
+ JPEG files are read and written using the classes found in
|
|
219 |
the com.sun.image.codec.jpeg package of the JDK. A set of
|
|
220 |
simple JAI wrapper classes around these classes is provided.
|
|
221 |
+ The JPEG decoder cannot read abbreviated streams, either
|
|
222 |
tables-only or image-only.
|
|
223 |
|
|
224 |
o PNG file handling:
|
|
225 |
|
|
226 |
All files in the PNGSuite test suite have been read and
|
|
227 |
written successfully. See the documentation in
|
|
228 |
com.sun.media.jai.codec.PNGDecodeParam and PNGEncodeParam for
|
|
229 |
more information.
|
|
230 |
|
|
231 |
o PNM file handling:
|
|
232 |
|
|
233 |
PNM files may be read and written in both ASCII and raw
|
|
234 |
formats. The encoder automatically selects between PBM
|
|
235 |
(bitmap), PGM (grayscale) and PPM (RGB) files according to
|
|
236 |
the number of bands and bit depth of the source image.
|
|
237 |
|
|
238 |
Due to the limitations of the format, only images with 1 or 3
|
|
239 |
bands may be written.
|
|
240 |
|
|
241 |
o TIFF file handling:
|
|
242 |
|
|
243 |
TIFF support has the following limitations:
|
|
244 |
|
|
245 |
+ The TIFF encoder does not support LZW compression due to the
|
|
246 |
patent on the algorithm.
|
|
247 |
+ Planar format (PlanarConfiguration field has value 2) is not
|
|
248 |
supported for decoding or encoding.
|
|
249 |
|
|
250 |
o WBMP file handling:
|
|
251 |
|
|
252 |
The WBMP codec reads and writes images in the Wireless Bitmap
|
|
253 |
format described in chapter 6 and Appendix A of the Wireless
|
|
254 |
Application Protocol (WAP) Wireless Application Environment
|
|
255 |
Specification, Version 1.3, 29 March 2000. The WBMP type
|
|
256 |
supported is WBMP Type 0: B/W, Uncompressed Bitmap. There are
|
|
257 |
no limitations on the image dimensions.
|
|
258 |
|
|
259 |
8. Image Layouts
|
|
260 |
|
|
261 |
Images with arbitrary pixel layouts may be processed in a uniform
|
|
262 |
manner using the PixelAccessor and RasterAccessor classes.
|
|
263 |
|
|
264 |
Source images with ComponentColorModels and IndexColorModels are
|
|
265 |
supported. DirectColorModel images are not supported.
|
|
266 |
|
|
267 |
PixelAccessor and RasterAccessor provide the most efficient support for
|
|
268 |
the ComponentSampleModel/ComponentColorModel combination.
|
|
269 |
|
|
270 |
9. Image Collections
|
|
271 |
|
|
272 |
The output of a standard image operator on an instance of
|
|
273 |
java.util.Collection is a collection of the same type. Nested
|
|
274 |
collections are supported. Operators may also emit collections of their
|
|
275 |
choice, or take collections as sources and emit a single image.
|
|
276 |
|
|
277 |
10. Remote Imaging
|
|
278 |
|
|
279 |
JAI allows operations to be performed remotely to be created in a
|
|
280 |
manner similar to local operations. RemoteJAI.create() and
|
|
281 |
RemoteJAI.createRenderable() can be used to create operations that are
|
|
282 |
performed on remote hosts. Operation chains are created on the client
|
|
283 |
and can contain a mix of local and remote operations by using
|
|
284 |
JAI.create() and RemoteJAI.create(), respectively to create the
|
|
285 |
operations.
|
|
286 |
|
|
287 |
The "fileload" and "filestore" operations can allow files that reside
|
|
288 |
only on remote filesystems to be loaded and stored remotely. This can
|
|
289 |
be accomplished by setting the checkFileLocally argument to the
|
|
290 |
operation to be false, in which case the presence of the file to be
|
|
291 |
loaded or stored is not checked on the local file system when the
|
|
292 |
operation is first created.
|
|
293 |
|
|
294 |
See sections below for instructions on how to use the JAI 1.0.2 and 1.1
|
|
295 |
or later versions of remote imaging.
|
|
296 |
|
|
297 |
11. Iterators
|
|
298 |
|
|
299 |
Optimized Rect and Random iterators exist as well as a non-optimized
|
|
300 |
version of the Rook iterator.
|
|
301 |
|
|
302 |
12. Snapshotting of External Sources
|
|
303 |
|
|
304 |
SnapshotImage provides an arbitrary number of synchronous views of a
|
|
305 |
possibly changing WritableRenderedImage.
|
|
306 |
|
|
307 |
13. Meta-data Handling
|
|
308 |
|
|
309 |
Meta-data handling is provided via a name-value database of properties
|
|
310 |
associated with each JAI image. Mechanisms are provided by which such
|
|
311 |
properties may be generated and processed in the course of image
|
|
312 |
manipulation. The ability to defer computation of such data is also
|
|
313 |
provided in a manner conceptually equivalent to that available for
|
|
314 |
image data. Please refer to the DeferredData and DeferredProperty
|
|
315 |
classes for more information.
|
|
316 |
|
|
317 |
14. Serialization Support
|
|
318 |
|
|
319 |
SerializerFactory provides a framework is provided to assist in
|
|
320 |
serializing instances of classes which do not implement
|
|
321 |
java.io.Serializable. Such objects must be serialized by extracting a
|
|
322 |
serializable version of their state from which the original object may
|
|
323 |
be extracted after deserialization.
|
|
324 |
|
|
325 |
Operators
|
|
326 |
|
|
327 |
Java Advanced Imaging extends the imaging functionality provided in the Java
|
|
328 |
2D API by providing a more flexible and scalable architecture targeted for
|
|
329 |
complex, high performance imaging requirements. In this context a large
|
|
330 |
number of imaging operators are provided.
|
|
331 |
|
|
332 |
* Native Acceleration
|
|
333 |
|
|
334 |
Pure Java implementations are provided for all image operators and
|
|
335 |
imaging performance is addressed for some of these by providing C-based
|
|
336 |
native code. Native C-code based acceleration for a certain subset of
|
|
337 |
operators under specific conditions (listed in the table below) is
|
|
338 |
available for the Sun/Solaris, Win32 and Linux (x86 only) platforms. On
|
|
339 |
Sun UltraSPARC-based platforms, additional performance is gained with
|
|
340 |
hardware acceleration via the VIS instructions for most natively
|
|
341 |
supported operators. On Win32 platforms which support MMX instructions,
|
|
342 |
hardware acceleration is gained for a subset of the natively supported
|
|
343 |
operators.
|
|
344 |
|
|
345 |
If a native implementation is present it is, by default, the preferred
|
|
346 |
implementation. But if the nature of the sources and parameters of the
|
|
347 |
operation are incompatible with the native operation then processing
|
|
348 |
will revert to Java code. In general the following minimum requirements
|
|
349 |
must be adhered to for the mediaLib native implementation of an
|
|
350 |
operation to be executed:
|
|
351 |
|
|
352 |
o All sources must be RenderedImages.
|
|
353 |
o All sources and destination must have
|
|
354 |
+ a SampleModel which is a ComponentSampleModel and
|
|
355 |
+ a ColorModel which is a ComponentColorModel or no ColorModel
|
|
356 |
(i.e., it is null).
|
|
357 |
o All sources and the destination must have at most 4 bands of pixel
|
|
358 |
data.
|
|
359 |
o If Interpolation type is one of the arguments to the operator,
|
|
360 |
then native acceleration is available only for Nearest, Bilinear,
|
|
361 |
Bicubic and Bicubic2 cases. Additionally for byte images
|
|
362 |
InterpolationTable is also supported for native acceleration.
|
|
363 |
|
|
364 |
Further restrictions may be imposed by individual operations but the
|
|
365 |
above are the most common requirements.
|
|
366 |
|
|
367 |
* Imaging Operators
|
|
368 |
|
|
369 |
The following image operators are implemented in this release. Only a
|
|
370 |
brief description of each operator is provided here. For detailed
|
|
371 |
information on these operators, refer to the package
|
|
372 |
javax.media.jai.operator in the full documentation available at
|
|
373 |
http://java.sun.com/products/java-media/jai/docs/index.html.
|
|
374 |
|
|
375 |
All operations are performed on a per-band basis, unless specified
|
|
376 |
otherwise. C acceleration applies to all platforms whereas VIS is
|
|
377 |
specific to Sun UltraSPARC and MMX to Windows.
|
|
378 |
|
|
379 |
1. Point and Arithmetic Operators
|
|
380 |
|
|
381 |
Native Acceleration
|
|
382 |
Operator Name Description
|
|
383 |
C VIS MMX Notes
|
|
384 |
Computes the
|
|
385 |
absolute absolute value X X X
|
|
386 |
of the pixels of
|
|
387 |
an image.
|
|
388 |
Adds the pixel
|
|
389 |
add values of two X X X
|
|
390 |
source images.
|
|
391 |
Adds a
|
|
392 |
addcollection collection of
|
|
393 |
images to one
|
|
394 |
another.
|
|
395 |
Adds a set of
|
|
396 |
constant values
|
|
397 |
addconst to the pixel X X X
|
|
398 |
values of a
|
|
399 |
source image.
|
|
400 |
Adds a set of
|
|
401 |
constant values
|
|
402 |
addconsttocollection to the pixel X X X
|
|
403 |
values of a
|
|
404 |
Collection of
|
|
405 |
source images.
|
|
406 |
And's the pixel
|
|
407 |
and values of two X X X
|
|
408 |
source images.
|
|
409 |
And's the pixel
|
|
410 |
values of a
|
|
411 |
andconst source image X X X
|
|
412 |
with a set of
|
|
413 |
constants.
|
|
414 |
Computes a
|
|
415 |
linear
|
|
416 |
bandcombine combination of X X X 3x4 matrix only.
|
|
417 |
the bands of an
|
|
418 |
image.
|
|
419 |
Creates an image
|
|
420 |
consisting of
|
|
421 |
all bands of all
|
|
422 |
bandmerge sources
|
|
423 |
concatenated in
|
|
424 |
the order
|
|
425 |
encountered.
|
|
426 |
Selects a subset
|
|
427 |
of the bands of Only if the band
|
|
428 |
bandselect an image, X X X selection is
|
|
429 |
possibly monotonically
|
|
430 |
reordering them. increasing.
|
|
431 |
Thresholds a
|
|
432 |
single-band
|
|
433 |
binarize image to two X X
|
|
434 |
levels to
|
|
435 |
generate a
|
|
436 |
bilevel output.
|
|
437 |
Set all pixel
|
|
438 |
values below the
|
|
439 |
low value to
|
|
440 |
that low value,
|
|
441 |
clamp set all the X X X
|
|
442 |
pixel values
|
|
443 |
above the high
|
|
444 |
value to that
|
|
445 |
high value.
|
|
446 |
Converts an
|
|
447 |
colorconvert image to a given
|
|
448 |
ColorSpace.
|
|
449 |
Generates an
|
|
450 |
optimal LUT by
|
|
451 |
colorquantizer executing a
|
|
452 |
color
|
|
453 |
quantization
|
|
454 |
algorithm
|
|
455 |
Combines two
|
|
456 |
images based on
|
|
457 |
composite their alpha X X X
|
|
458 |
values at each
|
|
459 |
pixel.
|
|
460 |
Creates an image
|
|
461 |
constant with constant
|
|
462 |
pixel values.
|
|
463 |
Divides the
|
|
464 |
pixel values of
|
|
465 |
the first source
|
|
466 |
divide image by the X
|
|
467 |
pixel values of
|
|
468 |
the second
|
|
469 |
source image.
|
|
470 |
Divides the
|
|
471 |
pixel values of
|
|
472 |
dividebyconst a source image X
|
|
473 |
by a set of
|
|
474 |
constants.
|
|
475 |
Divides a set of
|
|
476 |
divideintoconst constants by the X
|
|
477 |
pixel values of
|
|
478 |
a source image.
|
|
479 |
Computes the
|
|
480 |
exp exponential of X
|
|
481 |
the pixel values
|
|
482 |
of an image.
|
|
483 |
Performs
|
|
484 |
reformatting on
|
|
485 |
an image,
|
|
486 |
including data
|
|
487 |
format type casting,
|
|
488 |
replacing the
|
|
489 |
SampleModel and
|
|
490 |
ColorModel, and
|
|
491 |
restructuring
|
|
492 |
the tile grid.
|
|
493 |
Inverts the
|
|
494 |
invert pixel values of X X X
|
|
495 |
an image.
|
|
496 |
Computes the
|
|
497 |
natural
|
|
498 |
log logarithm of the X
|
|
499 |
pixel values of
|
|
500 |
an image.
|
|
501 |
|
|
502 |
Performs general Only if table
|
|
503 |
lookup table lookup on X X X has less than or
|
|
504 |
an image. equal to 4
|
|
505 |
bands.
|
|
506 |
Performs a
|
|
507 |
piecewise linear
|
|
508 |
remapping of
|
|
509 |
matchcdf pixel values to
|
|
510 |
match a given
|
|
511 |
cumulative
|
|
512 |
distribution
|
|
513 |
function.
|
|
514 |
Chooses the
|
|
515 |
max maximum pixel X X X
|
|
516 |
values between
|
|
517 |
two images.
|
|
518 |
Chooses the
|
|
519 |
min minimum pixel X X X
|
|
520 |
values between
|
|
521 |
two images.
|
|
522 |
Multiplies the
|
|
523 |
multiply pixel values of X X
|
|
524 |
two source
|
|
525 |
images.
|
|
526 |
Multiplies the
|
|
527 |
pixel values of
|
|
528 |
multiplyconst a source image X X
|
|
529 |
by a set of
|
|
530 |
constants.
|
|
531 |
Inverts the
|
|
532 |
not pixel values of X X X
|
|
533 |
a source image.
|
|
534 |
Or's the pixel
|
|
535 |
or values of two X X X
|
|
536 |
source images.
|
|
537 |
Or's the pixel
|
|
538 |
values of a
|
|
539 |
orconst source image X X X
|
|
540 |
with a set of
|
|
541 |
constants.
|
|
542 |
Overlays one
|
|
543 |
overlay image on top of
|
|
544 |
another image.
|
|
545 |
Performs
|
|
546 |
piecewise linear
|
|
547 |
piecewise remapping of the
|
|
548 |
pixel values of
|
|
549 |
an image.
|
|
550 |
Performs a
|
|
551 |
linear remapping
|
|
552 |
rescale of the pixel X X
|
|
553 |
values of an
|
|
554 |
image.
|
|
555 |
Subtracts the
|
|
556 |
pixel values of
|
|
557 |
subtract one image from X X X
|
|
558 |
those of
|
|
559 |
another.
|
|
560 |
Subtracts a set
|
|
561 |
of constant
|
|
562 |
subtractconst values from the X X X
|
|
563 |
pixel values of
|
|
564 |
an image.
|
|
565 |
Subtracts a set
|
|
566 |
of constant
|
|
567 |
subtractfromconst values from the X X X
|
|
568 |
pixel values of
|
|
569 |
an image.
|
|
570 |
Maps the pixel
|
|
571 |
values that fall
|
|
572 |
threshold between a low X X X
|
|
573 |
and high value
|
|
574 |
to a set of
|
|
575 |
constants.
|
|
576 |
Xor's the pixel
|
|
577 |
xor values of two X X X
|
|
578 |
source images.
|
|
579 |
Xor's a source
|
|
580 |
xorconst image with a set X X X
|
|
581 |
of constants.
|
|
582 |
|
|
583 |
2. Area and Geometric Operators
|
|
584 |
|
|
585 |
Native Acceleration
|
|
586 |
Operator Name Description
|
|
587 |
C VIS MMX Notes
|
|
588 |
|
|
589 |
Performs first InterpolationTable
|
|
590 |
affine order geometric X X X is not MMX
|
|
591 |
image warping. accelerated for
|
|
592 |
even byte images.
|
|
593 |
|
|
594 |
border Adds a border
|
|
595 |
around an image.
|
|
596 |
Convolves an
|
|
597 |
boxfilter image using a
|
|
598 |
two-dimensional
|
|
599 |
box filter.
|
|
600 |
Performs an MxN
|
|
601 |
convolve image X X X General and
|
|
602 |
convolution. separable cases.
|
|
603 |
Extracts a
|
|
604 |
crop subarea of an
|
|
605 |
image.
|
|
606 |
Performs
|
|
607 |
Only single band,
|
|
608 |
dilate morphological X X X 3x3 kernels
|
|
609 |
dilation on an
|
|
610 |
image. centered at 1,1
|
|
611 |
Performs
|
|
612 |
Only single band,
|
|
613 |
erode morphological X X X 3x3 kernels
|
|
614 |
erosion on an
|
|
615 |
image. centered at 1,1
|
|
616 |
Performs a
|
|
617 |
combined integral
|
|
618 |
filteredsubsample subsample and X X X
|
|
619 |
symmetric
|
|
620 |
product-separable
|
|
621 |
filter.
|
|
622 |
Performs edge
|
|
623 |
gradientmagnitude detection using X X X
|
|
624 |
orthogonal
|
|
625 |
gradient masks.
|
|
626 |
Computes the Only single band;
|
|
627 |
maxfilter maximum value of X X X only for a SQUARE
|
|
628 |
a pixel mask of size 3, 5,
|
|
629 |
neighborhood. or 7
|
|
630 |
Computes the
|
|
631 |
medianfilter median value of aX X X
|
|
632 |
pixel
|
|
633 |
neighborhood.
|
|
634 |
Computes the Only single band;
|
|
635 |
minfilter minimum value of X X X only for a SQUARE
|
|
636 |
a pixel mask of size 3, 5,
|
|
637 |
neighborhood. or 7
|
|
638 |
Creates a mosaic
|
|
639 |
mosaic of two or more X X X
|
|
640 |
rendered images.
|
|
641 |
|
|
642 |
Rotates an image InterpolationTable
|
|
643 |
rotate about an X X X is not MMX
|
|
644 |
arbitrary point. accelerated for
|
|
645 |
even byte images.
|
|
646 |
|
|
647 |
Scales and InterpolationTable
|
|
648 |
scale translates an X X X is not MMX
|
|
649 |
image. accelerated for
|
|
650 |
even byte images.
|
|
651 |
InterpolationTable
|
|
652 |
shear Shears an image. X X X is not MMX
|
|
653 |
accelerated for
|
|
654 |
even byte images.
|
|
655 |
Subsamples an
|
|
656 |
subsampleaverage image by X X
|
|
657 |
averaging over a
|
|
658 |
moving window.
|
|
659 |
Subsamples a
|
|
660 |
subsamplebinarytogray bilevel image to X X
|
|
661 |
a grayscale
|
|
662 |
image.
|
|
663 |
Translates an
|
|
664 |
image by an InterpolationTable
|
|
665 |
translate integral or X X X is not MMX
|
|
666 |
fractional accelerated for
|
|
667 |
amount. even byte images.
|
|
668 |
Reflects an image
|
|
669 |
in a specified
|
|
670 |
transpose direction or X X X
|
|
671 |
rotates an image
|
|
672 |
in multiples of
|
|
673 |
90 degrees.
|
|
674 |
Sharpens an image
|
|
675 |
unsharpmask by suppressing X X X General and
|
|
676 |
the low separable kernels.
|
|
677 |
frequencies.
|
|
678 |
Performs
|
|
679 |
warp geometric warpingX X X polynomial and
|
|
680 |
on an image. grid only.
|
|
681 |
|
|
682 |
3. Frequency-domain, Transform, and Complex Operators
|
|
683 |
|
|
684 |
Native
|
|
685 |
Operator Name Description Acceleration
|
|
686 |
C VIS MMX Notes
|
|
687 |
|
|
688 |
conjugate Computes the complex
|
|
689 |
conjugate of an image.
|
|
690 |
|
|
691 |
dct Computes the Discrete Cosine X
|
|
692 |
Transform of an image.
|
|
693 |
Computes the Discrete
|
|
694 |
dft Fourier Transform of an X
|
|
695 |
image, possibly resulting in
|
|
696 |
a complex image.
|
|
697 |
|
|
698 |
dividecomplex Computes the quotient of two
|
|
699 |
complex images.
|
|
700 |
Computes the inverse
|
|
701 |
idct Discrete Cosine Transform of X
|
|
702 |
an image.
|
|
703 |
Computes the inverse
|
|
704 |
idft Discrete Fourier Transform X
|
|
705 |
of an image.
|
|
706 |
|
|
707 |
magnitude Computes the magnitude of a
|
|
708 |
complex image.
|
|
709 |
Computes the squared
|
|
710 |
magnitudesquared magnitude of a complex
|
|
711 |
image.
|
|
712 |
|
|
713 |
multiplycomplex Computes the product of two
|
|
714 |
complex images.
|
|
715 |
|
|
716 |
periodicshift Shifts an image
|
|
717 |
periodically.
|
|
718 |
|
|
719 |
phase Computes the phase angle of
|
|
720 |
a complex image.
|
|
721 |
Creates a complex image from
|
|
722 |
polartocomplex two images representing
|
|
723 |
magnitude and phase.
|
|
724 |
|
|
725 |
4. Statistical Operators
|
|
726 |
|
|
727 |
Native
|
|
728 |
Operator Acceleration
|
|
729 |
Name Description
|
|
730 |
C VIS MMX Notes
|
|
731 |
Computes the
|
|
732 |
maximum and Only if the ROI
|
|
733 |
extrema minimum pixel X X X is null or
|
|
734 |
values of an encloses the
|
|
735 |
image. entire image.
|
|
736 |
Computes the
|
|
737 |
histogram histogram of an X X X
|
|
738 |
image.
|
|
739 |
Only if the ROI
|
|
740 |
Computes the mean is null or
|
|
741 |
mean pixel value of a X X X encloses the
|
|
742 |
region of an entire image and
|
|
743 |
image. the sampling
|
|
744 |
period is 1.
|
|
745 |
|
|
746 |
5. Sourceless Operators
|
|
747 |
|
|
748 |
Operator Name Description
|
|
749 |
imagefunction Creates an image by evaluating a function.
|
|
750 |
pattern Creates an image consisting of a repeated pattern.
|
|
751 |
|
|
752 |
6. File and Stream Operators
|
|
753 |
|
|
754 |
Operator Name Description
|
|
755 |
awtimage Converts a java.awt.Image into a PlanarImage.
|
|
756 |
bmp Loads an image in BMP format.
|
|
757 |
encode Writes an image to an OutputStream.
|
|
758 |
fileload Loads an image from a file.
|
|
759 |
filestore Writes an image to a file in a given format.
|
|
760 |
fpx Loads an image in FlashPIX format.
|
|
761 |
gif Loads an image in GIF format.
|
|
762 |
Reads an image from a remote IIP server,
|
|
763 |
iip performing IIP view transforms (affine,
|
|
764 |
colortwist, filter, crop).
|
|
765 |
|
|
766 |
iipresolution Reads a single resolution of an image from a
|
|
767 |
remote IIP server.
|
|
768 |
jpeg Loads an image in JPEG format.
|
|
769 |
png Loads an image in PNG 1.0 or 1.1 format.
|
|
770 |
pnm Loads an image in PBM, PGM, or PPM format.
|
|
771 |
stream Loads an image from a stream.
|
|
772 |
tiff Loads an image in TIFF 6.0 format.
|
|
773 |
url Loads an image from a URL.
|
|
774 |
|
|
775 |
7. Other Operators
|
|
776 |
|
|
777 |
Operator Name Description
|
|
778 |
|
|
779 |
errordiffusion Performs error diffusion color quantization using
|
|
780 |
a specified color map and error filter.
|
|
781 |
Performs no processing. Useful as a placeholder
|
|
782 |
null in an operation chain or as a node which emits
|
|
783 |
meta-data.
|
|
784 |
|
|
785 |
ordereddither Performs color quantization using a specified
|
|
786 |
color map and a fixed dither mask.
|
|
787 |
|
|
788 |
renderable Constructs a RenderableImage from a RenderedImage
|
|
789 |
source.
|
|
790 |
|
|
791 |
How to Run the JAI 1.1 version of Remote Imaging
|
|
792 |
|
|
793 |
1. Create a Security Policy File
|
|
794 |
|
|
795 |
If $JAI is the base directory where Java Advanced Imaging is installed,
|
|
796 |
create a text file named $JAI/policy containing the following:
|
|
797 |
|
|
798 |
grant {
|
|
799 |
// Allow everything for now
|
|
800 |
permission java.security.AllPermission;
|
|
801 |
};
|
|
802 |
|
|
803 |
Note that this policy file is for testing purposes only, and it is not
|
|
804 |
recommended that full permission be given to all programs.
|
|
805 |
|
|
806 |
For more information on policy files and permissions please see:
|
|
807 |
|
|
808 |
http://java.sun.com/products/jdk/1.3/docs/guide/security/PolicyFiles.html
|
|
809 |
|
|
810 |
http://java.sun.com/products/jdk/1.3/docs/guide/security/permissions.html
|
|
811 |
|
|
812 |
2. Start the RMI Registry
|
|
813 |
|
|
814 |
Log in to the remote machine where the image server will be running and
|
|
815 |
start the RMI registry. For example, in the Solaris operating environment
|
|
816 |
using a Bourne-compatible shell (e.g., /bin/sh):
|
|
817 |
|
|
818 |
$ unset CLASSPATH
|
|
819 |
$ rmiregistry &
|
|
820 |
|
|
821 |
Note that the CLASSPATH environment variable is deliberately not set.
|
|
822 |
|
|
823 |
3. Start the JAI Remote Image Server
|
|
824 |
|
|
825 |
While still logged in to the remote server machine, set the CLASSPATH and
|
|
826 |
LD_LIBRARY_PATH environment variables as required for JAI (see the INSTALL
|
|
827 |
file) and start the remote imaging server:
|
|
828 |
|
|
829 |
$ CLASSPATH=$JAI/lib/jai_core.jar:$JAI/lib/jai_codec.jar:\
|
|
830 |
$JAI/lib/mlibwrapper_jai.jar
|
|
831 |
$ export CLASSPATH
|
|
832 |
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JAI/lib
|
|
833 |
$ export LD_LIBRARY_PATH
|
|
834 |
$ java \
|
|
835 |
-Djava.rmi.server.codebase=\
|
|
836 |
"file:$JAI/lib/jai_core.jar file:$JAI/lib/jai_codec.jar" \
|
|
837 |
-Djava.rmi.server.useCodebaseOnly=false \
|
|
838 |
-Djava.security.policy=file:$JAI/policy \
|
|
839 |
com.sun.media.jai.rmi.JAIRMIImageServer
|
|
840 |
|
|
841 |
For example, when the above steps are executed on a machine with IP address
|
|
842 |
123.456.78.90 the following is printed:
|
|
843 |
|
|
844 |
Server: using host 123.456.78.90 port 1099
|
|
845 |
Registering image server as "rmi://123.456.78.90:1099/JAIRMIRemoteServer1.1".
|
|
846 |
Server: Bound RemoteImageServer into the registry.
|
|
847 |
|
|
848 |
4. Run the Local Application
|
|
849 |
|
|
850 |
Run the local application making sure that the serverName parameter of any
|
|
851 |
javax.media.jai.remote.RemoteJAI constructors corresponds to the machine on
|
|
852 |
which the remote image server is running. For example, if the machine with
|
|
853 |
IP address 123.456.78.90 above is named myserver the serverName parameter of
|
|
854 |
any RemoteJAI constructors should be "myserver".
|
|
855 |
|
|
856 |
How to Run the JAI 1.0.2 version of Remote Imaging
|
|
857 |
|
|
858 |
For more information on RMI (remote method invocation) please refer to:
|
|
859 |
http://java.sun.com/products/jdk/rmi/index.html
|
|
860 |
|
|
861 |
1. Create a Security Policy File
|
|
862 |
|
|
863 |
If $JAI is the base directory where Java Advanced Imaging is installed,
|
|
864 |
create a text file named $JAI/policy containing the following:
|
|
865 |
|
|
866 |
grant {
|
|
867 |
// Allow everything for now
|
|
868 |
permission java.security.AllPermission;
|
|
869 |
};
|
|
870 |
|
|
871 |
Note that this policy file is for testing purposes only.
|
|
872 |
|
|
873 |
For more information on policy files and permissions please see:
|
|
874 |
|
|
875 |
http://java.sun.com/products/jdk/1.2/docs/guide/security/PolicyFiles.html
|
|
876 |
|
|
877 |
http://java.sun.com/products/jdk/1.2/docs/guide/security/permissions.html
|
|
878 |
|
|
879 |
2. Start the RMI Registry
|
|
880 |
|
|
881 |
Log in to the remote machine where the image server will be running and
|
|
882 |
start the RMI registry. For example, in the Solaris operating environment
|
|
883 |
using a Bourne-compatible shell (e.g., /bin/sh):
|
|
884 |
|
|
885 |
$ unset CLASSPATH
|
|
886 |
$ rmiregistry &
|
|
887 |
|
|
888 |
Note that the CLASSPATH environment variable is deliberately not set.
|
|
889 |
|
|
890 |
3. Start the JAI Remote Image Server
|
|
891 |
|
|
892 |
While still logged in to the remote server machine, set the CLASSPATH and
|
|
893 |
LD_LIBRARY_PATH environment variables as required for JAI (see the INSTALL
|
|
894 |
file) and start the remote imaging server:
|
|
895 |
|
|
896 |
$ CLASSPATH=$JAI/lib/jai_core.jar:$JAI/lib/jai_codec.jar:\
|
|
897 |
$JAI/lib/mlibwrapper_jai.jar
|
|
898 |
$ export CLASSPATH
|
|
899 |
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JAI/lib
|
|
900 |
$ export LD_LIBRARY_PATH
|
|
901 |
$ java \
|
|
902 |
-Djava.rmi.server.codebase=\
|
|
903 |
"file:$JAI/lib/jai_core.jar file:$JAI/lib/jai_codec.jar" \
|
|
904 |
-Djava.rmi.server.useCodebaseOnly=false \
|
|
905 |
-Djava.security.policy=file:$JAI/policy \
|
|
906 |
com.sun.media.jai.rmi.RMIImageImpl
|
|
907 |
|
|
908 |
For example, when the above steps are executed on a machine with IP address
|
|
909 |
123.456.78.90 the following is printed:
|
|
910 |
|
|
911 |
Server: using host 123.456.78.90 port 1099
|
|
912 |
Registering image server as
|
|
913 |
"rmi://123.456.78.90:1099/RemoteImageServer".
|
|
914 |
Server: Bound RemoteImageServer into
|
|
915 |
the registry.
|
|
916 |
|
|
917 |
4. Run the Local Application
|
|
918 |
|
|
919 |
Run the local application making sure that the serverName parameter of any
|
|
920 |
RemoteImage constructors corresponds to the machine on which the remote
|
|
921 |
image server is running. For example, if the machine with IP address
|
|
922 |
123.456.78.90 above is named myserver the serverName parameter of any
|
|
923 |
RemoteImage() constructors should be "myserver".
|
|
924 |
|
|
925 |
What's New
|
|
926 |
|
|
927 |
This section describes the significant changes and improvements to the Java
|
|
928 |
Advanced Imaging API and its reference implementation since the previous
|
|
929 |
release.
|
|
930 |
|
|
931 |
Core Classes
|
|
932 |
|
|
933 |
* Internal Data Array Recycling
|
|
934 |
|
|
935 |
To improve memory usage, the concept of "array recycling" was developed
|
|
936 |
and implemented. Array recycling effectively traps tiles which will no
|
|
937 |
longer be used. Subsequent tile, i.e., Raster creation attempts first
|
|
938 |
to use the memory "salvaged" from these recycled tiles. Only if this is
|
|
939 |
not possible will new data arrays be allocated.
|
|
940 |
|
|
941 |
The internal arrays from recycled tiles are stored in a mapping from
|
|
942 |
derived key values to References to the arrays. Thus these arrays are
|
|
943 |
subject to garbage collection. The keys in the mapping are derived from
|
|
944 |
the data type of the array, the number of data banks, and the size of
|
|
945 |
the data banks. Maximal recycling therefore will occur when tiles
|
|
946 |
having the same characteristics are used throughout an application.
|
|
947 |
|
|
948 |
The only tiles which are recycled by default are those which are
|
|
949 |
created within JAI and also go out of scope within JAI. This occurs for
|
|
950 |
example in OpImage implementations which create Rasters to contain data
|
|
951 |
cobbled from sources.
|
|
952 |
|
|
953 |
In order to get more tile recycling, some action is required on the
|
|
954 |
part of the developer:
|
|
955 |
|
|
956 |
1. Set a RenderingHint.
|
|
957 |
|
|
958 |
A mapping of the key JAI.KEY_CACHED_TILE_RECYCLING_ENABLED should
|
|
959 |
be provided to the appropriate rendering hint, e.g., as
|
|
960 |
|
|
961 |
// Enable recycling of cached tiles for all ops in this instance.
|
|
962 |
JAI.getDefaultInstance().setRenderingHint(
|
|
963 |
JAI.KEY_CACHED_TILE_RECYCLING_ENABLED,
|
|
964 |
Boolean.TRUE);
|
|
965 |
|
|
966 |
// Enable recycling of tiles for this op alone.
|
|
967 |
ParameterBlock paramBlock;
|
|
968 |
RenderingHints hints;
|
|
969 |
hints.put(JAI.KEY_CACHED_TILE_RECYCLING_ENABLED, Boolean.TRUE);
|
|
970 |
RenderedOp someOp = JAI.create("mosaic", paramBlock, hints);
|
|
971 |
|
|
972 |
The effect of this will be to allow all tiles stored in a
|
|
973 |
TileCache for a given image to be recycled when that image is
|
|
974 |
finalized by the garbage collector.
|
|
975 |
|
|
976 |
2. Invoke dispose() on defunct PlanarImages
|
|
977 |
|
|
978 |
Invoking dispose() will cause the tiles to be flushed from the
|
|
979 |
cache and recycled. Care should be taken when performing this
|
|
980 |
procedure since unexpected results may occur if an application
|
|
981 |
subsequently refers to a disposed image.
|
|
982 |
|
|
983 |
For more information please refer to the documentation of the
|
|
984 |
RenderingHints.Key definitions KEY_TILE_FACTORY,
|
|
985 |
KEY_TILE_RECYCLER, and KEY_CACHED_TILE_RECYCLING_ENABLED in the
|
|
986 |
JAI class, the interface definitions of TileRecycler and
|
|
987 |
TileFactory and the class definition of RecyclingTileFactory, as
|
|
988 |
well as the constructors of OpImage and PlanarImage, and finally
|
|
989 |
the dispose() methods of PlanarImage, RenderedOp and OpImage.
|
|
990 |
|
|
991 |
* Exception Handling
|
|
992 |
|
|
993 |
To improve exception handling, an interface ImagingListener and a new
|
|
994 |
class ImagingException are added in the package javax.media.jai.util.
|
|
995 |
An ImagingListener provides the possibility to monitor, process,
|
|
996 |
recover and log abnormal situations. An ImagingException holds its
|
|
997 |
cause, so that its (root) cause can be retrieved. The class
|
|
998 |
javax.media.jai.remote.RemoteImagingException is reparented from
|
|
999 |
RuntimeException to ImagingException.
|
|
1000 |
|
|
1001 |
These changes were made in response to customer comments observed on
|
|
1002 |
the jai-interest mailing list.
|
|
1003 |
|
|
1004 |
* Type-safe Image create() Methods
|
|
1005 |
|
|
1006 |
To each OperationDescriptor in the javax.media.jai.operator package was
|
|
1007 |
added a type-safe static create method for each supported mode of
|
|
1008 |
operation. The methods added are named as follows:
|
|
1009 |
|
|
1010 |
Mode Method
|
|
1011 |
rendered create()
|
|
1012 |
renderable createRenderable()
|
|
1013 |
Collection createCollection()
|
|
1014 |
renderableCollectioncreateRenderableCollection()
|
|
1015 |
|
|
1016 |
These convenience methods behave as the identically named static
|
|
1017 |
methods in the JAI class. Please refer to
|
|
1018 |
javax.media.jai.operator.*Descriptor for more details.
|
|
1019 |
|
|
1020 |
These changes were made in response to customer comments observed on
|
|
1021 |
the jai-interest mailing list.
|
|
1022 |
|
|
1023 |
* Expansion of IndexColor Data
|
|
1024 |
|
|
1025 |
In the previous versions of JAI, the operators provided by JAI operated
|
|
1026 |
on the image's pixel data only. No color translation was performed
|
|
1027 |
prior to the actual computation by the operator, regardless of the type
|
|
1028 |
of the ColorModel an image had. If it was intended to have an operation
|
|
1029 |
performed on the color data, the color translation needed to be
|
|
1030 |
performed explicitly by the user prior to invoking the operation.
|
|
1031 |
|
|
1032 |
This policy has been changed in JAI 1.1.2 to make handling sources with
|
|
1033 |
IndexColorModels more straightforward. A new RenderingHint
|
|
1034 |
JAI.KEY_REPLACE_INDEX_COLOR_MODEL has been provided that allows for
|
|
1035 |
automatic color translation for colormapped imagery in those situations
|
|
1036 |
where not doing so would result in unexpected / incorrect results (such
|
|
1037 |
as geometric operations). Operations that are implemented as subclasses
|
|
1038 |
of javax.media.jai.AreaOpImage and javax.media.jai.GeometricOpImage set
|
|
1039 |
this RenderingHint to true, such that these operations are performed
|
|
1040 |
correctly on the colormapped imagery, not treating the indices into the
|
|
1041 |
color map as pixel data. The user no longer needs to perform color
|
|
1042 |
translation before invoking such operations.
|
|
1043 |
|
|
1044 |
For further details, please refer to Javadoc comments for the
|
|
1045 |
KEY_REPLACE_INDEX_COLOR_MODEL RenderingHints defined in
|
|
1046 |
javax.media.jai.JAI, Javadoc comments for the javax.media.jai.OpImage
|
|
1047 |
constructor, class comments for javax.media.jai.AreaOpImage,
|
|
1048 |
javax.media.jai.GeometricOpImage, and javax.media.jai.ScaleOpImage etc.
|
|
1049 |
|
|
1050 |
The affected operations are affine, convolve, dilate, erode,
|
|
1051 |
filteredsubsample, gradientmagnitude, max, median, min, rotate, scale,
|
|
1052 |
shear, translate, transpose and warp. For further details, please refer
|
|
1053 |
to the class comments for the OperationDescriptors for these
|
|
1054 |
operations.
|
|
1055 |
|
|
1056 |
One of the common uses of the format operator is to cast the pixel
|
|
1057 |
values of an image to a given data type. In such a case, the format
|
|
1058 |
operation adds a RenderingHints object for
|
|
1059 |
JAI.KEY_REPLACE_INDEX_COLOR_MODEL with the value of Boolean.TRUE, if
|
|
1060 |
the source image provided has an IndexColorModel. Due to the addition
|
|
1061 |
of this new RenderingHint, using the "format" operation with source(s)
|
|
1062 |
that have an IndexColorModel will cause the destination to have an
|
|
1063 |
expanded non-IndexColorModel ColorModel. This expansion ensures that
|
|
1064 |
the conversion to a different data type, ColorModel or SampleModel
|
|
1065 |
happens correctly such that the indices into the color map (for
|
|
1066 |
IndexColorModel images) are not treated as pixel data.
|
|
1067 |
|
|
1068 |
These changes were made in response to customer comments observed on
|
|
1069 |
the jai-interest mailing list.
|
|
1070 |
|
|
1071 |
* Real-valued DataBuffer Portability
|
|
1072 |
|
|
1073 |
Some problems interoperating with JavaTM 2 version 1.4 were observed
|
|
1074 |
due to the classes DataBufferFloat and DataBufferDouble which are found
|
|
1075 |
in Java2D and in JAI. Internal changes in JAI were made such that
|
|
1076 |
floating point DataBuffers are handled using the reflection API. Users
|
|
1077 |
of JavaTM 2 v1.4 should use the floating point DataBuffer classes in
|
|
1078 |
java.awt.image while users of earlier versions of JavaTM 2 should use
|
|
1079 |
those in JAI. Both should function equivalently.
|
|
1080 |
|
|
1081 |
These changes were made in response to customer comments observed on
|
|
1082 |
the jai-interest mailing list.
|
|
1083 |
|
|
1084 |
* Tile Dimension Clamping
|
|
1085 |
|
|
1086 |
To optimize storage requirements for the results of an imaging
|
|
1087 |
operation, as of JAI 1.1.2, the destination image's tile dimensions are
|
|
1088 |
by default clamped to it's image dimensions when these are smaller, if
|
|
1089 |
the tile dimensions were not specified by the user or the operation
|
|
1090 |
itself.
|
|
1091 |
|
|
1092 |
This change was made in response to customer comments observed on the
|
|
1093 |
jai-interest mailing list.
|
|
1094 |
|
|
1095 |
* Suppression of Colormap Acceleration
|
|
1096 |
|
|
1097 |
In the previous versions of JAI, to accelerate the ColormapOpImages,
|
|
1098 |
the transform is performed on the color map if the source and
|
|
1099 |
destination images are both color-indexed. To suppress the
|
|
1100 |
acceleration, a new type of rendering hint key,
|
|
1101 |
KEY_TRANSFORM_ON_COLORMAP, is defined. Operations to which this is
|
|
1102 |
pertinent are
|
|
1103 |
|
|
1104 |
AddConst
|
|
1105 |
AndConst
|
|
1106 |
DivideIntoConst
|
|
1107 |
Exp
|
|
1108 |
Invert
|
|
1109 |
Log
|
|
1110 |
Lookup
|
|
1111 |
MultiplyConst
|
|
1112 |
Not
|
|
1113 |
OrConst
|
|
1114 |
Piecewise
|
|
1115 |
Rescale
|