Skip to content

pylon/Pixel.h#

Contains structs describing pixel layouts.

Namespaces#

Name
Pylon
Contains definitions of pylon types.

Classes#

Name
struct Pylon::SBGRA8Pixel
Describes the memory layout of a BGRA8 pixel. This pixel is used in Windows bitmaps.
struct Pylon::SBGR8Pixel
Describes the memory layout of a BGR8 pixel. This pixel is used in Windows bitmaps.
struct Pylon::SRGB8Pixel
Describes the memory layout of a RGB8 pixel.
struct Pylon::SRGB16Pixel
Describes the memory layout of a RGB16 pixel.
struct Pylon::SYUV422_UYVY
Describes the memory layout of a YUV422_UYVY pixel with information about brightness and chroma for two pixels.
struct Pylon::SYUV422_YUYV
Describes the memory layout of a YUV422_YUYV pixel with information about brightness and chroma for two pixels.

Source code#

//-----------------------------------------------------------------------------
//  Basler pylon SDK
//  Copyright (c) 2011-2022 Basler AG
//  http://www.baslerweb.com
//-----------------------------------------------------------------------------
#ifndef INCLUDED_PIXEL_H_9632837
#define INCLUDED_PIXEL_H_9632837

#include <pylon/Platform.h>

#ifdef _MSC_VER
#   pragma pack(push, PYLON_PACKING)
#endif /* _MSC_VER */

#include <pylon/PylonBase.h>

namespace Pylon
{
#pragma pack(push, 1)

    //-----------------------------------------------------------------------
    //  Structs needed for BGR and RGB formats
    //-----------------------------------------------------------------------

    struct SBGRA8Pixel
    {
        uint8_t B;    
        uint8_t G;    
        uint8_t R;    
        uint8_t A;    
    };

    struct SBGR8Pixel
    {
        uint8_t B;    
        uint8_t G;    
        uint8_t R;    
    };

    struct SRGB8Pixel
    {
        uint8_t R;    
        uint8_t G;    
        uint8_t B;    
    };

    struct SRGB16Pixel
    {
        uint16_t R;    
        uint16_t G;    
        uint16_t B;    
    };

    //-----------------------------------------------------------------------
    //  Structs needed for variants of YUV422 formats
    //-----------------------------------------------------------------------

    struct SYUV422_UYVY //  DCAM Variant
    {
        uint8_t U;  
        uint8_t Y1; 
        uint8_t V;  
        uint8_t Y2; 
        typedef uint8_t value_type;
    };

    struct SYUV422_YUYV //  Microsoft preferred variant
    {
        uint8_t Y1; 
        uint8_t U;  
        uint8_t Y2; 
        uint8_t V;  
        typedef uint8_t value_type;
    };

#pragma pack(pop)

}

#ifdef _MSC_VER
#   pragma pack(pop)
#endif /* _MSC_VER */

#endif /* INCLUDED_PIXEL_H_9632837 */

Updated on 5 July 2022 at 15:30:01