Click here to Skip to main content
Licence 
First Posted 25 Jul 2004
Views 40,417
Bookmarked 38 times

PhoXo Core Library (PCL)

By | 25 Jul 2004 | Article
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

About the Author

crazybit

Team Leader
PhoXo
China China

Member

graduate from University of Science and Technology of China at 2002.
 
Now I work at www.phoxo.com.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralSpart.h file missing Pinmemberipadilla1:03 5 Apr '07  
GeneralRe: Spart.h file missing Pinmembercrazybit17:49 9 Apr '07  
Generalsupport! Pinmembergu mingqiu20:20 4 Aug '04  
GeneralRe: support! Pinmembercrazybit22:41 5 Aug '04  
GeneralLinks to files : PinmemberKochise23:52 28 Jul '04  

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

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

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120517.1 | Last Updated 26 Jul 2004
Article Copyright 2004 by crazybit
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid