Revision 12203

View differences:

trunk/libraries/libRaster/src/org/gvsig/raster/grid/GridTransparency.java
116 116
	public int processRGB(int rgb, int line, int col) {
117 117
		int[] px = {(rgb & 0xff000000) >> 24, (rgb & 0xff0000) >> 16,
118 118
                	(rgb & 0x00ff00) >> 8, (rgb & 0x0000ff)};
119
		
120
		double r = opacity / 255D;
121
		if(processRange(px))
122
			r *= ((px[0] & 0xff) / 255D);
119 123
			
120
		processRange(px);
121 124
		if(existAlphaBand() && getAlphaBand() != null)
122
			px[0] = Math.min(getAlphaBand().getElemByte(line, col, 0) & 0xff, px[0] & 0xff);
123
					
124
		px[0] &= (opacity & 0x000000ff);
125
			r *= (getAlphaBand().getElemByte(line, col, 0) & 0xff) / 255D;
126

  
127
		px[0] = (int)(r * 255D);
125 128
		
126 129
		return (((px[0] << 24) & 0xff000000) | (rgb & 0x00ffffff));
127 130
	}

Also available in: Unified diff