title: itext image field in fillable form
body: <p>in itext 2 the below code worked well, in itext 5 it fail.
  does anyone have a sample of how to add an image to an image field on a PDF?</p>
  
  <p>This is my code...</p>
  
  <pre><code>public static void atsSetFieldImage(AcroFields form, PdfStamper stamper, String fieldName, Image img) 
  {
      try 
      {
          float[] photograph = form.getFieldPositions(fieldName);
          Rectangle rect = new Rectangle(photograph[1]
                             , photograph[2]
                             , photograph[3]
                             , photograph[4]);
  
          //Image img = Image.getInstance(imageName);
                image1.scaleToFit(rect.getWidth(), rect.getHeight());
                image1.setAbsolutePosition(
                                      photograph[1] + (rect.getWidth() - image1.getScaledWidth()) / 2
                                    , photograph[2] + (rect.getHeight() - image1.getScaledHeight()) / 2);
  
          PdfContentByte cb = stamper.getOverContent((int)photograph[0]);
                         cb.addImage(image1);
  
      }
      catch(Exception e) 
      {
          //e.printStackTrace();
      }
  } 
  </code></pre>