• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

Dist/H07-May-2022-

Examples/H03-May-2022-2,2791,112

Source/H03-May-2022-676,247511,079

TestAPI/H03-May-2022-3,1741,992

Wrapper/H03-May-2022-105,09358,347

FreeImage.2013.slnH A D25-Mar-20189.5 KiB137136

FreeImage.2013.vcxprojH A D31-Jul-201824.4 KiB457457

FreeImage.2013.vcxproj.filtersH A D25-Mar-201813.8 KiB353353

FreeImage.2017.slnH A D25-Mar-20189.5 KiB137136

FreeImage.2017.vcxprojH A D31-Jul-201824.4 KiB457457

FreeImage.2017.vcxproj.filtersH A D25-Mar-201813.9 KiB356356

FreeImage.rcH A D31-Jul-20181.3 KiB4541

MakefileH A D03-Aug-2009609 3524

Makefile.cygwinH A D10-Mar-20151.5 KiB7549

Makefile.fipH A D03-May-20221.9 KiB8556

Makefile.gnuH A D03-May-20221.7 KiB8453

Makefile.iphoneH A D10-Mar-20153.5 KiB9766

Makefile.mingwH A D10-Mar-20153.5 KiB13771

Makefile.osxH A D26-Aug-20173.5 KiB11770

Makefile.solarisH A D10-Mar-20151.4 KiB6741

Makefile.srcsH A D28-Jul-201829.2 KiB75

README.iphoneH A D19-Oct-2014677 2013

README.linuxH A D07-Sep-20072 KiB5142

README.mdH A D25-Mar-2018876 107

README.minGWH A D01-Oct-20099.3 KiB237167

README.osxH A D19-Dec-20071.8 KiB4529

README.solarisH A D05-Oct-20062.4 KiB6848

clean.batH A D29-Jul-20182.5 KiB10098

clean.shH A D05-Dec-20131.6 KiB5149

fipMakefile.srcsH A D28-Jul-201817.1 KiB54

genfipsrclist.shH A D28-Jul-20181.1 KiB2416

gensrclist.shH A D28-Jul-20181.1 KiB2719

README.iphone

1Makefile for iPhone
2
3found on the web, see
4http://robertcarlsen.net/2009/03/16/openframeworks-iphone-586
5http://robertcarlsen.net/2009/03/25/openframeworks-iphone-libs-593
6http://4u.jeffcrouse.info/of/
7
8See also :
9
10Makefile for XCode 4.6 and iOS SDK 6.1
11http://sourceforge.net/p/freeimage/discussion/36109/thread/1f345192/
12
13Building the FreeImage lib for PIE and armv7
14http://forum.openframeworks.cc/t/building-the-freeimage-lib-for-pie-and-armv7/13714
15
16-----------------------------------------------------------------------------
17
18Run "make -f Makefile.iphone".
19This should build both the iPhone and iPhone Simulator libraries into the "Dist" folder.
20

README.linux

1Release Notes
2--------------
3This version of the library has been tested under the following OS:
4- RedHat Linux 7.3, 8.0 and 9.0
5- Fedora Core 2
6- SuSE Linux Enterprise 8 and SuSE 9.0.
7- Debian 4
8
9You *do not* need to have any other third party library (libjpeg, libpng, libtiff, libmng and zlib)
10installed on your /usr/lib directory in order to compile and use the library.
11FreeImage uses its own versions of these libraries. This way, you can be sure that FreeImage will
12always use the latest version of each third party library.
13
14The FreeImage makefile makes use of the gcc "-fvisibility=hidden" in order to avoid incompatibilities between
15internal third party libraries and the OS libraries. You may have to remove this option if you're running an
16old version of gcc. See also http://gcc.gnu.org/wiki/Visibility
17
18You should be able to link progams with the -lfreeimage option after the library is compiled and installed.
19You can also statically link with libfreeimage.a.
20If you use a really old version of gcc and it chokes on the CRs in the file, you can type 'make dos2unix'
21to run all of the files through dos2unix which converts CRLF to LF.  This no longer appears to be required
22for RedHat 7.3 or 9.
23
24Please let me know how this works for you under other Linux distributions or any other *nix.
25
26Herve Drolon
27FreeImage Project Manager
28
29Installation
30------------
31Note: You will need to have root privileges in order to install the library in the /usr/lib directory.
32The installation process is as simple as this :
331) Enter the FreeImage directory
342) Build the distribution :
35make
36make install
373) Clean all files produced during the build process
38make clean
39
40Compiling FreeImagePlus
41-----------------------
42FreeImagePlus is a C++ wrapper for FreeImage.
43To compile FreeImage as a C++ library, follow these steps :
441) Enter the FreeImage directory
452) Build the distribution :
46make -f Makefile.fip
47make -f Makefile.fip install
483) Clean all files produced during the build process
49make -f Makefile.fip clean
50
51

