Example #1
0
        override protected Procedure GetProcedure()
        {
            var inParams = new ParamDefList();

            return(new Procedure("plug_in_photoshop_actions",
                                 "Play Photoshop action files",
                                 "Play Photoshop action files",
                                 "Maurits Rijk",
                                 "(C) Maurits Rijk",
                                 "2006-2018",
                                 "Photoshop Actions...",
                                 "",
                                 inParams)
            {
                MenuPath = "<Toolbox>/Xtns/Extensions",
                IconFile = "PhotoshopActions.png"
            });
        }
Example #2
0
        protected override Procedure GetProcedure()
        {
            var inParams = new ParamDefList();

              return new Procedure("plug_in_photoshop_actions",
               "Play Photoshop action files",
               "Play Photoshop action files",
               "Maurits Rijk",
               "(C) Maurits Rijk",
               "2006-2013",
               "Photoshop Actions...",
               "",
               inParams)
            {
              MenuPath = "<Toolbox>/Xtns/Extensions",
              IconFile = "PhotoshopActions.png"
            };
        }
Example #3
0
        public Procedure(string name, string blurb, string help, 
		     string author, string copyright, 
		     string date, string menuPath, 
		     string imageTypes,
		     ParamDefList inParams = null,
		     ParamDefList outParams = null)
        {
            Name = name;
              _blurb = blurb;
              _help = help;
              _author = author;
              _copyright = copyright;
              _date = date;
              _menuPath = menuPath;
              _imageTypes = imageTypes;
              _inParams = inParams ?? new ParamDefList();
              _outParams = outParams ?? new ParamDefList(false);
        }
Example #4
0
        protected override Procedure GetProcedure()
        {
            var inParams = new ParamDefList() {
              };

              return new Procedure("plug_in_shape_collage",
               _("Generates collage"),
               _("Generates collage"),
               "Maurits Rijk",
               "(C) Maurits Rijk",
               "2004-2011",
               "ShapeCollage...",
               "RGB*, GRAY*",
               inParams)
            {
              MenuPath = "<Toolbox>/Xtns/Extensions",
              IconFile = "ShapeCollage.png"
            };
        }
Example #5
0
        override protected Procedure GetProcedure()
        {
            var inParams = new ParamDefList()
            {
            };

            return(new Procedure("plug_in_shape_collage",
                                 _("Generates collage"),
                                 _("Generates collage"),
                                 "Maurits Rijk",
                                 "(C) Maurits Rijk",
                                 "2004-2011",
                                 "ShapeCollage...",
                                 "RGB*, GRAY*",
                                 inParams)
            {
                MenuPath = "<Toolbox>/Xtns/Extensions",
                IconFile = "ShapeCollage.png"
            });
        }
Example #6
0
        override protected Procedure GetProcedure()
        {
            var inParams = new ParamDefList()
            {
                new ParamDef("points", 12, typeof(int), _("Number of points"))
            };

            return(new Procedure("plug_in_colorize",
                                 _("Re-color images using optimization techniques."),
                                 _("Fix me!"),
                                 "Maurits Rijk",
                                 "(C) Maurits Rijk",
                                 "2006-2011",
                                 "Colorize...",
                                 "RGB*, GRAY*",
                                 inParams)
            {
                MenuPath = "<Image>/Colors",
                IconFile = "Colorize.png"
            });
        }
Example #7
0
        protected Procedure FileLoadProcedure(string name, string blurb, 
            string help, string author,
            string copyright, string date,
            string menu_path)
        {
            var inParams = new ParamDefList(true) {
            new ParamDef("run_mode", typeof(Int32),
             "Interactive, non-interactive"),
            new ParamDef("filename", typeof(FileName),
             "The name of the file to load"),
            new ParamDef("raw_filename", typeof(FileName),
             "The name entered")};

              var outParams = new ParamDefList(true) {
            new ParamDef("image", typeof(Image), "Output image")};

              _loadProcedure = new Procedure(name, blurb, help, author, copyright,
                     date, menu_path, null,
                     inParams, outParams);

              return _loadProcedure;
        }
Example #8
0
        protected Procedure FileSaveProcedure(string name, string blurb, 
            string help, string author,
            string copyright, string date,
            string menu_path,
            string image_types)
        {
            var inParams = new ParamDefList(true) {
            new ParamDef("run_mode", typeof(Int32),
             "Interactive, non-interactive"),
            new ParamDef("image", typeof(Image),
             "Input image"),
            new ParamDef("drawable", typeof(Drawable),
             "Drawable to save"),
            new ParamDef("filename", typeof(FileName),
             "The name of the file to save the image in"),
            new ParamDef("raw_filename", typeof(FileName),
             "The name of the file to save the image in")};

              _saveProcedure = new Procedure(name, blurb, help, author, copyright,
                     date, menu_path, image_types, inParams);

              return _saveProcedure;
        }
Example #9
0
        void SaveFile(ParamDefList inParam, ParamDefList outParam)
        {
            var image = (Image) inParam[1].Value;
              var drawable = (Drawable) inParam[2].Value;
              string filename = (string) inParam[3].Value;

              if (!Save(image, drawable, filename))
            {
              outParam[0].Value = PDBStatusType.ExecutionError;
            }
        }
Example #10
0
        void LoadFile(ParamDefList inParam, ParamDefList outParam)
        {
            Filename = (string) inParam[1].Value;

              if (File.Exists(Filename))
            {
              Reader = new BinaryReader(File.Open(Filename, FileMode.Open));
              var image = Load();
              if (image == null)
            {
              outParam[0].Value = PDBStatusType.ExecutionError;
            }
              else
            {
              outParam.Add(new ParamDef(image, typeof(Image)));
            }
              Reader.Close();
            }
              else
            {
              outParam[0].Value = PDBStatusType.ExecutionError;
            }
        }
Example #11
0
        protected override void Run(string name, ParamDefList inParam,
            out ParamDefList outParam)
        {
            outParam = new ParamDefList(true);
              outParam.Add(new ParamDef(PDBStatusType.Success,
                typeof(PDBStatusType)));

              if (_loadProcedure != null && _loadProcedure.Name == name)
            {
              LoadFile(inParam, outParam);
            }
              else if (_saveProcedure != null && _saveProcedure.Name == name)
            {
              SaveFile(inParam, outParam);
            }
        }
Example #12
0
        protected override Procedure GetProcedure()
        {
            var inParams = new ParamDefList()
            {
              new ParamDef("points", 12, typeof(int), _("Number of points"))
            };

              return new Procedure("plug_in_colorize",
               _("Re-color images using optimization techniques."),
               _("Fix me!"),
               "Maurits Rijk",
               "(C) Maurits Rijk",
               "2006-2011",
               "Colorize...",
               "RGB*, GRAY*",
               inParams)
            {
              MenuPath = "<Image>/Colors",
              IconFile = "Colorize.png"
            };
        }