x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
jpeg_io.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\gil\extension\io\jpeg_io.hpp
旋转
特效
属性
历史版本
/* Copyright 2005-2007 Adobe Systems Incorporated Use, modification and distribution are subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt). See http://opensource.adobe.com/gil for most recent version including documentation. */ /*************************************************************************************************/ #ifndef GIL_JPEG_IO_H #define GIL_JPEG_IO_H /// \file /// \brief Support for reading and writing JPEG files /// Requires libjpeg /// \author Hailin Jin and Lubomir Bourdev \n /// Adobe Systems Incorporated /// \date 2005-2007 \n Last updated September 24, 2006 #include
#include
#include
#include
#include
extern "C" { #include
} #include "io_error.hpp" #include "jpeg_io_private.hpp" namespace boost { namespace gil { /// \ingroup JPEG_IO /// \brief Determines whether the given view type is supported for reading template
struct jpeg_read_support { BOOST_STATIC_CONSTANT(bool,is_supported= (detail::jpeg_read_support_private
::type, typename color_space_type
::type>::is_supported)); BOOST_STATIC_CONSTANT(J_COLOR_SPACE,color_type= (detail::jpeg_read_support_private
::type, typename color_space_type
::type>::color_type)); BOOST_STATIC_CONSTANT(bool, value=is_supported); }; /// \ingroup JPEG_IO /// \brief Returns the width and height of the JPEG file at the specified location. /// Throws std::ios_base::failure if the location does not correspond to a valid JPEG file inline point2
jpeg_read_dimensions(const char* filename) { detail::jpeg_reader m(filename); return m.get_dimensions(); } /// \ingroup JPEG_IO /// \brief Returns the width and height of the JPEG file at the specified location. /// Throws std::ios_base::failure if the location does not correspond to a valid JPEG file inline point2
jpeg_read_dimensions(const std::string& filename) { return jpeg_read_dimensions(filename.c_str()); } /// \ingroup JPEG_IO /// \brief Loads the image specified by the given jpeg image file name into the given view. /// Triggers a compile assert if the view color space and channel depth are not supported by the JPEG library or by the I/O extension. /// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not /// compatible with the ones specified by View, or if its dimensions don't match the ones of the view. template
inline void jpeg_read_view(const char* filename,const View& view) { BOOST_STATIC_ASSERT(jpeg_read_support
::is_supported); detail::jpeg_reader m(filename); m.apply(view); } /// \ingroup JPEG_IO /// \brief Loads the image specified by the given jpeg image file name into the given view. template
inline void jpeg_read_view(const std::string& filename,const View& view) { jpeg_read_view(filename.c_str(),view); } /// \ingroup JPEG_IO /// \brief Allocates a new image whose dimensions are determined by the given jpeg image file, and loads the pixels into it. /// Triggers a compile assert if the image color space or channel depth are not supported by the JPEG library or by the I/O extension. /// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its color space or channel depth are not /// compatible with the ones specified by Image template
inline void jpeg_read_image(const char* filename,Image& im) { BOOST_STATIC_ASSERT(jpeg_read_support
::is_supported); detail::jpeg_reader m(filename); m.read_image(im); } /// \ingroup JPEG_IO /// \brief Allocates a new image whose dimensions are determined by the given jpeg image file, and loads the pixels into it. template
inline void jpeg_read_image(const std::string& filename,Image& im) { jpeg_read_image(filename.c_str(),im); } /// \ingroup JPEG_IO /// \brief Loads and color-converts the image specified by the given jpeg image file name into the given view. /// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its dimensions don't match the ones of the view. template
inline void jpeg_read_and_convert_view(const char* filename,const View& view,CC cc) { detail::jpeg_reader_color_convert
m(filename,cc); m.apply(view); } /// \ingroup JPEG_IO /// \brief Loads and color-converts the image specified by the given jpeg image file name into the given view. /// Throws std::ios_base::failure if the file is not a valid JPEG file, or if its dimensions don't match the ones of the view. template
inline void jpeg_read_and_convert_view(const char* filename,const View& view) { detail::jpeg_reader_color_convert
m(filename,default_color_converter()); m.apply(view); } /// \ingroup JPEG_IO /// \brief Loads and color-converts the image specified by the given jpeg image file name into the given view. template
inline void jpeg_read_and_convert_view(const std::string& filename,const View& view,CC cc) { jpeg_read_and_convert_view(filename.c_str(),view); } /// \ingroup JPEG_IO /// \brief Loads and color-converts the image specified by the given jpeg image file name into the given view. template
inline void jpeg_read_and_convert_view(const std::string& filename,const View& view) { jpeg_read_and_convert_view(filename.c_str(),view); } /// \ingroup JPEG_IO /// \brief Allocates a new image whose dimensions are determined by the given jpeg image file, loads and color-converts the pixels into it. /// Throws std::ios_base::failure if the file is not a valid JPEG file template
inline void jpeg_read_and_convert_image(const char* filename,Image& im,CC cc) { detail::jpeg_reader_color_convert
m(filename,cc); m.read_image(im); } /// \ingroup JPEG_IO /// \brief Allocates a new image whose dimensions are determined by the given jpeg image file, loads and color-converts the pixels into it. /// Throws std::ios_base::failure if the file is not a valid JPEG file template
inline void jpeg_read_and_convert_image(const char* filename,Image& im) { detail::jpeg_reader_color_convert
m(filename,default_color_converter()); m.read_image(im); } /// \ingroup JPEG_IO /// \brief Allocates a new image whose dimensions are determined by the given jpeg image file, loads and color-converts the pixels into it. template
inline void jpeg_read_and_convert_image(const std::string& filename,Image& im,CC cc) { jpeg_read_and_convert_image(filename.c_str(),im); } /// \ingroup JPEG_IO /// \brief Allocates a new image whose dimensions are determined by the given jpeg image file, loads and color-converts the pixels into it. template
inline void jpeg_read_and_convert_image(const std::string& filename,Image& im) { jpeg_read_and_convert_image(filename.c_str(),im); } /// \ingroup JPEG_IO /// \brief Determines whether the given view type is supported for writing template
struct jpeg_write_support { BOOST_STATIC_CONSTANT(bool,is_supported= (detail::jpeg_write_support_private
::type, typename color_space_type
::type>::is_supported)); BOOST_STATIC_CONSTANT(J_COLOR_SPACE,color_type= (detail::jpeg_write_support_private
::type, typename color_space_type
::type>::color_type)); BOOST_STATIC_CONSTANT(bool, value=is_supported); }; /// \ingroup JPEG_IO /// \brief Saves the view to a jpeg file specified by the given jpeg image file name. /// Triggers a compile assert if the view color space and channel depth are not supported by the JPEG library or by the I/O extension. /// Throws std::ios_base::failure if it fails to create the file. template
inline void jpeg_write_view(const char* filename,const View& view,int quality=100) { BOOST_STATIC_ASSERT(jpeg_write_support
::is_supported); detail::jpeg_writer m(filename); m.apply(view,quality); } /// \ingroup JPEG_IO /// \brief Saves the view to a jpeg file specified by the given jpeg image file name. template
inline void jpeg_write_view(const std::string& filename,const View& view,int quality=100) { jpeg_write_view(filename.c_str(),view,quality); } } } // namespace boost::gil #endif
jpeg_io.hpp
网页地址
文件地址
上一页
4/10
下一页
下载
( 9 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.