Menu

#20 RASPICAM_FORMAT_RGB and RASPICAM_FORMAT_BGR swapped

1.0
open
nobody
None
2017-02-05
2016-08-01
No

When running test programs it appears that the formats for RGB and BGR are swapped from what the should be. The offending code is in the Private_Impl::convertFormat (method).

        switch ( fmt ) {
        case RASPICAM_FORMAT_RGB:
            return MMAL_ENCODING_BGR24;
        case RASPICAM_FORMAT_BGR:
            return MMAL_ENCODING_RGB24;
        case RASPICAM_FORMAT_GRAY:
            return MMAL_ENCODING_I420;

Note above how RGB format sets ENCODING_BGR24 and visa-versa. I think as some point the MMAL definitions for this were broken but with the current libraspberrypi library these should be swapped. I am using libraspberrypi-1.20160620-1

Discussion

  • Rafael Munoz-Salinas

    fixed in version 0.1.4

     

Log in to post a comment.