README.md

1What is FreeImage ?
2-----------------------------------------------------------------------------
3FreeImage is an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications.
4FreeImage is easy to use, fast, multithreading safe, and cross-platform (works with Windows, Linux and Mac OS X).
5
6Thanks to it's ANSI C interface, FreeImage is usable in many languages including C, C++, VB, C#, Delphi, Java and also in common scripting languages such as Perl, Python, PHP, TCL, Lua or Ruby.
7
8The library comes in two versions: a binary DLL distribution that can be linked against any WIN32/WIN64 C/C++ compiler and a source distribution.
9Workspace files for Microsoft Visual Studio provided, as well as makefiles for Linux, Mac OS X and other systems.
10

README.minGW

1=====================================================================
2Using the FreeImage library with the MinGW Compiler Suite
3=====================================================================
4
5This file describes how to use the precompiled FreeImage library
6FreeImage.dll with the MinGW port of the GNU Compiler Collection
7(GCC), how to build this library from source using MinGW and how
8to use this MinGW-built library with Microsoft Visual Studio.
9
10Contents:
11
12I. Prerequisites
13
141. Using the precompiled FreeImage library with MinGW
15
162. Building the FreeImage library with MinGW
17
183. Using the MinGW FreeImage library with Microsoft Visual Studio
19
204. Useful links
21
22
23---------------------------------------------------------------------
24I. Prerequisites
25=====================================================================
26
27The procedures described in this document have been developed and
28tested using the following free tools:
29
301. MinGW GCC Version 4.4.0 (Core and C++ including required libs)
312. MinGW GNU Binutils Version 2.19.1
323. MinGW GNU Make Version 3.81-20080326-3
334. MinGW Runtime Version 3.15.2
345. MinGW API for MS-Windows Version 3.13
356. GnuWin32 Package CoreUtils Version 5.3.0 (only for building)
367. GnuWin32 Package Sed Version 4.2 (only for creating the GCC
37   import library)*
38
39* Sed is only needed to create a GCC-native import library from
40  the MSVC import library FreeImage.lib. However, since MinGW now
41  supports linking against MSVC lib files, this process seems to
42  be obsolete. See section 1.
43
44Basically, no version dependent capabilities are used so, this
45should also work with older versions of the tools mentioned above.
46Similarly, the GnuWin32 packages (which I just prefer over MSYS)
47could likely be replaced by a properly installed MSYS environment.
48
49Furthermore, the following preconditions should be met:
50
511. The folders 'bin' under both the MinGW and the GnuWin32
52   installation directory should have been added to the PATH
53   environment variable. Likely it is best adding these
54   directories permanently to PATH through the System
55   Properties dialog on the Control Panel.
56
572. The MinGW Make package only provides a 'mingw32-make.exe'
58   executable. There is no alias 'make.exe'. However, make is
59   preconfigured to use 'make' as the default $(MAKE) command.
60   This seems to be a bug in the MinGW GNU Make distribution.
61   Thus, a copy of 'mingw32-make.exe' named 'make.exe' should
62   be placed into MinGW's 'bin' directory.
63
64
65
66---------------------------------------------------------------------
671. Using the precompiled FreeImage library with MinGW
68=====================================================================
69
70When using functions from C/C++, that reside in a DLL, the linker
71needs a so called import library, which specifies, how to
72dynamically link these external functions during runtime. However,
73different linkers use different types or formats of these import
74libraries.
75
76Since the precompiled FreeImage library was build with Microsoft
77Visual Studio, in the past, some extra work was required to use it
78from MinGW. An import library, that was compatible with GNU ld,
79must have been created first.
80
81However, for several MinGW versions, the GNU linker ld also
82supports linking against Microsoft Visual C++ import libraries
83directly. So, this effectively makes any circulating HOWTO's on
84how to create a GCC-compatible import library from a MSVC lib file
85more or less obsolete. Additionally, MinGW does not require the
86GCC/Linux usual lib prefix for libraries, so linking with MinGW
87against the precompiled FreeImage DLL is as easy as with MSVC:
88
891.) Open a DOS shell (run application cmd.exe)
90
912.) Ensure, that the 'bin' folder of MinGW is added to the PATH
92    environment variable (see Prerequisites).
93
943.) Link directly against the supplied lib file:
95
96    C:\>gcc -oFreeImageTest.exe FreeImageTest.c -lFreeImage
97
98Nonetheless, for the sake of completeness, the following steps
99describe how to create a native GCC import library:
100
1011.) Open a DOS shell (run application cmd.exe)
102
1032.) Ensure, that the 'bin' folders of both MinGW and GnuWin32 are
104    added to the PATH environment variable (see Prerequisites).
105
1063.) Create a .def file 'libfreeimage.def', that contains all symbols
107    exported by the FreeImage library:
108
109    C:\>pexports FreeImage.dll | sed "s/^_//" > libfreeimage.def
110
1114.) Create the GCC compatible import library 'libfreeimage.a':
112
113    C:\>dlltool --add-underscore -d libfreeimage.def -l libfreeimage.a
114
1155.) Use this library to link against with GCC:
116
117    C:\>gcc -oFreeImageTest.exe FreeImageTest.c -lfreeimage
118
119
120
121---------------------------------------------------------------------
1222. Building the FreeImage library with MinGW
123=====================================================================
124
125You *do not* need to have any other third party library (like
126libjpeg, libpng, libtiff, libmng and zlib and others) installed on
127your system in order to compile and use the library. FreeImage uses
128its own versions of these libraries. This way, you can be sure that
129FreeImage will always use the latest and properly tested versions
130of of these third party libraries.
131
132In order to build the FreeImage library under Windows with MinGW
133(GCC), ensure that all the prerequisites mentioned above are met.
134The MinGW makefile aims to build a Windows DLL, that differs as
135least as possible from the precompiled library that comes with the
136FreeImage distribution. Thus, the build process also includes the
137DLL version resource as well as the __stdcall attribute for all the
138exported functions, including the MSVC-like function decorations
139_FuncName@nn.
140
141When building the FreeImage DLL, of course, an import library is
142generated, too. However, this input library is not in GCC's native
143format, but in MSVC lib format, which makes it usable from both
144MinGW and Microsoft Visual Studio with no further processing.
145
146The MinGW makefile can also be used to build a static library.
147However, due to the different function export attributes needed
148for both the dynamic and the shared library (DLL), this requires
149a separate invocation of make, which in turn needs to rebuild every
150source file after switching from dynamic to static and vice versa.
151So, a 'make clean' is required each time, the library type is
152changed.
153
154The type of library to build is specified by a variable named
155FREEIMAGE_LIBRARY_TYPE, which may either be set directly in the
156Makefile.mingw near line 18 or may be specified as an environment
157variable. This variable may either take SHARED or STATIC to build
158a dynamic link library (DLL) or a static library respectively.
159Since this value is used to dynamically form the actual make target
160internally, only uppercase values are valid. Defaults to SHARED.
161
162The MinGW makefile also supports the 'install' target. However,
163this only copies the FreeImage dynamic link library (DLL) from the
164Dist folder into the %SystemRoot%\system32 folder. So, invoking this
165target only makes sense, if the DLL has been built before.
166
167Since there is neither a common system wide 'include' nor a 'lib'
168directory available under Windows, the FreeImage header file
169FreeImage.h as well as both the static library and the DLL import
170library FreeImage.lib just remain in the 'Dist' folder.
171
172The following procedure creates the FreeImage dynamic link library
173(DLL) from the sources, installs it and also creates a static
174FreeImage library:
175
1761.) Open a DOS shell (run application cmd.exe)
177
1782.) Ensure, that the 'bin' folders of both MinGW and GnuWin32 are
179    added to the PATH environment variable (see Prerequisites).
180
1813.) Create the FreeImage dynamic link library (DLL):
182
183    C:\>make
184
1854.) Install the FreeImage dynamic link library (DLL):
186
187    C:\>make install
188
1895.) Clean all files produced by the recent build process:
190
191    C:\>make clean
192
1936.) Create a static FreeImage library:
194
195    C:\>set FREEIMAGE_LIBRARY_TYPE=STATIC
196    C:\>make
197
198You should be able to link progams with the -lFreeImage option
199after the shared library is compiled and installed. You can also
200link statically against FreeImage.a from MinGW.
201
202
203
204---------------------------------------------------------------------
2053. Using the MinGW FreeImage library with Microsoft Visual Studio
206=====================================================================
207
208Since the MinGW makefile creates an import library in MSVC's lib
209format, the produced shared library (DLL) can be used from both
210MinGW and Microsoft Visual Studio with no further adaption. Just
211link to the import library FreeImage.lib from either MinGW or
212Microsoft Visual Studio.
213
214
215
216---------------------------------------------------------------------
2174. Useful links
218=====================================================================
219
220- The MinGW homepage:
221     http://www.mingw.org/
222
223- The GnuWin32 homepage:
224     http://gnuwin32.sourceforge.net/
225
226- The GCC homepage and online documentation:
227     http://gcc.gnu.org/
228     http://gcc.gnu.org/onlinedocs/
229
230- The GNU Binutils homepage and online documentation:
231     http://www.gnu.org/software/binutils/
232     http://sourceware.org/binutils/docs-2.19/
233
234- The GNU Make homepage and online documentation:
235     http://www.gnu.org/software/make/
236     http://www.gnu.org/software/make/manual/make.html
237

