I want to copy the frame of a movie that has alpha channel to an ofImage keeping the alpha transparency. My code looks something like this:
ofImage img; ofVideoPlayer movie; // ... img.allocate(w,h, OF_IMAGE_COLOR_ALPHA); movie.load("movieWithAlpha.mov") // ... img.setFromPixels(movie.getPixels()); // ... img.draw(0,0); // has no alpha -- debugger says it's RGB, not RGBA movie.draw(0,0); // has alpha alright and it is transparent
In the log I found these errors:
[ error ] ofImage: getBmpFromPixels(): unable to get FIBITMAP from ofPixels [ error ] ofImage: putBmpIntoPixels(): unable to set ofPixels from FIBITMAP
Any hints on how to make it work?