Load() public method

public Load ( System stream, ImageOrientation, orientation ) : Pixbuf
stream System
orientation ImageOrientation,
return Pixbuf
示例#1
0
        public virtual Gdk.Pixbuf Load(int max_width, int max_height)
        {
            System.IO.Stream stream = PixbufStream();
            if (stream == null)
            {
                Gdk.Pixbuf orig   = this.Load();
                Gdk.Pixbuf scaled = PixbufUtils.ScaleToMaxSize(orig, max_width, max_height);
                orig.Dispose();
                return(scaled);
            }

            using (stream) {
                PixbufUtils.AspectLoader aspect = new PixbufUtils.AspectLoader(max_width, max_height);
                return(aspect.Load(stream, Orientation));
            }
        }
示例#2
0
		public virtual Gdk.Pixbuf Load (int max_width, int max_height)
		{
			System.IO.Stream stream = PixbufStream ();
			if (stream == null) {
				Gdk.Pixbuf orig = this.Load ();
				Gdk.Pixbuf scaled = PixbufUtils.ScaleToMaxSize (orig,  max_width, max_height);	
				orig.Dispose ();
				return scaled;
			}

			using (stream) {
				PixbufUtils.AspectLoader aspect = new PixbufUtils.AspectLoader (max_width, max_height);
				return aspect.Load (stream, Orientation);
			}	
		}