示例#1
0
 PtrProcedure GetLSRestoreFunc (EriType fdwFormatType, int dwBitsPerPixel)
 {
     switch (dwBitsPerPixel)
     {
     case 32:
         if (EriType.RGBA == fdwFormatType)
         {
             Format = PixelFormats.Bgra32;
             if (null == m_src_frame)
                 return LossyRestoreRGBA32;
             else
                 return LossyRestoreDeltaRGBA32;
         }
         Format = PixelFormats.Bgr32;
         if (null == m_src_frame)
             return LossyRestoreRGB24;
         else
             return LossyRestoreDeltaRGB24;
     case 24:
         Format = PixelFormats.Bgr24;
         if (null == m_src_frame)
             return LossyRestoreRGB24;
         else
             return LossyRestoreDeltaRGB24;
     case    8:
         Format = PixelFormats.Gray8;
         if (null == m_src_frame)
             return LossyRestoreGray8;
         else
             return LossyRestoreDeltaGray8;
     }
     return null;
 }
示例#2
0
 PtrProcedure GetLLRestoreFunc (EriType fdwFormatType, int dwBitsPerPixel)
 {
     switch (dwBitsPerPixel)
     {
     case 32:
         if (EriType.RGBA == fdwFormatType)
         {
             Format = PixelFormats.Bgra32;
             if (null == m_src_frame)
                 return RestoreRGBA32;
             else
                 return RestoreDeltaRGBA32;
         }
         Format = PixelFormats.Bgr32;
         if (null == m_src_frame)
             return RestoreRGB24;
         else
             return RestoreDeltaRGB24;
     case 24:
         Format = PixelFormats.Bgr24;
         if (null == m_src_frame)
             return RestoreRGB24;
         else
             return RestoreDeltaRGB24;
     case 16:
         Format = PixelFormats.Bgr555;
         return RestoreRGB16;
     case 8:
         if (null == Palette)
             Format = PixelFormats.Gray8;
         else
             Format = PixelFormats.Indexed8;
         return RestoreGray8;
     }
     return null;
 }