コード例 #1
0
ファイル: yuv2jpeg.c プロジェクト: qioixiy/notes
static void imageProcess(const void* p, int width, int height)
{
    unsigned char* src = (unsigned char*)p;

#if 0
    unsigned char *dst = NV12ToRGB(src, width, height);
	unsigned char *rgb_buf = malloc(width * height * 3);

	NV12ToRGB(src, width, height);
	
    jpegWrite(dst, width, height);
#else
	unsigned char *yuv_src[3];
	yuv_src[0] = src;
	yuv_src[2] = src+width*height;
	yuv_src[1] = src+width*height + width*height/4;
	unsigned char *rgb_buf = malloc(width * height * 3);

	yuv_to_rgb(yuv_src, 0, width, height, rgb_buf);
	
    jpegWrite(rgb_buf, width, height);
    BOOL CreateBmp(const char *filename, uint8_t *pRGBBuffer, int width, int height, int bpp);
    CreateBmp("out.bmp", rgb_buf, width, height, 24);

#endif
}
コード例 #2
0
void ocpnFloatingCompassWindow::UpdateStatus( bool bnew )
{
    if( bnew ) m_lastgpsIconName.Clear();        // force an update to occur

    wxBitmap statbmp = CreateBmp();
    if( statbmp.IsOk() ) m_StatBmp = statbmp;

    Show();
    Refresh( false );
}
コード例 #3
0
ファイル: compass.cpp プロジェクト: buya07/KomodoExercise
void ocpnCompass::UpdateStatus( bool bnew )
{
    if( bnew ){
        m_lastgpsIconName.Clear();        // force an update to occur
        
        //  We clear the texture so that any onPaint method will not use a stale texture
#ifdef ocpnUSE_GLES  
        if(g_bopengl){
             if(texobj){
                glDeleteTextures(1, &texobj);
                texobj = 0;
             }
        }
#endif
    }
                

    CreateBmp( bnew );
}
コード例 #4
0
ファイル: main.cpp プロジェクト: chengguixing/iArt
int main(void)
{
	CreateBmp(4, 4);

	return 0;
}
コード例 #5
0
ファイル: compass.cpp プロジェクト: shtouff/OpenCPN
void ocpnCompass::UpdateStatus( bool bnew )
{
    if( bnew ) m_lastgpsIconName.Clear();        // force an update to occur

    CreateBmp( bnew );
}