double size = 3.0;//size of BufferedImage object
BufferedImage bufImg = (BufferedImage)
                  this.createImage((int)(size*ds),
                                           (int)(size*ds));

Figure 2