private static System.Drawing.Imaging.PixelFormat GetPixFormat(JBitmapPixelFormat format) {
switch (format){
case JBitmapPixelFormat.Format8bpp:
return System.Drawing.Imaging.PixelFormat.Format8bppIndexed;
case JBitmapPixelFormat.Format24bppBGR:
return System.Drawing.Imaging.PixelFormat.Format24bppRgb;
case JBitmapPixelFormat.Format32bppBGRA:
return System.Drawing.Imaging.PixelFormat.Format32bppArgb;
default:
return System.Drawing.Imaging.PixelFormat.Format8bppIndexed;
}
}