//グラディエント(一次微分)エッジ検出 public static Bitmap Gradient(Bitmap bmp, COLORMODE cmode) { float[,] ope1 = new float[3, 3] { { -1, 0, 1 }, { -1, 0, 1 }, { -1, 0, 1 } }; float[,] ope2 = new float[3, 3] { { -1, -1, -1 }, { 0, 0, 0 }, { 1, 1, 1 } }; switch (cmode) { case COLORMODE.BRIGHTNESS: return(_filtering(bmp, ope1, ope2)); case COLORMODE.RGB: return(_filteringRGB(bmp, ope1, ope2)); case COLORMODE.HSV: return(_filteringHSV(bmp, ope1, ope2)); default: throw new Exception(); } }
public MultipassBitmap AddLayer(MultipassBitmap insertafter, COLORMODE colormode, bool hidden) { global::System.IntPtr cPtr = C4dApiPINVOKE.MultipassBitmap_AddLayer__SWIG_0(swigCPtr, MultipassBitmap.getCPtr(insertafter), (int)colormode, hidden); MultipassBitmap ret = (cPtr == global::System.IntPtr.Zero) ? null : new MultipassBitmap(cPtr, false); return(ret); }
public static MultipassBitmap Alloc(int bx, int by, COLORMODE mode) { global::System.IntPtr cPtr = C4dApiPINVOKE.MultipassBitmap_Alloc(bx, by, (int)mode); MultipassBitmap ret = (cPtr == global::System.IntPtr.Zero) ? null : new MultipassBitmap(cPtr, false); return(ret); }
//ラプラシアン(二次微分)エッジ検出 public static Bitmap Laplacian(Bitmap bmp, COLORMODE cmode) { float[,] ope = new float[3, 3] { { 1, 1, 1 }, { 1, -8, 1 }, { 1, 1, 1 } }; switch (cmode) { case COLORMODE.BRIGHTNESS: return(_filtering(bmp, ope)); case COLORMODE.RGB: return(_filteringRGB(bmp, ope)); case COLORMODE.HSV: return(_filteringHSV(bmp, ope)); default: throw new Exception(); } }
public static MultipassBitmap Alloc(int bx, int by, COLORMODE mode) { IntPtr cPtr = C4dApiPINVOKE.MultipassBitmap_Alloc(bx, by, (int)mode); MultipassBitmap ret = (cPtr == IntPtr.Zero) ? null : new MultipassBitmap(cPtr, false); return ret; }
public COLORMODE GetColorMode() { COLORMODE ret = (COLORMODE)C4dApiPINVOKE.BaseBitmap_GetColorMode(swigCPtr); return(ret); }
public void GetPixelCnt(int x, int y, int cnt, SWIGTYPE_p_UChar buffer, int inc, COLORMODE dstmode, PIXELCNT flags) { C4dApiPINVOKE.BaseBitmap_GetPixelCnt__SWIG_1(swigCPtr, x, y, cnt, SWIGTYPE_p_UChar.getCPtr(buffer), inc, (int)dstmode, (int)flags); }
public void GetPixelCnt(int x, int y, int cnt, SWIGTYPE_p_UChar buffer, int inc, COLORMODE dstmode, PIXELCNT flags, ColorProfileConvert conversion) { C4dApiPINVOKE.BaseBitmap_GetPixelCnt__SWIG_0(swigCPtr, x, y, cnt, SWIGTYPE_p_UChar.getCPtr(buffer), inc, (int)dstmode, (int)flags, ColorProfileConvert.getCPtr(conversion)); }
public bool CheckColorMode(COLORMODE colormode) { bool ret = C4dApiPINVOKE.ColorProfile_CheckColorMode(swigCPtr, (int)colormode); return ret; }
public bool PrepareTransform(COLORMODE srccolormode, ColorProfile srcprofile, COLORMODE dstcolormode, ColorProfile dstprofile, bool bgr) { bool ret = C4dApiPINVOKE.ColorProfileConvert_PrepareTransform(swigCPtr, (int)srccolormode, ColorProfile.getCPtr(srcprofile), (int)dstcolormode, ColorProfile.getCPtr(dstprofile), bgr); return ret; }
public void SetColorMode(COLORMODE mode) { C4dApiPINVOKE.MultipassBitmap_SetColorMode(swigCPtr, (int)mode); }
public void GetPixelCnt(int x, int y, int cnt, SWIGTYPE_p_UCHAR buffer, int inc, COLORMODE dstmode, PIXELCNT flags) { C4dApiPINVOKE.BaseBitmap_GetPixelCnt__SWIG_1(swigCPtr, x, y, cnt, SWIGTYPE_p_UCHAR.getCPtr(buffer), inc, (int)dstmode, (int)flags); }
public void GetPixelCnt(int x, int y, int cnt, SWIGTYPE_p_UCHAR buffer, int inc, COLORMODE dstmode, PIXELCNT flags, ColorProfileConvert conversion) { C4dApiPINVOKE.BaseBitmap_GetPixelCnt__SWIG_0(swigCPtr, x, y, cnt, SWIGTYPE_p_UCHAR.getCPtr(buffer), inc, (int)dstmode, (int)flags, ColorProfileConvert.getCPtr(conversion)); }
public bool SetPixelCnt(int x, int y, int cnt, SWIGTYPE_p_UCHAR buffer, int inc, COLORMODE srcmode, PIXELCNT flags) { bool ret = C4dApiPINVOKE.BaseBitmap_SetPixelCnt(swigCPtr, x, y, cnt, SWIGTYPE_p_UCHAR.getCPtr(buffer), inc, (int)srcmode, (int)flags); return ret; }
public MultipassBitmap AddLayer(MultipassBitmap insertafter, COLORMODE colormode) { IntPtr cPtr = C4dApiPINVOKE.MultipassBitmap_AddLayer__SWIG_1(swigCPtr, MultipassBitmap.getCPtr(insertafter), (int)colormode); MultipassBitmap ret = (cPtr == IntPtr.Zero) ? null : new MultipassBitmap(cPtr, false); return ret; }
public bool SetPixelCnt(int x, int y, int cnt, SWIGTYPE_p_UChar buffer, int inc, COLORMODE srcmode, PIXELCNT flags) { bool ret = C4dApiPINVOKE.BaseBitmap_SetPixelCnt(swigCPtr, x, y, cnt, SWIGTYPE_p_UChar.getCPtr(buffer), inc, (int)srcmode, (int)flags); return(ret); }
public bool CheckColorMode(COLORMODE colormode) { bool ret = C4dApiPINVOKE.ColorProfile_CheckColorMode(swigCPtr, (int)colormode); return(ret); }
public bool PrepareTransform(COLORMODE srccolormode, ColorProfile srcprofile, COLORMODE dstcolormode, ColorProfile dstprofile, bool bgr) { bool ret = C4dApiPINVOKE.ColorProfileConvert_PrepareTransform(swigCPtr, (int)srccolormode, ColorProfile.getCPtr(srcprofile), (int)dstcolormode, ColorProfile.getCPtr(dstprofile), bgr); return(ret); }