Hi,

I created an application to load images. To support many formats i used ImageMagick. I wrote the following code to read images

Qt Code:
  1. void OpenImage(QString path)
  2. {
  3. magickImage.read(path.toStdString());
  4. magickImage.write(&blob);
  5.  
  6. cimgData=((const uchar*)(blob.data()));
  7.  
  8. if(pxmap.loadFromData(cimgData,blob.length())==false)
  9. QMessageBox::information(this,"ImageView","Failed to LoadFromData");
  10.  
  11. update();
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. void WImageView::paintEvent(QPaintEvent *event)
  2. {
  3.  
  4. QPainter p(this);
  5.  
  6. p.drawPixmap(0,0,pxmap.width(),pxmap.height(),pxmap);
  7. }
To copy to clipboard, switch view to plain text mode 

The above code is working for TIF, JPEG, PNG etc. but not working for DPX, CIN, TGA, jp2 (Motion JPG).

For these images "loadFromData" returns false.

Can you please help me how to convert the dpx data to QPixmap?

Thanks in advance
anki.n