示例#1
0
        public Pixbuf Load(System.IO.Stream stream, ImageOrientation orientation)
        {
            int count;

            byte [] data = new byte [8192];
            while (((count = stream.Read(data, 0, data.Length)) > 0) && loader.Write(data, (ulong)count))
            {
                ;
            }

            loader.Close();
            Pixbuf orig = loader.Pixbuf;

            Gdk.Pixbuf rotated = FSpot.Utils.PixbufUtils.TransformOrientation(orig, orientation);

            if (orig != rotated)
            {
                orig.Dispose();
            }
            loader.Dispose();
            return(rotated);
        }
        public Pixbuf Load(System.IO.Stream stream, PixbufOrientation orientation)
        {
            int count;

            byte [] data = new byte [8192];
            while (((count = stream.Read(data, 0, data.Length)) > 0) && loader.Write(data, (ulong)count))
            {
                ;
            }

            loader.Close();
            Pixbuf orig = loader.Pixbuf;

            Gdk.Pixbuf rotated = TransformOrientation(orig, orientation, true);

            if (orig != rotated)
            {
                CopyThumbnailOptions(orig, rotated);
                orig.Dispose();
            }
            loader.Dispose();
            return(rotated);
        }