コード例 #1
0
        public static Bitmap2 GetImage(string file)
        {
            Assembly thisExe = Assembly.GetExecutingAssembly();
            Stream   file1   = thisExe.GetManifestResourceStream("PerseusPluginLib.img." + file);

            if (file1 == null)
            {
                return(null);
            }
            Bitmap2 bm = Image2.ReadImage(file1);

            file1.Close();
            return(bm);
        }
コード例 #2
0
ファイル: Utils.cs プロジェクト: hwchoi912/Perseus-PluginPECA
        //from perseus-plugins/PerseusPluginLib/Utils/PerseusPluginUtils.cs
        public static Bitmap2 GetImage(string file)
        {
            //remember to change the image files Build Action to Embedded Resource
            Assembly thisExe = Assembly.GetExecutingAssembly();
            //path is default namespace + folder, where each is separated by '.'
            Stream file1 = thisExe.GetManifestResourceStream("PluginPECA.Resources." + file);

            if (file1 == null)
            {
                return(null);
            }
            Bitmap2 bm = Image2.ReadImage(file1);

            file1.Close();
            return(bm);
        }