Sha256: 0fe96ca886b518d21f2d6cc6e9a64031ecff118e994128fbcdeaf6b3a7324d53

Contents?: true

Size: 1.71 KB

Versions: 13

Compression:

Stored size: 1.71 KB

Contents

// Copyright (C) 2011  Davis E. King (davis@dlib.net)
// License: Boost Software License   See LICENSE.txt for the full license.
#undef DLIB_SAVE_PnG_ABSTRACT_
#ifdef DLIB_SAVE_PnG_ABSTRACT_

#include "../pixel.h"
#include "../image_processing/generic_image.h"

namespace dlib
{

// ----------------------------------------------------------------------------------------

    template <
        typename image_type 
        >
    void save_png (
        const image_type& image,
        const std::string& file_name
    );
    /*!
        requires
            - image_type == an image object that implements the interface defined in
              dlib/image_processing/generic_image.h or a matrix expression
            - image.size() != 0
        ensures
            - writes the image to the file indicated by file_name in the PNG (Portable Network Graphics) 
              format.
            - image[0][0] will be in the upper left corner of the image.
            - image[image.nr()-1][image.nc()-1] will be in the lower right
              corner of the image.
            - This routine can save images containing any type of pixel.  However, save_png() can
              only natively store the following pixel types: rgb_pixel, rgb_alpha_pixel, uint8, 
              and uint16.  All other pixel types will be converted into one of these types as 
              appropriate before being saved to disk.
        throws
            - image_save_error
                This exception is thrown if there is an error that prevents us from saving 
                the image.  
            - std::bad_alloc 
    !*/

// ----------------------------------------------------------------------------------------

}

#endif // DLIB_SAVE_PnG_ABSTRACT_



Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
dlib-1.2.2 ext/dlib-19.4/dlib/image_saver/save_png_abstract.h
dlib-1.2.1 ext/dlib-19.4/dlib/image_saver/save_png_abstract.h
dlib-1.2.0 ext/dlib-19.4/dlib/image_saver/save_png_abstract.h
dlib-1.1.5 ext/dlib-19.4/dlib/image_saver/save_png_abstract.h
dlib-1.1.4 ext/dlib-19.4/dlib/image_saver/save_png_abstract.h
dlib-1.1.3 ext/dlib-19.4/dlib/image_saver/save_png_abstract.h
dlib-1.1.2 ext/dlib-19.4/dlib/image_saver/save_png_abstract.h
dlib-1.1.1 ext/dlib-19.4/dlib/image_saver/save_png_abstract.h
dlib-1.1.0 ext/dlib-19.4/dlib/image_saver/save_png_abstract.h
dlib-1.0.3 ext/dlib-18.13/dlib/image_saver/save_png_abstract.h
dlib-1.0.2 ext/dlib-18.13/dlib/image_saver/save_png_abstract.h
dlib-1.0.1 ext/dlib-18.13/dlib/image_saver/save_png_abstract.h
dlib-1.0.0 ext/dlib-18.13/dlib/image_saver/save_png_abstract.h