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 }
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 ); }
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 ); }
int main(void) { CreateBmp(4, 4); return 0; }
void ocpnCompass::UpdateStatus( bool bnew ) { if( bnew ) m_lastgpsIconName.Clear(); // force an update to occur CreateBmp( bnew ); }