|
<html><head><title>dlib C++ Library - load_image_abstract.h</title></head><body bgcolor='white'><pre> |
|
<font color='#009900'>// Copyright (C) 2011 Davis E. King ([email protected]), Nils Labugt |
|
</font><font color='#009900'>// License: Boost Software License See LICENSE.txt for the full license. |
|
</font><font color='#0000FF'>#undef</font> DLIB_LOAd_IMAGE_ABSTRACT_ |
|
<font color='#0000FF'>#ifdef</font> DLIB_LOAd_IMAGE_ABSTRACT_ |
|
|
|
<font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='../image_processing/generic_image.h.html'>../image_processing/generic_image.h</a>" |
|
|
|
<font color='#0000FF'>namespace</font> dlib |
|
<b>{</b> |
|
<font color='#0000FF'>template</font> <font color='#5555FF'><</font><font color='#0000FF'>typename</font> image_type<font color='#5555FF'>></font> |
|
<font color='#0000FF'><u>void</u></font> <b><a name='load_image'></a>load_image</b> <font face='Lucida Console'>(</font> |
|
image_type<font color='#5555FF'>&</font> image, |
|
<font color='#0000FF'>const</font> std::string<font color='#5555FF'>&</font> file_name |
|
<font face='Lucida Console'>)</font>; |
|
<font color='#009900'>/*! |
|
requires |
|
- image_type == an image object that implements the interface defined in |
|
dlib/image_processing/generic_image.h |
|
ensures |
|
- This function loads an image from disk, in the indicated file file_name, and |
|
writes it to the indicated image object. |
|
- It is capable of reading the PNG, JPEG, BMP, GIF, and DNG image formats. It |
|
is always capable of reading BMP and DNG images. However, for PNG, JPEG, and |
|
GIF you must #define DLIB_PNG_SUPPORT, DLIB_JPEG_SUPPORT, and |
|
DLIB_GIF_SUPPORT respectively and link your program to libpng, libjpeg, and |
|
libgif respectively. |
|
throws |
|
- image_load_error |
|
This exception is thrown if there is some error that prevents |
|
us from loading the given image file. |
|
!*/</font> |
|
|
|
<b>}</b> |
|
|
|
<font color='#0000FF'>#endif</font> <font color='#009900'>// DLIB_LOAd_IMAGE_ABSTRACT_ |
|
</font> |
|
|
|
|
|
</pre></body></html> |