Commits

Jason McKesson committed 6ec988d

Removed FreeImage and updated build instructions.

Comments (0)

Files changed (943)

Documents/Building the Tutorials.xml

         <para>Using the generated build files, compile for both debug and release.</para>
     </simplesect>
     <simplesect>
-        <title>GLImg</title>
-        <para>The GLImg library is a library for loading image data from various file
-            formats.</para>
-        <para>Like TinyXML, GLImg uses Premake to generate its build files. To create the build
-            files, go to the <filename>glimg</filename> directory. Type <userinput>premake4
+        <title>GLLoad and GLImg</title>
+        <para>The GLImg library is a library for loading image data from various file formats. The
+            GLLoad library is a home-brewed library for loading OpenGL function entrypoints from the
+            .dll. For reasons that are too technical to repeat here, using OpenGL on most platforms
+            requires manually loading function pointers from a .dll. This library makes this process
+            painless.</para>
+        <para>Like TinyXML, these two libraries use Premake to generate their build files. However,
+            they are both generated from the same premake file. To generate the build for these two
+            libraries, go to the <filename>glimg</filename> directory. Type <userinput>premake4
                     <replaceable>plat</replaceable></userinput> as you did for TinyXML. This will
-            create the build file you need to use to build the library for both debug and
-            release.</para>
-    </simplesect>
-    <simplesect>
-        <title>GLLoad</title>
-        <para>The GLLoad library is a home-brewed library for loading OpenGL function entrypoints
-            from the .dll. For reasons that are too technical to repeat here, using OpenGL on most
-            platforms requires manually loading function pointers from a .dll. This library makes
-            this process painless.</para>
-        <para>Like TinyXML, GLLoad uses Premake to generate its build files. To create the build
-            files, go to the <filename>glload</filename> directory. Type <userinput>premake4
-                    <replaceable>plat</replaceable></userinput> as you did for TinyXML. This will
-            create the build file you need to use to build the library for both debug and
+            create the build file you need to use to build the libraries for both debug and
             release.</para>
     </simplesect>
     <simplesect>
Add a comment to this file

FreeImage/Dist/delete.me

Empty file removed.

FreeImage/Examples/Generic/BatchLoad.cpp

