Thanks Andrew for your feedback.

On 6/22/2015 3:28 PM, Andrew Brygin wrote:
Hello Prasanta,

 I have couple comments regarding the fix.

*  lines 408 - 420 and lines 438 - 444.
Here you are obtaining the source and destination rasters for all bands (colors + alpha).
    However, it is already done on the lines 391 and 392.
     Could you please clarify a purpose of this change?

Yes, you are right. I overlooked getRaster() will obtain raster for all bands. I was actually looking into the spec http://docs.oracle.com/javase/8/docs/api/java/awt/image/RescaleOp.html which says /If neither of these cases apply, the number of sets of scaling constants must equal the number of Source color components plus alpha components, in which case all color and alpha components are rescaled. /
for which I added those.
Anyways, I have removed the extra code.
Also, I have removed the need for jpg image in the reg test.
Here is the modified webrev.
http://cr.openjdk.java.net/~psadhukhan/8080287/webrev.01/

Regards
Prasanta
* line 399: here 'numBands' represents number of color bands in the source image (see line 329). So, the last color band is excluded from processing (for example, in RGB image you get raster
   that contain only R and G bands).

* you have created a manual test. Probably an automated test is a bit more
   convenient option here.
Also, there seems to be no need for a jpg image for this test. A source image
   with color strips is much more useful.

Thanks,
Andrew

On 6/22/2015 12:36 PM, prasanta sadhukhan wrote:
Hi ,

Please review a fix for this issue:
It was found that RescaleOp on image with different alpha cannot render the image as there is a particular flaw in RescaleOp implementation whereby the source alpha channel is never transferred to the destination if the rescale op is performed in java (or is never populated, if source image has no alpha channel), resulting in fully transparent destination image. Fix is to make sure the unscaled source alpha is transferred to destination alpha channel.

Bug: https://bugs.openjdk.java.net/browse/JDK-8080287
webrev: http://cr.openjdk.java.net/~psadhukhan/8080287/webrev.00/

Regards
Prasanta


Reply via email to