Click here to Skip to main content
15,885,782 members
Articles / Desktop Programming / MFC

ImageStone - A Powerful C++ Class Library for Image Manipulation

Rate me:
Please Sign up or sign in to vote.
4.81/5 (250 votes)
6 Dec 2011Zlib3 min read 1.1M   51.5K   405  
An article on a library for image manipulation
/*
    Copyright (C) =USTC= Fu Li

    Author   :  Fu Li
    Create   :  2005-7-29
    Home     :  http://www.phoxo.com
    Mail     :  crazybitwps@hotmail.com

    This file is part of ImageStone

    The code distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Redistribution and use the source code, with or without modification,
    must retain the above copyright.
*/
#ifndef CODECFACTORY_FREEIMAGE_2005_07_29_H
#define CODECFACTORY_FREEIMAGE_2005_07_29_H
#include "codec_freeimage.h"

//-------------------------------------------------------------------------------------
/**
    Create FreeImage codec (<B>Need FreeImage</B>).
@verbatim
              BMP      TGA      Jpg      Gif      Tif      Png      Pcx      Ico      Xpm      Psd
    Read       O        O        O        O        O        O        O        O        O        O
    Write      O        O        O        O        O        O        O        O        O        X
@endverbatim
*/
class FCImageCodecFactory_FreeImage : public FCImageCodecFactory
{
    virtual FCImageCodec* CreateImageCodec (IMAGE_TYPE imgType)
    {
        switch (imgType)
        {
            case IMG_BMP :
            case IMG_TGA :
            case IMG_GIF :
            case IMG_PCX :
            case IMG_PNG :
            case IMG_TIF :
            case IMG_JPG :
            case IMG_ICO :
            case IMG_XPM :
            case IMG_PSD : return new FCImageCodec_FreeImage ;
        }
        return 0 ;
    }
};

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The zlib/libpng License


Written By
Team Leader PhoXo
China China
graduate from University of Science and Technology of China at 2002.

Now I work at www.phoxo.com.

Comments and Discussions