title: javacv image with transparent background
body: <p>I have a PNG image with transparent background that is to be added to another image.</p>
  
  <p>My problem is that when I am loading the <code>IplImage</code> the background is not transparent anymore - it turns white.</p>
  
  <p>How do I use image with transparent background in javacv?</p>
  
  <pre><code>IplImage src = cvLoadImage("2.png");
  IplImage tmp = cvLoadImage("1.png");
  cvSetImageROI(src, cvRect(41,28,tmp.width(),tmp.height())); // not the same size 
  cvShowImage("1", src);  //before
  cvCopy(src, tmp);
  cvShowImage("2", src); //after
  cvWaitKey(0);
  cvResetImageROI(src);
  </code></pre>
  
  <p>tryed to add alpha channl but didnt work:</p>
  
  <pre><code>Graphics g=src.getBufferedImage().getGraphics();
          Graphics2D g2d = (Graphics2D)g;
          g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,
                                                      10 * 0.1f));
          BufferedImage a = new BufferedImage(tmp.width(), tmp.height(), BufferedImage.TYPE_INT_ARGB);
  
          src = IplImage.createFrom(a);
  </code></pre>