Page Speed Optimization Libraries  1.7.30.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
net_instaweb::spriter::ImageLibraryInterface Class Reference

#include "image_library_interface.h"

Inheritance diagram for net_instaweb::spriter::ImageLibraryInterface:
net_instaweb::spriter::LibpngImageLibrary net_instaweb::spriter::MockImageLibraryInterface

List of all members.

Classes

class  Canvas
class  Delegate
class  Image
 Images are immutable rectangular regions of pixels. More...

Public Types

typedef GoogleString FilePath

Public Member Functions

virtual ImageReadFromFile (const FilePath &path)=0
virtual CanvasCreateCanvas (int width, int height)=0
 ImageLibraryInterface (Delegate *delegate)

Static Public Member Functions

static ImageLibraryInterfaceImageLibraryInterfaceFactory (const GoogleString &library_name)
 Use this factory method to get a usable image library object.

Protected Member Functions

 ImageLibraryInterface (const FilePath &base_input_path, const FilePath &base_output_path, Delegate *delegate)
 Use ImageLibraryInterfaceFactory() to access an image library.
const FilePathbase_input_path ()
 Used by subclasses:
const FilePathbase_output_path ()
const Delegatedelegate ()

Detailed Description

Class ImageLibraryInterface provides an abstract interface to manipulate images. This interface hides the details of any particular image processing library. This makes it easy to port to an environment where a different image processing library is preferred.

Subclasses create methods that act on two types of objects: Image: An imitable rectangular region of pixels. Canvas: A mutable rectangular region of pixels.


Member Typedef Documentation

Todo:
TODO(skerner): Chromium's base lib has a class FilePath that handles paths in a cross-platform way. Use it.

Constructor & Destructor Documentation

Constructor for custom subclasses. Prefer to use ImageLibraryInterfaceFactory() if possible.


Member Function Documentation

Read an image from disk. Return NULL (after calling delegate method) on error. Caller owns the returned pointer.

Implemented in net_instaweb::spriter::LibpngImageLibrary.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines