return HeapFree(GetProcessHeap(), 0, mem);
}
-static inline int get_stride(int width, int depth)
-{
- return ((depth * width + 31) >> 3) & ~3;
-}
/* ------------------------------------------------------------------------ */
static unsigned char *in_buffer, uiclip[1024], *uiclp = NULL;
break;
}
- frm_stride = get_stride(out_width, bpp * 8);
+ frm_stride = out_width * bpp;
frm_ptr = output;
if(frame.length != size)
if( out )
{
memcpy( out, in, size );
- out->bmiHeader.biBitCount = 24;
out->bmiHeader.biCompression = BI_RGB;
- out->bmiHeader.biSizeImage = get_stride(in->bmiHeader.biWidth, 24) * in->bmiHeader.biHeight;
+ out->bmiHeader.biSizeImage = in->bmiHeader.biHeight
+ * in->bmiHeader.biWidth *4;
return ICERR_OK;
}
return size;