Adobe Systems, Inc.

JPEG I/O
[Generic Image Library (GIL)I/O]

Support for reading and writing image files Support for reading and writing JPEG image files. More...

Classes

struct  jpeg_read_support< VIEW >
 Determines whether the given view type is supported for reading. More...
struct  jpeg_write_support< VIEW >
 Determines whether the given view type is supported for writing. More...

Functions

template<typename IMAGE>
void jpeg_read_and_convert_image (const std::string &filename, IMAGE &im)
template<typename IMAGE>
void jpeg_read_and_convert_image (const char *filename, IMAGE &im)
template<typename VIEW>
void jpeg_read_and_convert_view (const std::string &filename, const VIEW &view)
template<typename VIEW>
void jpeg_read_and_convert_view (const char *filename, const VIEW &view)
point2< int > jpeg_read_dimensions (const std::string &filename)
point2< int > jpeg_read_dimensions (const char *filename)
template<typename IMAGE>
void jpeg_read_image (const std::string &filename, IMAGE &im)
template<typename IMAGE>
void jpeg_read_image (const char *filename, IMAGE &im)
template<typename IMAGES>
void jpeg_read_image (const std::string &filename, any_image< IMAGES > &im)
template<typename IMAGES>
void jpeg_read_image (const char *filename, any_image< IMAGES > &im)
template<typename VIEW>
void jpeg_read_view (const std::string &filename, const VIEW &view)
template<typename VIEW>
void jpeg_read_view (const char *filename, const VIEW &view)
template<typename VIEW>
void jpeg_write_view (const std::string &filename, const VIEW &view, int quality=100)
template<typename VIEW>
void jpeg_write_view (const char *filename, const VIEW &view, int quality=100)
template<typename VIEWS>
void jpeg_write_view (const std::string &filename, const any_image_view< VIEWS > &runtime_view)
template<typename VIEWS>
void jpeg_write_view (const char *filename, const any_image_view< VIEWS > &runtime_view)

Detailed Description


Function Documentation

template<typename IMAGES>
void jpeg_read_image const char *  filename,
any_image< IMAGES > &  im
 

reads a JPEG image into a run-time instantiated image

Opens the given JPEG file name, selects the first type in IMAGES whose color space and channel are compatible to those of the image file and creates a new image of that type with the dimensions specified by the image file.

Definition at line 95 of file jpeg_dynamic_io.hpp.

template<typename IMAGES>
void jpeg_read_image const std::string &  filename,
any_image< IMAGES > &  im
 

reads a JPEG image into a run-time instantiated image

Definition at line 103 of file jpeg_dynamic_io.hpp.

template<typename VIEWS>
void jpeg_write_view const char *  filename,
const any_image_view< VIEWS > &  runtime_view
 

Saves the currently instantiated view to a jpeg file specified by the given jpeg image file name.

Throws std::ios_base::failure if the currently instantiated view type is not supported for writing by the I/O extension or if it fails to create the file.

Definition at line 112 of file jpeg_dynamic_io.hpp.

template<typename VIEWS>
void jpeg_write_view const std::string &  filename,
const any_image_view< VIEWS > &  runtime_view
 

Saves the currently instantiated view to a jpeg file specified by the given jpeg image file name.

Definition at line 120 of file jpeg_dynamic_io.hpp.

point2<int> jpeg_read_dimensions const char *  filename  ) 
 

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.

Definition at line 47 of file jpeg_io.hpp.

point2<int> jpeg_read_dimensions const std::string &  filename  ) 
 

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.

Definition at line 55 of file jpeg_io.hpp.

template<typename VIEW>
void jpeg_read_view const char *  filename,
const VIEW &  view
 

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.

Definition at line 65 of file jpeg_io.hpp.

template<typename VIEW>
void jpeg_read_view const std::string &  filename,
const VIEW &  view
 

Loads the image specified by the given jpeg image file name into the given view.

Definition at line 75 of file jpeg_io.hpp.

template<typename IMAGE>
void jpeg_read_image const char *  filename,
IMAGE &  im
 

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.

Definition at line 85 of file jpeg_io.hpp.

template<typename IMAGE>
void jpeg_read_image const std::string &  filename,
IMAGE &  im
 

Allocates a new image whose dimensions are determined by the given jpeg image file, and loads the pixels into it.

Definition at line 95 of file jpeg_io.hpp.

template<typename VIEW>
void jpeg_read_and_convert_view const char *  filename,
const VIEW &  view
 

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.

Definition at line 103 of file jpeg_io.hpp.

template<typename VIEW>
void jpeg_read_and_convert_view const std::string &  filename,
const VIEW &  view
 

Loads and color-converts the image specified by the given jpeg image file name into the given view.

Definition at line 111 of file jpeg_io.hpp.

template<typename IMAGE>
void jpeg_read_and_convert_image const char *  filename,
IMAGE &  im
 

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.

Definition at line 119 of file jpeg_io.hpp.

template<typename IMAGE>
void jpeg_read_and_convert_image const std::string &  filename,
IMAGE &  im
 

Allocates a new image whose dimensions are determined by the given jpeg image file, loads and color-converts the pixels into it.

Definition at line 127 of file jpeg_io.hpp.

template<typename VIEW>
void jpeg_write_view const char *  filename,
const VIEW &  view,
int  quality = 100
 

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.

Definition at line 149 of file jpeg_io.hpp.

template<typename VIEW>
void jpeg_write_view const std::string &  filename,
const VIEW &  view,
int  quality = 100
 

Saves the view to a jpeg file specified by the given jpeg image file name.

Definition at line 159 of file jpeg_io.hpp.

Copyright © 2006 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google