Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4718766
Votes 0
Synopsis PixelAccessor.getPixels behavior not specified for various values of isDest arg
Category jai:implementation
Reported Against 1.1.1_01-dev
Release Fixed
State 1-Dispatched, bug
Priority: 4-Low
Related Bugs
Submit Date 23-JUL-2002
Description
The last argument (isDest) to PixelAccessor.getPixels() method has the following issues:

1. The specification is not clear on how this argument affects the getPixels call. The customer reporting this problem was unable to tell how this argument affects the functionality by reading the Javadoc comments. Documentation should be clarified.

2. The implementation of the getPixels method creates a new array for the UnpackedImageData that is returned from the method, only if the SampleModel of the source image is not a ComponentSampleModel and isDest is true. The specification does not mention this ComponentSampleModel differentiation. Thus the implementation seems inconsistent. Different results should not be returned for different types of SampleModels, especially since this behavior is not
documented, and is not part of the specification.

3. The usefulness of this argument should be evaluated, since the value "true" seems to be used very infrequently for the isDest argument. It is not clear that providing this argument is providing any additional functionality, but it certainly seems to contribute to customer confusion.
Work Around
N/A
Evaluation
Investigation shows that this argument indicates whether the provided raster is a destination raster or not.  If it is not a destination raster, PixelAccessor has to deal with to copy the data elements in the provided raster to the data array used to create UnpackedImageData.  Otherwise, in the implementation, either the data array in the data buffer is used (in some case of the ComponentSampleModel) or a new data array is created to avoid the time comsuming of the data copy.

  xxxxx@xxxxx   2003-03-27
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang