suicao / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

add support for 32bpp RGB to motion processing #311

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Describe the fix or new feature which you would like to contribute to the
project ...

modify:

if ( ( videoFrame.PixelFormat != PixelFormat.Format8bppIndexed ) &&
                 ( videoFrame.PixelFormat != PixelFormat.Format24bppRgb ) &&
                 ( videoFrame.PixelFormat != PixelFormat.Format32bppArgb ) )
            {
                throw new UnsupportedImageFormatException( "Video frame must be 8 bpp grayscale image or 24/32 bpp color image." );
            } 

to:

switch (videoFrame.PixelFormat)
            {
                case PixelFormat.Format8bppIndexed:
                case PixelFormat.Format24bppRgb:
                case PixelFormat.Format32bppArgb:
                case PixelFormat.Format32bppRgb:
                    break;
                default:
                    throw new UnsupportedImageFormatException( "Video frame must be 8 bpp grayscale image or 24/32 bpp color image." );
                    break;
            }

in the motion processing class files in the vision project

Original issue reported on code.google.com by ad...@activeunlimited.com on 27 Jul 2012 at 7:30

GoogleCodeExporter commented 9 years ago
Added 32 bpp RGB pixel format to the list of supported formats for motion 
processing classes.

Original comment by andrew.k...@gmail.com on 27 Jul 2012 at 8:03

GoogleCodeExporter commented 9 years ago

Original comment by andrew.k...@gmail.com on 16 Jul 2013 at 9:53