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: 4455825
Votes 0
Synopsis Win32: missing colors when rendering to the screen in grayscale/non-lin gray
Category java:classes_2d
Reported Against ladybird-rc2
Release Fixed 1.3.0_01, 1.4(merlin-beta2) (Bug ID:2117726)
State 10-Fix Delivered, Verified, bug
Priority: 2-High
Related Bugs
Submit Date 08-MAY-2001
Description
Run attached java application on grayscale video board (i.e. Barco or Dome) on 
Win32 with Non-Linear Static Gray palette set, with the latest ladybird:
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

The application displays a grayscale gradient. Note that some of the shades
are mising from the gradient (use attached native windows application
curpal.exe to see that: start dragging mouse from curpal to any pixel at the
screen to see it's color).

  xxxxx@xxxxx   2001-05-08
Work Around
N/A
Evaluation
The missing colors are the one from first 10 and last 10 palette entries.
Here is an email from Jerry on this issue:
------------
When 8-bit grayscale support was first added for Win32 in 1.2, there
were only two possibilities supported:

     a) the colormap is 256 gray entries in monotonic increasing
        order.  This was called GS_STATICGRAY.

     b) the middle 236 entries were forced to be gray (if the
        FORCEGRAY environment variable was set).  This was   
        called GS_INDEXGRAY.

Now that we're adding support for grayscale colormaps in non-monotonic
order without the FORCEGRAY environment variable being set, we need   
to distinguish more than one case of grayscale indexed color maps.    

For the case, when we don't inherit a grayscale color map, but want to
create one because the FORCEGRAY environment variable is set, we still
need to zero the first 10 and last 10 entries.  This tells the code   
in IndexColorModel.java to ignore those ten entries for rendering     
purposes and since all the other entries are opaque gray, an inverse  
gray LUT will be computed, which is used in some native rendering code.
(There is no way through the IndexColorModel constructors to say that  
certain entries should be ignored.  We adopted a convention internally 
that transparent black entries would be ignored.)

For the non-monotonic case, as long as all 256 entries are opaque gray
colors, then IndexColorModel.java should do the right thing.

------------

The fix in "suggested fix" implements this suggestion.
The customer has verified that it fixed the problem.

  xxxxx@xxxxx   2001-05-08

This has been fixed in Merlin as well.

  xxxxx@xxxxx   2001-08-02
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang