public PropertySuite(System.Windows.Media.Imaging.BitmapSource source, ImageModes imageMode)
#endif

        {
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }

            getPropertyProc = new GetPropertyProc(PropertyGetProc);
            setPropertyProc = new SetPropertyProc(PropertySetProc);
            this.imageMode  = imageMode;
#if GDIPLUS
            documentWidth  = source.Width;
            documentHeight = source.Height;
#else
            documentWidth  = source.PixelWidth;
            documentHeight = source.PixelHeight;
#endif
            imageMetaData    = new ImageMetaData(source);
            hostInfo         = new HostInformation();
            numberOfChannels = 0;
            hostSerial       = "0";
            disposed         = false;
        }
Exemple #2
0
 public unsafe PropertySuite(int documentWidth, int documentHeight, PluginUISettings pluginUISettings)
 {
     getPropertyProc     = new GetPropertyProc(PropertyGetProc);
     setPropertyProc     = new SetPropertyProc(PropertySetProc);
     this.documentWidth  = documentWidth;
     this.documentHeight = documentHeight;
     highDpi             = pluginUISettings?.HighDpi ?? false;
     numberOfChannels    = 0;
 }