Click here to Skip to main content
15,904,653 members
Articles / Desktop Programming / MFC
Article

PhoXo Core Library (PCL)

Rate me:
Please Sign up or sign in to vote.
4.76/5 (10 votes)
25 Jul 2004 54.4K   2.3K   43   5
A powerful image manipulation library for C++.

Introduction

PCL is a set of powerful image manipulation library for C++, its a kernel of PhoXo (a 32 bit image manipulation software).

Main features

  • platform independent code
  • region selection
  • tens of image effect
  • Undo/Redo support
  • multiple-layer support
  • handle progress support
  • histogram
  • image file read/write
  • text layer (now using WIN32-GDI+ to render anti-aliasing text, future will use FreeType to render)

Using the code

The package includes three example, and detailed compile step.

This is part code in example - simple_imgobj :

FCSinglePixelProcessBase   * pEffect = NULL ;
switch (atoi(szInput))
{
    case 1 : pEffect = new FCPixelInvert() ; break ;
    case 2 : pEffect = new FCPixelGrayscale() ; break ;
    case 3 : pEffect = new FCPixelThreshold(100) ; break ;
    case 4 : pEffect = new FCPixelFlip() ; break ;
    case 5 : pEffect = new FCPixelEmboss(2) ; break ;
    case 6 : pEffect = new FCPixelSplash(15) ; break ;
    case 7 : pEffect = new FCPixelMosaic(10) ; break ;
    case 8 : pEffect = new FCPixelOilPaint(7) ; break ;
    case 9 : pEffect = new FCPixel3DGrid(16,100) ; break ;
    case 10 : pEffect = new FCPixelWhirlPinch(LIB_PI/2.0,10) ; break ;
    case 11 :
        {
            RECT    rcEllipse = {0,0,imgHandle.Width(),imgHandle.Height()} ;
            RGBQUAD crStart = {255,255,255}, crEnd = {255,0,0} ;
            pEffect = new FCPixelGradientRadial(rcEllipse,crStart,crEnd) ;
        }
        break ;
    case 12 : pEffect = new FCPixelGamma(2) ; break ;
    case 13 : pEffect = new FCPixelRotate90() ; break ;
    case 14 : pEffect = new FCPixelRibbon(35,25) ; break ;
    case 15 : pEffect = new FCPixelHalftoneM3() ; break ;
    default :
        printf ("choice invalid. quit do nothing.\n") ;
        return 0 ;
}

// to show progress, it's obvious in large image and
// slower algorithm (such as : OilPaint)
FCShowProgress     showPro ;
printf ("\ncurrent progress : ") ;
imgHandle.SinglePixelProcessProc (*pEffect, &showPro) ;
printf ("\n\n") ;
delete pEffect ;

History

Version 2.1
12. July 2004
Initial publication

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


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

 
GeneralSpart.h file missing Pin
ipadilla5-Apr-07 1:03
ipadilla5-Apr-07 1:03 
GeneralRe: Spart.h file missing Pin
crazybit9-Apr-07 17:49
crazybit9-Apr-07 17:49 
Generalsupport! Pin
gu mingqiu4-Aug-04 20:20
gu mingqiu4-Aug-04 20:20 
GeneralRe: support! Pin
crazybit5-Aug-04 22:41
crazybit5-Aug-04 22:41 
GeneralLinks to files : Pin
Kochise28-Jul-04 23:52
Kochise28-Jul-04 23:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.