Ejemplo n.º 1
0
 public static extern IntPtr CreateIconFromResourceEx(
     IntPtr presbits,
     int dwResSize,
     [MarshalAs(UnmanagedType.Bool)] bool fIcon,
     IconCursorVersion dwVer,
     int cxDesired,
     int cyDesired,
     LoadImageFlags Flags);
Ejemplo n.º 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
     );
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 5
0
 public static extern IntPtr LoadImage(IntPtr moduleHandle, IntPtr name, LoadImageType type, Int32 desiredWidth, Int32 desiredHeight, LoadImageFlags flags);
Ejemplo n.º 6
0
 public static extern int LookupIconIdFromDirectoryEx(
     IntPtr presbits,
     [MarshalAs(UnmanagedType.Bool)] bool fIcon,
     int cxDesired,
     int cyDesired,
     LoadImageFlags Flags);
Ejemplo n.º 7
0
 public static extern IntPtr LoadImage(IntPtr hModule, string name, ImageType type, int width, int height, LoadImageFlags flags);
Ejemplo n.º 8
0
 static extern IntPtr LoadImage(IntPtr hinst, String lpszName, ImageType uType, Int32 cxDesired, Int32 cyDesired, LoadImageFlags fuLoad);
Ejemplo n.º 9
0
 internal static extern IntPtr cvDecodeImageM(Mat buf, LoadImageFlags iscolor);
Ejemplo n.º 10
0
 internal static extern IntPtr cvLoadImageM(string filename, LoadImageFlags iscolor);
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }