internal static GFL_ERROR gflChangeColorDepth(IntPtr src, GFL_MODE mode, GFL_MODE_PARAM param) { var nullPtr = IntPtr.Zero ; return gflChangeColorDepth(src, nullPtr, mode, param); }
internal static extern GFL_ERROR gflChangeColorDepth(IntPtr src, IntPtr dst, GFL_MODE mode, GFL_MODE_PARAM param);
public void Save(string filePath, string format,GFL_MODE colorDepthMode) { ChangeColorDepth(colorDepthMode); Save(filePath, format); }
public void ChangeColorDepth(GFL_MODE colorDepthMode) { var err = GflAPI.gflChangeColorDepth(m_gfl_bitmap, colorDepthMode, GFL_MODE_PARAM.GFL_MODE_FLOYD_STEINBERG); if (err != GFL_ERROR.GFL_NO_ERROR) throw new APIException(err.ToString()); RefreshStruct(); }
public GflImage GetCopy(GFL_MODE depthMode, GFL_BITMAP_TYPE type) { var img = new GflImage(m_gfl_bitmap_struct.Width, m_gfl_bitmap_struct.Height, 1, type); GflAPI.gflChangeColorDepth(m_gfl_bitmap, img.m_gfl_bitmap, depthMode, GFL_MODE_PARAM.GFL_MODE_ADAPTIVE); img.RefreshStruct(); return img; }