-// ==========================================================
-// Batch loader
-//
-// Design and implementation by 
-// - Floris van den Berg
-// - Herv� Drolon
-//
-// This file is part of FreeImage 3
-//
-// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
-// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
-// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
-// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
-// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
-// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
-// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
-// THIS DISCLAIMER.
-//
-// Use at own risk!
-// ==========================================================
-
-//
-//  This example shows how to easily batch load a directory
-//  full of images. Because not all formats can be identified
-//  by their header (some images don't have a header or one
-//  at the end of the file) we make use of the
-//  FreeImage_GetFIFFromFilename function. This function
-//  receives a file name, for example 'myfile.bmp', and returns
-//  a FREE_IMAGE_TYPE enum which identifies that bitmap.
-//
-//  Functions used in this sample : 
-//  FreeImage_GetFileType, FreeImage_GetFIFFromFilename, FreeImage_FIFSupportsReading, 
-//  FreeImage_Load, FreeImage_GetBPP, FreeImage_FIFSupportsWriting, FreeImage_GetFormatFromFIF
-//  FreeImage_FIFSupportsExportBPP, FreeImage_Save, FreeImage_Unload,
-//  FreeImage_SetOutputMessage, FreeImage_GetVersion, FreeImage_GetCopyrightMessage
-//
-// ==========================================================
-
-#include <assert.h>
-#include <stdio.h>
-#include <io.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "FreeImage.h"
-
-// ----------------------------------------------------------
-
-/** Generic image loader
-	@param lpszPathName Pointer to the full file name
-	@param flag Optional load flag constant
-	@return Returns the loaded dib if successful, returns NULL otherwise
-*/
-FIBITMAP* GenericLoader(const char* lpszPathName, int flag) {
-	FREE_IMAGE_FORMAT fif = FIF_UNKNOWN;
-
-	// check the file signature and deduce its format
-	// (the second argument is currently not used by FreeImage)
-	fif = FreeImage_GetFileType(lpszPathName, 0);
-	if(fif == FIF_UNKNOWN) {
-		// no signature ?
-		// try to guess the file format from the file extension
-		fif = FreeImage_GetFIFFromFilename(lpszPathName);
-	}
-	// check that the plugin has reading capabilities ...
-	if((fif != FIF_UNKNOWN) && FreeImage_FIFSupportsReading(fif)) {
-		// ok, let's load the file
-		FIBITMAP *dib = FreeImage_Load(fif, lpszPathName, flag);
-		// unless a bad file format, we are done !
-		return dib;
-	}
-	return NULL;
-}
-
-/** Generic image writer
-	@param dib Pointer to the dib to be saved
-	@param lpszPathName Pointer to the full file name
-	@param flag Optional save flag constant
-	@return Returns true if successful, returns false otherwise
-*/
-bool GenericWriter(FIBITMAP* dib, const char* lpszPathName, int flag) {
-	FREE_IMAGE_FORMAT fif = FIF_UNKNOWN;
-	BOOL bSuccess = FALSE;
-
-	if(dib) {
-		// try to guess the file format from the file extension
-		fif = FreeImage_GetFIFFromFilename(lpszPathName);
-		if(fif != FIF_UNKNOWN ) {
-			// check that the plugin has sufficient writing and export capabilities ...
-			WORD bpp = FreeImage_GetBPP(dib);
-			if(FreeImage_FIFSupportsWriting(fif) && FreeImage_FIFSupportsExportBPP(fif, bpp)) {
-				// ok, we can save the file
-				bSuccess = FreeImage_Save(fif, dib, lpszPathName, flag);
-				// unless an abnormal bug, we are done !
-			}
-		}
-	}
-	return (bSuccess == TRUE) ? true : false;
-}
-
-// ----------------------------------------------------------
-
-/**
-	FreeImage error handler
-	@param fif Format / Plugin responsible for the error 
-	@param message Error message
-*/
-void FreeImageErrorHandler(FREE_IMAGE_FORMAT fif, const char *message) {
-	printf("\n*** "); 
-	if(fif != FIF_UNKNOWN) {
-		printf("%s Format\n", FreeImage_GetFormatFromFIF(fif));
-	}
-	printf(message);
-	printf(" ***\n");
-}
-
-// ----------------------------------------------------------
-
-#ifndef MAX_PATH
-#define MAX_PATH	260
-#endif
-
-int 
-main(int argc, char *argv[]) {
-
-	const char *input_dir = "d:\\images\\";
-	FIBITMAP *dib = NULL;
-	int id = 1;
-
-	// call this ONLY when linking with FreeImage as a static library
-#ifdef FREEIMAGE_LIB
-	FreeImage_Initialise();
-#endif // FREEIMAGE_LIB
-
-	// initialize your own FreeImage error handler
-
-	FreeImage_SetOutputMessage(FreeImageErrorHandler);
-
-	// print version & copyright infos
-
-	printf(FreeImage_GetVersion());
-	printf("\n");
-	printf(FreeImage_GetCopyrightMessage());
-	printf("\n");
-
-	// open the log file
-
-	FILE *log_file = fopen("log_file.txt", "w");
-
-	// batch convert all supported bitmaps
-
-	_finddata_t finddata;
-	long handle;
-	char image_path[MAX_PATH];
-
-	// scan all files
-	strcpy(image_path, input_dir);
-	strcat(image_path, "*.*");
-
-	if ((handle = _findfirst(image_path, &finddata)) != -1) {
-		do {
-			// make a path to a directory
-
-			char *directory = new char[MAX_PATH];
-			strcpy(directory, input_dir);
-			strcat(directory, finddata.name);
-
-			// make a unique filename
-
-			char *unique = new char[128];
-			itoa(id, unique, 10);
-			strcat(unique, ".png");
-
-			// open and load the file using the default load option
-			dib = GenericLoader(directory, 0);
-
-			if (dib != NULL) {
-				// save the file as PNG
-				bool bSuccess = GenericWriter(dib, unique, PNG_DEFAULT);
-
-				// free the dib
-				FreeImage_Unload(dib);
-
-				if(bSuccess) {
-					fwrite(unique, strlen(unique), 1, log_file);
-				} else {
-					strcpy(unique, "FAILED");
-					fwrite(unique, strlen(unique), 1, log_file);
-				}
-				fwrite(" >> ", 4, 1, log_file);
-				fwrite(directory, strlen(directory), 1, log_file);
-				fwrite("\n", 1, 1, log_file);
-
-				id++;
-			}
-
-			delete [] unique;
-			delete [] directory;
-
-		} while (_findnext(handle, &finddata) == 0);
-
-		_findclose(handle);
-	}
-
-	fclose(log_file);
-
-	// call this ONLY when linking with FreeImage as a static library
-#ifdef FREEIMAGE_LIB
-	FreeImage_DeInitialise();
-#endif // FREEIMAGE_LIB
-
-	return 0;
-}