README.osx

1Release Notes
2--------------
3This version of the library has been tested under OSX 10.3.9 PPC and OSX 10.4.8 Intel.
4
5While the makefiles will make a .dylib and a .a, it is recommended to simply staticly link with the .a file.
6
7FreeImage is now built as a Universal Binary and targets the 10.3.9 SDK for PPC and the 10.4u SDK for i386.
8This means that you must have both of these SDKs installed and that you must be running on OSX 10.4+ to build FreeImage.
9The library will run on 10.3 PPC, but probably not 10.2 or below anymore. wchar.h did not exist on 10.2.
10
11FreeImage is now built with gcc 4.0 and will thus only run on 10.3.9 or above (some libraries may not exist on 10.3.8 and below).
12
13The FreeImage makefile makes use of the gcc "-fvisibility=hidden" in order to avoid incompatibilities between
14internal third party libraries and the OS libraries. This feature is available with gcc 4 or greater.
15
16
17Ryan Rubley
18
19Building the Library
20--------------------
21Makefile detects the environment by calling 'uname'. Assuming this reports 'Darwin' on your system, Makefile will automatically
22defer commands to Makefile.osx. If this doesn't work, type 'make -f Makefile.osx' in place of just 'make'
23
24The build process is as simple as this:
251) Enter the FreeImage directory
262) Build the distribution:
27make
283) The libraries and header will be in the Dist directory when the build is finished
29
30To install FreeImage in the /usr/local/lib and /usr/local/include directories (not recommended):
31make install
32
33To clean all files produced during the build process:
34make clean
35
36
37Additional notes
38----------------
39
40Building on Mac OS X Leopard :
41
42Install the xcode dev tools from the Leopard disk.
43When installing the dev tools make sure to have installed 10.3.9 SDK (it's not selected by default).
44
45

README.solaris

1Release Notes
2--------------
3Hey folks,
4
5I just went through the process of building and using the freeimage library
6on Solaris 9.  Things don't work out of the box so I thought I would share my
7experiences in case someone else wants to do the same.
8
9I'm using Solaris 9, and I have installed all the development libraries, make,
10and the gcc 3.3.2 found on sunfreeware.com.
11
12You have to use the make from sunfreeware because the Solaris 9 make program
13chokes hard on FreeImages makefiles.
14
15First thing I had to do was modify the main FreeImage makefile:
16
171. go to the $(SHAREDLIB): line and replace the $(CC) line with the following.
18(there are 2 corrections)
19
20$(CC) -s -G -Wl,-soname=$(LIBNAME) -o $@ $(MODULES) $(LIBRARIES)
21
22The two changes are -G instead of -shared, and the = sign instead of a comma
23after the -soname.
24
252. change INSTALLDIR = /usr/lib to INSTALLDIR = /usr/local/lib
26
27This is because the sunfreeware tools assume the libs being built will reside
28in /usr/local/lib and thus set the default linker search paths to that.  Another
29solution for this would be to use the -R and -L linker options, but I chose
30the easy way :)
31
32That's it!  You can now use freeimage.
33
34Also, if you have an autoconf/automake project that links against FreeImage,
35you can use the following in your configure.in, it works rather well for me:
36
37AC_CHECK_LIB(freeimage-3.5.0, FreeImage_Initialise, [],
38                                 [AC_MSG_ERROR([libfreeimage-3.5.0.so required and missing. See
39http://freeimage.sourceforge.net.]) ])
40
41the AC_CHECK_LIB macro will not only find the library, it will automatically
42link against it as well so you dont have to add it to your Makefile.am.
43
44I hope this helps someone!
45
46---
47ogtharox at users.sourceforge.net
48
49
50Installation
51------------
52Note: You will need to have root privileges in order to install the library in the /usr/local/lib directory.
53The installation process is as simple as this :
541) Enter the FreeImage directory
552) Build the distribution :
56make -f Makefile.solaris
57make -f Makefile.solaris install
583) Clean all files produced during the build process
59make -f Makefile.solaris clean
60
61Release Notes for Solaris/Sparc
62--------------------------------
63Under Solaris/Sparc, you will need to modify the following line :
64COMPILERFLAGS = -O3
65modified into
66COMPILERFLAGS = -O3 -DBYTE_ORDER=BIG_ENDIAN -D__BIG_ENDIAN__
67
68