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 }
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)); }