FreeImage/Examples/Generic/CloneMultiPage.cpp

-// ==========================================================
-// Multipage functions demonstration
-//
-// Design and implementation by 
-// - Herv� Drolon
-//
-// This file is part of FreeImage 3
-//
-// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
-// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
-// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
-// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
-// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
-// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
-// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
-// THIS DISCLAIMER.
-//
-// Use at own risk!
-// ==========================================================
-
-// This sample shows how to clone a multipage TIFF
-//
-// Functions used in this sample : 
-// FreeImage_OpenMultiBitmap, FreeImage_GetPageCount, FreeImage_LockPage, 
-// FreeImage_AppendPage, FreeImage_UnlockPage, FreeImage_CloseMultiBitmap; 
-// FreeImage_SetOutputMessage
-//
-// ==========================================================
-
-#include <iostream.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "FreeImage.h"
-
-// ----------------------------------------------------------
-
-/**
-	FreeImage error handler
-*/
-void MyMessageFunc(FREE_IMAGE_FORMAT fif, const char *message) {
-	cout << "\n*** " << message << " ***\n";
-	cout.flush();
-}
-
-// ----------------------------------------------------------
-
-bool CloneMultiPage(FREE_IMAGE_FORMAT fif, char *input, char *output, int output_flag) {
-
-	BOOL bMemoryCache = TRUE;
-
-	// Open src file (read-only, use memory cache)
-	FIMULTIBITMAP *src = FreeImage_OpenMultiBitmap(fif, input, FALSE, TRUE, bMemoryCache);
-
-	if(src) {
-		// Open dst file (creation, use memory cache)
-		FIMULTIBITMAP *dst = FreeImage_OpenMultiBitmap(fif, output, TRUE, FALSE, bMemoryCache);
-
-		// Get src page count
-		int count = FreeImage_GetPageCount(src);
-
-		// Clone src to dst
-		for(int page = 0; page < count; page++) {
-			// Load the bitmap at position 'page'
-			FIBITMAP *dib = FreeImage_LockPage(src, page);
-			if(dib) {
-				// add a new bitmap to dst
-				FreeImage_AppendPage(dst, dib);
-				// Unload the bitmap (do not apply any change to src)
-				FreeImage_UnlockPage(src, dib, FALSE);
-			}
-		}
-
-		// Close src
-		FreeImage_CloseMultiBitmap(src, 0);
-		// Save and close dst
-		FreeImage_CloseMultiBitmap(dst, output_flag);
-
-		return true;
-	}
-
-	return false;
-}
-
-
-int 
-main(int argc, char *argv[]) {
-
-	char *input_filename = "images\\input.tif";
-	char *output_filename = "images\\clone.tif";
-
-	// call this ONLY when linking with FreeImage as a static library
-#ifdef FREEIMAGE_LIB
-	FreeImage_Initialise();
-#endif // FREEIMAGE_LIB
-
-	// initialize our own FreeImage error handler
-
-	FreeImage_SetOutputMessage(MyMessageFunc);
-
-	// Copy 'input.tif' to 'clone.tif'
-
-	CloneMultiPage(FIF_TIFF, input_filename, output_filename, 0);
-
-	// call this ONLY when linking with FreeImage as a static library
-#ifdef FREEIMAGE_LIB
-	FreeImage_DeInitialise();
-#endif // FREEIMAGE_LIB
-
-	return 0;
-}

