Example #1
0
        public static PyImage CreateImage(int width, int height, ImageType type)
        {
            string size = width.ToString() + "," + height.ToString();
            string id   = "";

            switch (type)
            {
            case ImageType.RGBA:
                id = Base.ExecuteMethod("create_image", "RGBA," + size);
                break;

            case ImageType.BGRA:
                id = Base.ExecuteMethod("create_image", "BGRA," + size);
                break;

            case ImageType.PRGBA:
                id = Base.ExecuteMethod("create_image", "PRGBA," + size);
                break;
            }
            return(new PyImage(id, type));
        }
Example #2
0
        public static Tmo CreateTmo()
        {
            string id = Base.ExecuteMethod("create_tmo", "");

            return(new Tmo(id));
        }
Example #3
0
        public static PyImage LoadHdrImage(string filename)
        {
            string id = Base.ExecuteMethod("load_hdr_image", filename);

            return(new PyImage(id, ImageType.PRGBA));
        }
Example #4
0
        public PyBGRAImage convert_to_bgra()
        {
            string id = Base.ExecuteMethod("convert_to_bgra", this.ID);

            return(new PyBGRAImage(id));
        }