static public Pixbuf LoadAtMaxSize(string path, int max_width, int max_height) { #if true PixbufUtils.AspectLoader loader = new AspectLoader(max_width, max_height); return(loader.LoadFromFile(path)); #else int width, height; JpegUtils.GetSize(path, out width, out height); PixbufUtils.Fit(width, height, max_width, max_height, false, out width, out height); Gdk.Pixbuf image = JpegUtils.LoadScaled(path, width, height); return(image); #endif }
public void Get_Generic_Type_Of_a_Generic_List() { // Arrange var aspectLoader = new AspectLoader(); var type = aspectLoader.GetType(); var methodInfo = type.GetMethods().First(); // Act var returnType = methodInfo.ReturnType; var returnParameter = methodInfo.ReturnParameter; // Assert Assert.IsNotNull(returnType); Assert.IsNotNull(returnParameter); }
static public Pixbuf LoadAtMaxSize (string path, int max_width, int max_height) { #if true PixbufUtils.AspectLoader loader = new AspectLoader (max_width, max_height); return loader.LoadFromFile (path); #else int width, height; JpegUtils.GetSize (path, out width, out height); PixbufUtils.Fit (width, height, max_width, max_height, false, out width, out height); Gdk.Pixbuf image = JpegUtils.LoadScaled (path, width, height); return image; #endif }
public static Pixbuf LoadAtMaxSize(string path, int max_width, int max_height) { PixbufUtils.AspectLoader loader = new AspectLoader (max_width, max_height); return loader.LoadFromFile (path); }
static public Pixbuf LoadAtMaxSize(string path, int max_width, int max_height) { PixbufUtils.AspectLoader loader = new AspectLoader(max_width, max_height); return(loader.LoadFromFile(path)); }