FreeImage/Examples/Generic/CreateAlpha.cpp

-// ==========================================================
-// Alpha channel manipulation example
-//
-// Design and implementation by 
-// - Herv� Drolon
-//
-// This file is part of FreeImage 3
-//
-// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
-// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
-// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
-// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
-// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
-// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
-// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
-// THIS DISCLAIMER.
-//
-// Use at own risk!
-// ==========================================================
-
-//   This example shows how to create a transparent image from any input image
-//   using the greyscale version of the input image as the alpha channel mask.
-//   The alpha channel is set using the FreeImage_SetChannel function.
-// 
-//
-// ==========================================================
-
-#include <stdio.h>
-#include "FreeImage.h"
-
-// ----------------------------------------------------------
-
-/** Generic image loader
-	@param lpszPathName Pointer to the full file name
-	@param flag Optional load flag constant
-	@return Returns the loaded dib if successful, returns NULL otherwise
-*/
-FIBITMAP* GenericLoader(const char* lpszPathName, int flag) {
-	FREE_IMAGE_FORMAT fif = FIF_UNKNOWN;
-
-	// check the file signature and deduce its format
-	// (the second argument is currently not used by FreeImage)
-	fif = FreeImage_GetFileType(lpszPathName, 0);
-	if(fif == FIF_UNKNOWN) {
-		// no signature ?
-		// try to guess the file format from the file extension
-		fif = FreeImage_GetFIFFromFilename(lpszPathName);
-	}
-	// check that the plugin has reading capabilities ...
-	if((fif != FIF_UNKNOWN) && FreeImage_FIFSupportsReading(fif)) {
-		// ok, let's load the file
-		FIBITMAP *dib = FreeImage_Load(fif, lpszPathName, flag);
-		// unless a bad file format, we are done !
-		return dib;
-	}
-	return NULL;
-}
-
-/** Generic image writer
-	@param dib Pointer to the dib to be saved
-	@param lpszPathName Pointer to the full file name
-	@param flag Optional save flag constant
-	@return Returns true if successful, returns false otherwise
-*/
-bool GenericWriter(FIBITMAP* dib, const char* lpszPathName, int flag) {
-	FREE_IMAGE_FORMAT fif = FIF_UNKNOWN;
-	BOOL bSuccess = FALSE;
-
-	if(dib) {
-		// try to guess the file format from the file extension
-		fif = FreeImage_GetFIFFromFilename(lpszPathName);
-		if(fif != FIF_UNKNOWN ) {
-			// check that the plugin has sufficient writing and export capabilities ...
-			WORD bpp = FreeImage_GetBPP(dib);
-			if(FreeImage_FIFSupportsWriting(fif) && FreeImage_FIFSupportsExportBPP(fif, bpp)) {
-				// ok, we can save the file
-				bSuccess = FreeImage_Save(fif, dib, lpszPathName, flag);
-				// unless an abnormal bug, we are done !
-			}
-		}
-	}
-	return (bSuccess == TRUE) ? true : false;
-}
-
-// ----------------------------------------------------------
-
-/**
-	FreeImage error handler
-	@param fif Format / Plugin responsible for the error 
-	@param message Error message
-*/
-void FreeImageErrorHandler(FREE_IMAGE_FORMAT fif, const char *message) {
-	printf("\n*** "); 
-	if(fif != FIF_UNKNOWN) {
-		printf("%s Format\n", FreeImage_GetFormatFromFIF(fif));
-	}
-	printf(message);
-	printf(" ***\n");
-}
-
-// ----------------------------------------------------------
-
-
-/**
- Creates a 32-bit transparent image using the black channel of the source image
- @param src Source image
- @return Returns a 32-bit transparent image
-*/
-FIBITMAP* CreateAlphaFromLightness(FIBITMAP *src) {
-	// create a 32-bit image from the source
-	FIBITMAP *dst = FreeImage_ConvertTo32Bits(src);
-
-	// create a 8-bit mask
-	FreeImage_Invert(src);
-	FIBITMAP *mask = FreeImage_ConvertTo8Bits(src);
-	FreeImage_Invert(src);
-
-	// insert the mask as an alpha channel
-	FreeImage_SetChannel(dst, mask, FICC_ALPHA);
-
-	// free the mask and return
-	FreeImage_Unload(mask);
-
-	return dst;
-}
-
-int 
-main(int argc, char *argv[]) {
-	
-	// call this ONLY when linking with FreeImage as a static library
-#ifdef FREEIMAGE_LIB
-	FreeImage_Initialise();
-#endif // FREEIMAGE_LIB
-
-	// initialize your own FreeImage error handler
-
-	FreeImage_SetOutputMessage(FreeImageErrorHandler);
-
-	// print version & copyright infos
-
-	printf("FreeImage version : %s", FreeImage_GetVersion());
-	printf("\n");
-	printf(FreeImage_GetCopyrightMessage());
-	printf("\n");
-
-
-	if(argc != 3) {
-		printf("Usage : CreateAlpha <input file name> <output file name>\n");
-		return 0;
-	}
-
-	// Load the source image
-	FIBITMAP *src = GenericLoader(argv[1], 0);
-	if(src) {
-		// Create a transparent image from the lightness image of src
-		FIBITMAP *dst = CreateAlphaFromLightness(src);
-
-		if(dst) {
-			// Save the destination image
-			bool bSuccess = GenericWriter(dst, argv[2], 0);
-			if(!bSuccess) {
-				printf("\nUnable to save %s file", argv[2]);
-				printf("\nThis format does not support 32-bit images");
-			}
-
-			// Free dst
-			FreeImage_Unload(dst);
-		}
-
-		// Free src
-		FreeImage_Unload(src);
-	}
-
-	// call this ONLY when linking with FreeImage as a static library
-#ifdef FREEIMAGE_LIB
-	FreeImage_DeInitialise();
-#endif // FREEIMAGE_LIB
-
-	return 0;
-}

