title: Using an existing image with dynamicreports
body: <p>I am exporting an existing image to DynamicReports:</p>
  
  <pre><code>public class DReportSample {
  
      public DReportSample() {
          build();
      }
  
      private void build() {  
              StyleBuilder boldStyle         = stl.style().bold();
              StyleBuilder boldCenteredStyle = stl.style(boldStyle).setHorizontalAlignment
                      (HorizontalAlignment.CENTER);
              //BufferedImage img = new BufferedImage(1200,1200,BufferedImage.TYPE_INT_RGB);
             BufferedImage img = null;
  try {
     // img = ImageIO.read(new File("D:/Hysteresis.png"));
      img = ImageIO.read(new File("D:/Hysteresis.png"));
  } catch (IOException e) {
  }
          try {
              report()//create new report design
                           // .setColumnTitleStyle(boldStyle)
                           // .setColumnStyle(boldStyle)
                            .highlightDetailEvenRows()
                .columns(//add columns
  
                  col.column(null,"Col_1",      type.stringType()),
                  col.column(null,"Col_2",  type.stringType())
                                  )
                             .summary(
          cmp.verticalList()
              .add(cmp.text("\n\nHYSTERISIS PLOT").setStyle(boldStyle))
  
              .add(cmp.image(img))  // Add the exported chart image to the report.
  
      )
                .title(cmp.text("XYZ Hospital").setStyle(boldCenteredStyle))//shows report title
                .pageFooter(cmp.pageXofY())//shows number of page at page footer
                .setDataSource(createDataSource())//set datasource
                .show();//create and show report
          } catch (DRException e) {
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>But the problem is the image appears to be fixed size say (300,300) pixels. I want it to appear as bigger size,</p>
  
  <p>I tried to resize my image to its double size manually, and then using above code but it again appeared of same size(300,300)</p>
  
  <p>Then I tried to use resized version through my code and tried:</p>
  
  <pre><code>BufferedImage img = new BufferedImage(1200,1200,BufferedImage.TYPE_INT_RGB);
  </code></pre>
  
  <p>but it did not work:</p>
  
  <p>Then I tried:</p>
  
  <pre><code>.add(cmp.image(img.getScaledInstance(600, 600, 5)))  
  </code></pre>
  
  <p>it made the image appear even smaller.</p>
  
  <p>Can some one please let me know how do I import the image in my dynamicreports file with my desired dimension. Also please guide, how do i Change font style,color and size of my text.</p>
  
  <p>Thanks</p>