Clarion FreeImage
 
  Menu
  Home
  Download
  Related Projects
  What's Next?
  Contact Us
  FAQ
 
    Links
  SoftVelocity
  FreeImage
 
  Donate
   Make a Donation

New Version 3.15.8 (2018.12.20)
available now.

  

What is the Clarion FreeImage Project?

The Clarion FreeImage Project is a set of classes and a template that implement the FreeImage library in Clarion 6.x, 7, 8, 9, 10 and 11. FreeImage is an open source raster image processing library. The base class wraps the FreeImage DLL and includes methods to load, save, transform, rescale, create thumbnails, color correct, change bit depth, alpha blend and more. You can contribute to the project by helping with any of the tasks listed on What's Next?.

Built on the base class is an image control that you can use on your windows like the Clarion image control. It supports flicker free, resampled zooming and scrolling. The image control is 100% Clarion source code. Since you have the source code, you can recompile it as new versions of Clarion are released.

Here's an example of how you can use the image control in the Clarion FreeImage Project Example program. It is placed on an MDI window, and the width and height are set to "full" so it automatically resizes with the window.

Clarion FreeImage Project Example

You may also use the FreeImage base class without the image control for those times when you don't need to display the image. For example, it works perfectly to create thumbnails of all images in a folder.

The following code is all that's required to load an image and create a thumbnail 64 pixels wide using a BSpline resampling filter, and then save it in a different file.

ThumbImage FreeImageClass
  Code
  If ThumbImage.iImage.Load('C:\images\ImageFile.jpg')
    ThumbImage.iImage.Thumbnail(64, FILTER_BSPLINE)
    ThumbImage.iImage.SaveAs('C:\images\ImageFileThumb.jpg')
  End

Here are some of the other operations that the base class supports:

  • Resampling (resize the image using these filters)
    • Box (first order B-Spline)
    • Bilinear
    • BSpline (fourth order B-Spline)
    • Bicubic (Mitchell and Netravali's two-param cubic filter)
    • Catmull-Rom spline
    • Lanzcoz3

This image of a herring gull:

full size photo

Was processed by the Thumbnail method using the BSpline filter to create this thumbnail image:

Resampled photo

  • Color correction
  • Reads these popular file formats, (and others)
    • JPEG - JFIF compliant (.jpg, .jif, .jpeg, .jpe)
    • TIFF (single, multipage not yet supported in class)
    • PNG
    • ICO
    • BMP
  • Reads EXIF and other Metadata stored in the image.
  • Copy images to and from the clipboard
  • Load and save images to BLOBs in TopSpeed files.
  • Copy any image loaded in a Clarion FreeImage class (you don't need to display it) into a Clarion Image control.