FreeImage/Examples/Generic/FIFImportExport.cpp

-// ==========================================================
-// Plugin functions demonstration
-//
-// Design and implementation by 
-// - Herv� Drolon
-//
-// This file is part of FreeImage 3
-//
-// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
-// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
-// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
-// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
-// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
-// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
-// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
-// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
-// THIS DISCLAIMER.
-//
-// Use at own risk!
-// ==========================================================
-
-// This example shows how to use Plugin functions to explore FreeImage capabilities. 
-// Whenever an external plugin is added to the library, it is automatically loaded 
-// with FreeImage and can be asked for its capabilities via the plugin functions.
-// 
-// Functions used in this sample : 
-// FreeImage_FIFSupportsExportBPP, FreeImage_FIFSupportsICCProfiles, FreeImage_FIFSupportsReading, 
-// FreeImage_FIFSupportsWriting, FreeImage_GetFIFCount, FreeImage_GetFIFDescription, 
-// FreeImage_GetFIFExtensionList, FreeImage_GetFormatFromFIF, 
-// FreeImage_GetVersion, FreeImage_GetCopyrightMessage, FreeImage_SetOutputMessage
-//
-// ==========================================================
-
-#include <iostream.h>
-#include <fstream.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "FreeImage.h"
-
-// ----------------------------------------------------------
-
-/**
-	FreeImage error handler
-*/
-void MyMessageFunc(FREE_IMAGE_FORMAT fif, const char *message) {
-	cout << "\n*** " << message << " ***\n";
-}
-
-// ----------------------------------------------------------
-
-/**
-	Print plugins import capabilities
-*/
-void PrintImportFormats(iostream& ios) {
-	int count = FreeImage_GetFIFCount();
-	if(count)
-		ios << "FORMAT;DESCRIPTION;EXTENSIONS;ICC PROFILES\n";
-	for(int i = 0; i < count; i++) {
-		FREE_IMAGE_FORMAT fif = (FREE_IMAGE_FORMAT)i;
-
-		if(FreeImage_FIFSupportsReading(fif)) {
-			const char * format = FreeImage_GetFormatFromFIF(fif);
-			const char * description = FreeImage_GetFIFDescription(fif);
-			const char * ext = FreeImage_GetFIFExtensionList(fif);
-			const char * icc = "*";
-			if(FreeImage_FIFSupportsICCProfiles(fif)) {
-				ios << format << ";" << description << ";" << ext << ";" << icc << "\n";
-			} else {
-				ios << format << ";" << description << ";" << ext << "; \n";
-			}
-		}
-	}
-}
-
-/**
-	Print plugins export capabilities
-*/
-void PrintExportFormats(iostream& ios) {
-	int count = FreeImage_GetFIFCount();
-	if(count)
-		ios << "FORMAT;DESCRIPTION;EXTENSIONS;BITDEPTH;ICC PROFILES\n";
-	for(int i = 0; i < count; i++) {
-		FREE_IMAGE_FORMAT fif = (FREE_IMAGE_FORMAT)i;
-
-		if(FreeImage_FIFSupportsWriting(fif)) {
-			const char * format = FreeImage_GetFormatFromFIF(fif);
-			const char * description = FreeImage_GetFIFDescription(fif);
-			const char * ext = FreeImage_GetFIFExtensionList(fif);
-			const char * icc = "*";
-
-			ios << format << ";" << description << ";" << ext << ";";
-			if(FreeImage_FIFSupportsExportBPP(fif, 1))
-				ios << "1 ";
-			if(FreeImage_FIFSupportsExportBPP(fif, 4))
-				ios << "4 ";
-			if(FreeImage_FIFSupportsExportBPP(fif, 8))
-				ios << "8 ";
-			if(FreeImage_FIFSupportsExportBPP(fif, 16))
-				ios << "16 ";
-			if(FreeImage_FIFSupportsExportBPP(fif, 24))
-				ios << "24 ";
-			if(FreeImage_FIFSupportsExportBPP(fif, 32))
-				ios << "32 ";
-			if(FreeImage_FIFSupportsICCProfiles(fif)) {
-				ios << ";" << icc;
-			} else {
-				ios << "; ";
-			}
-			ios << "\n";
-		}
-	}
-}
-
-int 
-main(int argc, char *argv[]) {
-	// call this ONLY when linking with FreeImage as a static library
-#ifdef FREEIMAGE_LIB
-	FreeImage_Initialise();
-#endif // FREEIMAGE_LIB
-
-	// initialize FreeImage error handler
-
-	FreeImage_SetOutputMessage(MyMessageFunc);
-
-	// print version & copyright infos
-
-	cout << "FreeImage " << FreeImage_GetVersion() << "\n";
-	cout << FreeImage_GetCopyrightMessage() << "\n\n";
-
-	// Print input formats (including external plugins) known by the library
-	fstream importFile("fif_import.csv", ios::out);
-	PrintImportFormats(importFile);
-	importFile.close();
-
-	// Print output formats (including plugins) known by the library
-	// for each export format, supported bitdepths are given
-	fstream exportFile("fif_export.csv", ios::out);
-	PrintExportFormats(exportFile);
-	exportFile.close();
-
-	// call this ONLY when linking with FreeImage as a static library