title: Jasper + ireport + dynamic Image Creation
body: <p>i´m trying to generate a picture.<BR>
  It should contain a base Picture (JPG, PNG,...) which is loaded from a mysql BLOB field<BR>
  On this picture i would like to draw some circles at x/y ...<BR>
  In the first step i had used the example from Ireports UltimateGuide, which describes SVG Rendering via JRAbstractSvgRenderer interface like this:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class drawpicture extends JRAbstractSvgRenderer {
  
      String drawstring = "something";
  
      public void render(Graphics2D g2d, Rectangle2D rect) throws JRException {
          System.out.println("render");
          AffineTransform savedTrans = g2d.getTransform();
          Font savedFont = g2d.getFont();
          // Paint a nice background...
          g2d.setPaint(new GradientPaint(0, 0, Color.ORANGE,
                  0, (int) rect.getHeight(), Color.PINK));
          g2d.fillRect(0, 0, (int) rect.getWidth(), (int) rect.getHeight());
          Font myfont = new Font("Arial Black", Font.PLAIN, 50);
          g2d.setFont(myfont);
          FontRenderContext frc = g2d.getFontRenderContext();
          String text = drawstring;
          TextLayout textLayout = new TextLayout(text, myfont, frc);
          Shape outline = textLayout.getOutline(null);
          Rectangle r = outline.getBounds();
          // Translate the graphic to center the text
          g2d.translate(
                  (rect.getWidth() / 2) - (r.width / 2),
                  rect.getHeight() / 2 + (r.height / 2));
          g2d.setColor(Color.BLACK);
          g2d.draw(outline);
          // Restore the Graphics2D affine transform
          g2d.setFont(savedFont);
          g2d.setTransform(savedTrans);
      }
  }
  </code></pre>
  
  <p>That works works fine, so that i can draw a Image via Java Interface and show it in Ireports Image field.
  I can also show the BLOB field in an ireport Textfield.</p>
  
  <p>But i can not load Blob field, draw something in it and show it in the Image Field.</p>
  
  <p>Did have someone an idea ?</p>
  
  <p>Thank you and Best regards
  Christian</p>
  
  <p>P.S.: I´m using Ireport 4.1.3 with netBeans 7.0.1</p>