RE: :Pixbuf



> I was trying to load and thumb nail an image (as efficiently 
> as possible) last night, I played about a bit with 
> Gdk::PixbufLoader and Gdk::Pixbuf.
> 
> As regards the former, I couldn't really figure out the steps 
> needed to use the thing, and the later, the methods in which 
> I was interested (for example the load_from_file method that 
> is overloaded to include desired width, height and sampling 
> mode) appeared to be missing from pixbuf.h (which I just 
> Freudian typod as pixbug.h :)
> 
> So, I suppose the question for the list is, which is the best 
> of these two approaches, and knowing that, how do I got about 
> putting the approach to practical use considering the 
> problems I mentioned.
> 
> Hope that is nice and clear.
> 

So, I investigated since nobody replied (not that anybody has to), and found
this ...

/** Creates a new pixbuf by loading an image from a file. The file format is
detected automatically.
   * The image will be scaled to fit in the requested size.
   * @param filename The path to the pixbuf file.
   * @param width The desired width
   * @param height The desired height
   * @param preserve_aspect_ratio: Whether the image's aspect ratio will be
preserved when scaling.
   *
   * @throw Glib::FileError
   * @throw Gdk::PixbufError
   */
  static Glib::RefPtr<Pixbuf> create_from_file(const std::string& filename,
int width, int height, bool preserve_aspect_ratio = true);
  _IGNORE(gdk_pixbuf_new_from_file_at_scale,
gdk_pixbuf_new_from_file_at_size)

Does that _IGNORE mean that this method is not added to the bindings? If so,
does anybody know why?

Gaz



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]