Exemple #1
0
        internal static void GmicImageListAdd(SafeGmicImageList list,
                                              uint width,
                                              uint height,
                                              GmicPixelFormat format,
                                              string name,
                                              out GmicImageListPixelData pixelData,
                                              out NativeImageFormat nativeImageFormat)
        {
            ValidateGmicImageList(list);

            pixelData         = new GmicImageListPixelData();
            nativeImageFormat = ConvertToNativeImageFormat(format);

            GmicStatus status = GmicNativeMethods.Instance.GmicImageListAdd(list,
                                                                            width,
                                                                            height,
                                                                            nativeImageFormat,
                                                                            string.IsNullOrWhiteSpace(name) ? null : name,
                                                                            pixelData);

            if (status != GmicStatus.Ok)
            {
                HandleError(status);
            }
        }
 internal GmicStatus GmicImageListAdd(SafeGmicImageList list,
                                      uint width,
                                      uint height,
                                      NativeImageFormat format,
                                      string name,
                                      GmicImageListPixelData pixelData)
 {
     return(gmicImageListAdd(list, width, height, format, name, pixelData));
 }
Exemple #3
0
        private static void ValidateGmicImageList(SafeGmicImageList list)
        {
            if (list is null)
            {
                ExceptionUtil.ThrowArgumentNullException(nameof(list));
            }

            if (list.IsClosed || list.IsInvalid)
            {
                ExceptionUtil.ThrowArgumentException($"The { nameof(SafeGmicImageList) } handle is closed or invalid.");
            }
        }
Exemple #4
0
        internal static void GmicImageListGetImageData(SafeGmicImageList list, uint index, out GmicImageListImageData data)
        {
            ValidateGmicImageList(list);

            data = new GmicImageListImageData();

            GmicStatus status = GmicNativeMethods.Instance.GmicImageListGetImageData(list, index, data);

            if (status != GmicStatus.Ok)
            {
                HandleError(status);
            }
        }
Exemple #5
0
        internal static void RunGmic(SafeGmicImageList list, GmicOptions options)
        {
            if (options is null)
            {
                ExceptionUtil.ThrowArgumentNullException(nameof(options));
            }

            ValidateGmicImageList(list);

            GmicErrorInfo errorInfo = new GmicErrorInfo();

            GmicStatus status = GmicNativeMethods.Instance.RunGmic(list, options, errorInfo);

            if (status != GmicStatus.Ok)
            {
                HandleError(status, errorInfo);
            }
        }
 internal GmicStatus RunGmic(SafeGmicImageList list,
                             GmicOptions options,
                             GmicErrorInfo errorInfo)
 {
     return(runGmic(list, options, errorInfo));
 }
 internal GmicStatus GmicImageListGetImageData(SafeGmicImageList list,
                                               uint index,
                                               GmicImageListImageData info)
 {
     return(gmicImageListGetImageData(list, index, info));
 }
 internal uint GmicImageListGetCount(SafeGmicImageList list)
 {
     return(gmicImageListGetCount(list));
 }
 internal void GmicImageListClear(SafeGmicImageList list)
 {
     gmicImageListClear(list);
 }
Exemple #10
0
        internal static uint GmicImageListGetCount(SafeGmicImageList list)
        {
            ValidateGmicImageList(list);

            return(GmicNativeMethods.Instance.GmicImageListGetCount(list));
        }
Exemple #11
0
        internal static void GmicImageListClear(SafeGmicImageList list)
        {
            ValidateGmicImageList(list);

            GmicNativeMethods.Instance.GmicImageListClear(list);
        }