[Qt-interest] Quicktime C -> QImage

Alexander Carôt alexander_carot at gmx.net
Mon Apr 19 00:52:55 CEST 2010


Hi all,

I am using Quicktime video images, which I finally want to display on a QImage. However, I have a problem to actually map the Quicktime image correctly. First I create the image as follows:

*************
image = CGImageCreate( width, height, 8, 32, rowBytes, colorspace, 
                                                   kCGImageAlphaNoneSkipFirst, provider, NULL, true, kCGRenderingIntentDefault );
************


and then I thought about using the QImage::setPixel(...) in this way:


************
    unsigned int *pixels = (unsigned int *) image;
    int i = 0;
    for (int y = 0; y < 240; y++){
      for (int x = 0; x < 320; x++){
        displayImage->setPixel(x,y,pixels[i]);
        i++;
      }   
    }   
**************

This, however, just produces garbage on the screen. Is anyone experienced with this an can point me to my actual problem ?

Thanks a lot in advance

-- A l e x





More information about the Qt-interest-old mailing list