public static Bitmap getDllImage(string imageName) { Stream stream = new Depot().loadImage(imageName); Bitmap bitmap = new Bitmap(stream); stream.Close(); stream.Dispose(); return(bitmap); }
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); }