
@c %start of fragment

@deffn Function gdk-pixbuf-new-from-file  (filename@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{<gdk-pixbuf>})
Creates a new pixbuf by loading an image from a file. The file format is
detected automatically. If @samp{@code{#f}} is returned, then @var{error} will
be set. Possible errors are in the @code{<gdk-pixbuf-error>} and
@code{<g-file-error>} domains.

@table @var
@item filename
Name of file to load, in the GLib file name encoding

@item error
Return location for an error

@item ret
A newly-created pixbuf with a reference count of 1, or @samp{@code{#f}} if any
of several error conditions occurred: the file could not be opened, there was no
loader for the file's format, there was not enough memory to allocate the image
buffer, or the image file contained invalid data.

@end table

@end deffn

@deffn Function gdk-pixbuf-new-from-file-at-size  (filename@tie{}@code{mchars}) (width@tie{}@code{int}) (height@tie{}@code{int}) @result{}@tie{} (ret@tie{}@code{<gdk-pixbuf>})
Creates a new pixbuf by loading an image from a file. The file format is
detected automatically. If @samp{@code{#f}} is returned, then @var{error} will
be set. Possible errors are in the @code{<gdk-pixbuf-error>} and
@code{<g-file-error>} domains. The image will be scaled to fit in the requested
size, preserving the image's aspect ratio.

@table @var
@item filename
Name of file to load, in the GLib file name encoding

@item width
The width the image should have or -1 to not constrain the width

@item height
The height the image should have or -1 to not constrain the height

@item error
Return location for an error

@item ret
A newly-created pixbuf with a reference count of 1, or @samp{@code{#f}} if any
of several error conditions occurred: the file could not be opened, there was no
loader for the file's format, there was not enough memory to allocate the image
buffer, or the image file contained invalid data.

@end table

Since 2.4

@end deffn

@deffn Function gdk-pixbuf-new-from-file-at-scale  (filename@tie{}@code{mchars}) (width@tie{}@code{int}) (height@tie{}@code{int}) (preserve_aspect_ratio@tie{}@code{bool}) @result{}@tie{} (ret@tie{}@code{<gdk-pixbuf>})
Creates a new pixbuf by loading an image from a file. The file format is
detected automatically. If @samp{@code{#f}} is returned, then @var{error} will
be set. Possible errors are in the @code{<gdk-pixbuf-error>} and
@code{<g-file-error>} domains. The image will be scaled to fit in the requested
size, optionally preserving the image's aspect ratio.

When preserving the aspect ratio, a @var{width} of -1 will cause the image to be
scaled to the exact given height, and a @var{height} of -1 will cause the image
to be scaled to the exact given width. When not preserving aspect ratio, a
@var{width} or @var{height} of -1 means to not scale the image at all in that
dimension. Negative values for @var{width} and @var{height} are allowed since
2.8.

@table @var
@item filename
Name of file to load, in the GLib file name encoding

@item width
The width the image should have or -1 to not constrain the width

@item height
The height the image should have or -1 to not constrain the height

@item preserve-aspect-ratio
@samp{@code{#t}} to preserve the image's aspect ratio

@item error
Return location for an error

@item ret
A newly-created pixbuf with a reference count of 1, or @samp{@code{#f}} if any
of several error conditions occurred: the file could not be opened, there was no
loader for the file's format, there was not enough memory to allocate the image
buffer, or the image file contained invalid data.

@end table

Since 2.6

@end deffn


@c %end of fragment
