예제 #1
0
 public static extern IntPtr CreateIconFromResourceEx(
     IntPtr presbits,
     int dwResSize,
     [MarshalAs(UnmanagedType.Bool)] bool fIcon,
     IconCursorVersion dwVer,
     int cxDesired,
     int cyDesired,
     LoadImageFlags Flags);
예제 #2
0
 internal static extern IntPtr LoadImage(
     [In] IntPtr hinst,
     [In] IntPtr lpszName,
     [In] ImageType uType,
     [In] Int32 cxDesired,
     [In] Int32 cyDesired,
     [In] LoadImageFlags fuLoad
     );
예제 #3
0
        /// <summary>
        /// Loads an image from a file as a <see cref="Mat"/>.
        /// </summary>
        /// <param name="fileName">Name of file to be loaded.</param>
        /// <param name="colorType">Specific color type of the loaded image.</param>
        /// <returns>The newly loaded image.</returns>
        public static Mat LoadImageM(string fileName, LoadImageFlags colorType)
        {
            if (fileName == null)
            {
                throw new ArgumentNullException("fileName");
            }

            var pMat = NativeMethods.cvLoadImageM(fileName, colorType);

            return(pMat == IntPtr.Zero ? null : new Mat(pMat, true));
        }
예제 #4
0
        /// <summary>
        /// Loads an image from a file as an <see cref="IplImage"/>.
        /// </summary>
        /// <param name="fileName">Name of file to be loaded.</param>
        /// <param name="colorType">Specific color type of the loaded image.</param>
        /// <returns>The newly loaded image.</returns>
        public static IplImage LoadImage(string fileName, LoadImageFlags colorType)
        {
            if (fileName == null)
            {
                throw new ArgumentNullException("fileName");
            }

            var pImage = NativeMethods.cvLoadImage(fileName, colorType);

            return(pImage == IntPtr.Zero ? null : new IplImage(pImage, true));
        }
예제 #5
0
 public static extern IntPtr LoadImage(IntPtr moduleHandle, IntPtr name, LoadImageType type, Int32 desiredWidth, Int32 desiredHeight, LoadImageFlags flags);
예제 #6
0
 public static extern int LookupIconIdFromDirectoryEx(
     IntPtr presbits,
     [MarshalAs(UnmanagedType.Bool)] bool fIcon,
     int cxDesired,
     int cyDesired,
     LoadImageFlags Flags);
예제 #7
0
파일: Win32.cs 프로젝트: zodiacon/PEParser
 public static extern IntPtr LoadImage(IntPtr hModule, string name, ImageType type, int width, int height, LoadImageFlags flags);
예제 #8
0
 static extern IntPtr LoadImage(IntPtr hinst, String lpszName, ImageType uType, Int32 cxDesired, Int32 cyDesired, LoadImageFlags fuLoad);
예제 #9
0
 internal static extern IntPtr cvDecodeImageM(Mat buf, LoadImageFlags iscolor);
예제 #10
0
 internal static extern IntPtr cvLoadImageM(string filename, LoadImageFlags iscolor);
예제 #11
0
        /// <summary>
        /// Reads an image from a buffer in memory as a <see cref="Mat"/>.
        /// </summary>
        /// <param name="buf">Input array of bytes.</param>
        /// <param name="colorType">Specific color type of the loaded image.</param>
        /// <returns>The newly loaded image.</returns>
        public static Mat DecodeImageM(Mat buf, LoadImageFlags colorType)
        {
            var pMat = NativeMethods.cvDecodeImageM(buf, colorType);

            return(pMat == IntPtr.Zero ? null : new Mat(pMat, true));
        }
예제 #12
0
        /// <summary>
        /// Reads an image from a buffer in memory as an <see cref="IplImage"/>.
        /// </summary>
        /// <param name="buf">Input array of bytes.</param>
        /// <param name="colorType">Specific color type of the loaded image.</param>
        /// <returns>The newly loaded image.</returns>
        public static IplImage DecodeImage(Mat buf, LoadImageFlags colorType)
        {
            var pImage = NativeMethods.cvDecodeImage(buf, colorType);

            return(pImage == IntPtr.Zero ? null : new IplImage(pImage, true));
        }