Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

PhotoLoader.cs

using System;

using FSpot.Platform;
using Hyena;

namespace FSpot {
      [Obsolete ("nuke or rename this")]
      public class PhotoLoader {
            public PhotoQuery query;

            public Gdk.Pixbuf Load (int index) {
                  return Load (query, index);
            }

            static public Gdk.Pixbuf Load (IBrowsableCollection collection, int index)
            {
                  IBrowsableItem item = collection [index];
                  return Load (item);
            }

            static public Gdk.Pixbuf Load (IBrowsableItem item) 
            {
                  using (ImageFile img = ImageFile.Create (item.DefaultVersion.Uri)) {
                        Gdk.Pixbuf pixbuf = img.Load ();
                        return pixbuf;
                  }
            }

            static public Gdk.Pixbuf LoadAtMaxSize (IBrowsableItem item, int width, int height) 
            {
                  using (ImageFile img = ImageFile.Create (item.DefaultVersion.Uri)) {
                        Gdk.Pixbuf pixbuf = img.Load (width, height);
                        return pixbuf;
                  }
            }

            public PhotoLoader (PhotoQuery query)
            {
                  this.query = query;
            }
      }
}

Generated by  Doxygen 1.6.0   Back to index