United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4200154 : No difference between BILINEAR and BICUBIC interpolation methods

Details
Type:
Enhancement
Submit Date:
1998-12-30
Status:
Resolved
Updated Date:
2003-08-18
Project Name:
JDK
Resolved Date:
2003-08-18
Component:
client-libs
OS:
windows_nt,windows_2000
Sub-Component:
2d
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.2.0,1.4.0
Fixed Versions:
5.0 (tiger)

Related Reports
Duplicate:

Sub Tasks

Description
Setting the RenderingHints KEY_INTERPOLATION to BILINEAR or BICUBIC produces the 
exact same output, as illustrated by the following code segment. Test has been run with several types of images, from graphics (e.g. Duke image) to photos.

      BufferedImage bilinear = new BufferedImage(2*w, 2*h,
BufferedImage.TYPE_INT_RGB);
      BufferedImage bicubic = new BufferedImage(2*w, 2*h,
BufferedImage.TYPE_INT_RGB);

      Graphics2D bg = bilinear.createGraphics();
      bg.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
      bg.scale(2, 2);
      bg.drawImage(duke, 0, 0, null);
      bg.dispose();

      bg = bicubic.createGraphics();
      bg.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
      bg.scale(2, 2);
      bg.drawImage(duke, 0, 0, null);
      bg.dispose();

      for(int i=0; i<2*w; i++)
 for(int j=0; j<2*h; j++)
   if(bilinear.getRGB(i, j) != bicubic.getRGB(i, j))
     System.out.println("Interpolation algo differ");


                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger

FIXED IN:
tiger

INTEGRATED IN:
tiger
tiger-b16


                                     
2004-06-14
EVALUATION

We currently have a hint for bicubic but no support in the code for it.
jeannette.hung@Eng 2001-06-27

Added AffineTransformOp.TYPE_BICUBIC constant.  We are now honoring the
BICUBIC RenderingHint in our image pipeline as well.
###@###.### 2003-08-06
                                     
2001-06-27



Hardware and Software, Engineered to Work Together