Esempio n. 1
0
        public static Bitmap getDllImage(string imageName)
        {
            Stream stream = new Depot().loadImage(imageName);
            Bitmap bitmap = new Bitmap(stream);

            stream.Close();
            stream.Dispose();
            return(bitmap);
        }
Esempio n. 2
0
        public static Image getDllScaleImage(string imageName, Control v)
        {
            Stream stream = new Depot().loadImage(imageName);

            Console.WriteLine(imageName);
            Console.WriteLine(stream.ToString());
            Image original = Image.FromStream(stream);

            stream.Close();
            stream.Dispose();
            Bitmap bmp    = new Bitmap(original);
            Bitmap bitmap = HuionRender.blowupImage(HuionRender.compressImageWithRate(bmp, v.Width, v.Height),
                                                    DpiHelper.getInstance().XDpi);

            original.Dispose();
            if (bitmap == bmp)
            {
                return((Image)bitmap);
            }
            bmp.Dispose();
            return((Image)bitmap);
        }