this is basically a design document version - it sets the scenery for upcoming additions

This commit is contained in:
Hartmut Seichter 2018-04-02 01:06:50 +02:00
parent 32aac45162
commit 550d27273f
1504 changed files with 1051518 additions and 127 deletions

View file

@ -0,0 +1,4 @@
The main programmer is Denton Woods, but this could not have been possible
without contributions and some pieces of code from other projects.
For contributors and credits, read the CREDITS file.

View file

@ -0,0 +1,506 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View file

@ -0,0 +1,264 @@
Credits as of 02/06/2009
------------------------
If I inadvertently omitted anyone's name from this list, please e-mail me at
doomwiz@users.sourceforge.net to remedy the problem.
James Joplin, alias jayjay (rjoplin@webzone.net)
for all his invaluable help and encouragement with DevIL.
Edouard Gomez for his invaluable help.
All the #flipCode gang for their support.
All my friends at uni for their support.
SoftImage .pic support based off of code obtained from
http://www.swin.edu.au/astronomy/pbourke/dataformats/
TestPic, used in TestIL
http://www.paintlib.de/paintlib/testpic.zip
Png Test Images
http://www.schaik.com/pngsuite/pngsuite.html
John Villar (john.villar@eliaschev.com) for making the suggestion of not
letting the user use ILimage structs but instead binding images like OpenGL.
He also made a suggestion on how to load luminance .jpg images, along with
other suggestions.
http://www.opengl.org/Coding/KilgardTechniques/oglpitfall/oglpitfall.html
section 6 for the values the NTSC uses, so I could convert from coloured
images to luminance values.
Kodak Photo CD code from the .pcd link on http://www.wotsit.org.
Foper (foper@hotmail.com) from #flipCode for supplying the excellent
flipcode.jpg in testil\in. The original can be found at
http://webpatterns.com/flip/flipshow.htm
Lightman (cdthompson@home.net) from #flipCode for restructuring the project
into /bin, /obj, etc.
Alexander Blach (alexander@abee.de) from #flipCode for creating the Delphi
headers and test app. He figured out that we needed to use .def files to
prevent name decoration of the dlls. He has contributed multiple ideas and
found flaws. Alexander also created a lovely documentation database to help
with documenting DevIL.
Randy Heit for finding problems in my Doom texture code.
Oliver Kurowski (oliver.kurowski@gmx.de) for locating a bug in ilut's
DllMain() and another very harmful bug with ilDeleteImages().
Ender Wiggin's article on "Elementary Digital Filtering",
found at http://www.gamedev.net/reference/programming/features/edf/
for many filters in DevIL.
SGI's "Graphica Obscura" site at http://www.sgi.com/grafica/matrix/index.html
for several filters in DevIL.
The http://bae.fse.missouri.edu/luw/course/image/project1/project1.html
page for help in determining filter code for Graphica Obscura's interpolation
article at http://www.sgi.com/grafica/interp/index.html.
Matt Denham for suggesting optimizations in ilNegativeImage(),
iluEdgeDetectS() and iluEdgeDetectP().
Timo Heister (Timo-Heister@gmx.de) from #flipCode for creating the original
Visual Basic headers and test apps for VB.
The OpenGL SuperBible for code for ilutGetHPal().
DJ Luminescent (luminescent@uswest.net) for finding a couple of bugs in the
.bmp-loading code and diligently beta testing.
Lionel Brits, alias Zaewo from #flipCode for slapping me around and telling
me how Microsoft does their .bmp padding. He then wrote most of the
iluEqualize() code from the base code on
http://www.manning.com/Kabir/Files.html .
Joel Wilsson, alias Siigron (siigron@hotmail.com) for pointing-out several
design flaws that I (Denton) had introduced and posing very useful
suggestions.
Sean Montgomery, alias Vapor (sean@astralfx.com) for patiently listening to
my endless drivel about DevIL.
Perlin Noise site http://freespace.virgin.net/hugo.elias/models/m_perlin.htm
for information on interpolation used in iluScale().
Shimon Shvartsbroit, alias MasterBoy (cobra11@netvision.net.il) from #flipCode
for explaining bilinear interpolation to me.
Lbm source from http://www.wotsit.org
Eran Kampf, alias ttentacle (ekampf@internet-zahav.net) for giving me
resource-loading code for ilutLoadResource and helping with the Windows
clipboard functions.
Strumpf from #flipCode for writing a really good DirectDraw class for me to
use in the DDraw test, which is based off of his test, too.
NullSoft (http://www.nullsoft.com), for their SuperPiMP installer. It is
extremely easy to learn to use and very powerful.
Serun from #flipCode for noticing that Quake2 .pcx files sometimes don't have
the checksum byte for palette'd .pcx files.
Conor Stokes, aka DirtyPunk from #flipCode for helping explain several things
to me.
Half-Life model viewer sources (at http://www.swissquake.ch/chumbalum-soft/)
for specs for the Half-Life model format.
Rich Schwab, alias endura (endura29@hotmail.com) for contributing
girlfriend.cpp.
The Djgpp libc sources (http://www.delorie.com/djgpp), from where I copied
several functions.
Roman Podobedov (romka@ut.ee) of Romka Graphics (http://romka.demonews.com)
for his colour quantization sources, which he was kind enough to let me use.
Pcx document on http://www.wotsit.org for .pcx saving code.
http://www-classic.be.com/aboutbe/benewsletter/volume_III/Issue2.html#Insight
for iluWave().
.lif specs from http://www.infinite-mass.com/bob/files/lifed.zip and
http://www.infinite-mass.com/bob/files/lif.zip
Rune Kock (rune@vupti.com) for writing the new Visual Basic headers and for
finding a return bug in iluScaleAdvanced.
Julien Verchere and Xavier Decoret for suggesting that I use const char*'s
instead of char*'s as function parameters.
Jason Reeve (jason@retribution-entertainment.com) for finding a bug in iluCrop,
several origin-related problems, and helping me bring my targa-loading code up
to spec.
Darren Adams for telling me the #pragmas to use in MSVC++ to disable the
console window in a "console app".
David Gould for getting onto me about my crappy Linux support.
David Galeano for his DX8 Surface to TGA code, modified to save to any texture.
The original can be found at http://rt000s2p.eresmas.net/downloads.htm
RLE code from TrueVision's TGA sample code available as Tgautils.zip at
ftp://ftp.truevision.com/pub/TGA.File.Format.Spec/PC.Version/
Jeroen Janssen for creating a Mandrake RPM patch for DevIL.
Greg Priem for his help with supporting libungif and some various other things.
Nelson Rush for SDL surface support and finding several bugs with DevIL.
George McBay for his wonderful help finding bugs in my mipmapping code.
Marco Kögler for finding bugs in my .jpg and .png code.
Falco Kleinschmidt for fixing problems with the Linux makefiles.
Olivier Bucher for finding a bug in saving 8-bit .bmp files.
Derek Wills for noticing a problem with ilutGLScreenie when the screen width is
not a multiple of 4.
Dale Schumacher's "Filtered Image Rescaling" code in Graphic Gems III for some
scaling algorithms in ILU.
Kevin Park for making some suggestions on the ilImage C++ wrapper.
Alessandro Pedretti for finding a bug in my TIFF code and making suggestions
about portability issues.
boostrlns from #flipCode for finding the ilutGLLoadImage bug in the 1.1.5
release.
Ismo Kärkkäinen (iak@cs.joensuu.fi) for making some really nice new makefiles
for Linux.
Kishan (http://www.hackorama.com) for the nice directions on how to compile
the external libraries under Linux.
Wojciech Sobczuk for creating FreeBSD versions of the makefiles.
nVidia for code to load .DDS files available at
http://www.nvidia.com/view.asp?IO=dxtc_decompression_code
PixiGreg for noticing that many viewers don't like .bmp files with negative
heights (flipped), even though the specs say that it is valid.
Matthias Stiller and Andre Normann for their invaluable help with getting
DevIL to work on Big Endian machines.
Jean-Francois Richard for the Python bindings of DevIL.
Nick Marley for post-build information in MSVC++.
Kenneth Hurley for his help in expanding and fixing my DDS code.
Mark Callow for EXIF-loading and saving code, along with il[Load/Save]FromJpegStruct
Sam for several fixes to my .bmp and .jpg loaders.
chris79 for his help debugging my .psp and .gif code in several versions.
Nick Marley for his MSVC++ post-build fixes.
Marc Gregoire for sending images that DevIL would not load.
Alberto Barbati for noticing that the IL_NEU_QUANT_SAMPLE mode wasn't being used properly.
Ryan Butterfoss for his contributions to the DDS saving code.
Computer Graphics (C Version) book by Hearn and Baker for the arbitrary polygon filling code.
Nicolas Weber
Meloni Dario
Erick Tryzelaar
Matej Tyc for completely redoing the Linux makefile system and rewriting the documentation.
Matevz Tadel for fixing makefile for Scientific Linux.
Richard Sim for contributing several fixes, especially for .psd loading
robin_charlton for contributing a patch for Windows BMP support in ILUT.
Vincent Richomme for DirectX Mobile support
Antibyte for DDS save bugfix
Stefan Cornelius, Secunia Research, for finding some buffer overflow vulnerabilities.
Nico Golde for finding that my fix for the above vulnerability was not totally complete.
GAIA (Group for Artificial Intelligence Applications) for contributions including .iff-loading
and redoing the ilutConvertToHBitmap code. Their changes are at
http://gaia.fdi.ucm.es/grupo/projects/javy/devzone.html#DevILNotes.
Jesse Maurais for support of X11 component
Translations:
-------------
Carlos Aragonés, for Spanish translation
Bart De Lathouwer, for Danish translation
Osamu Ohara, for English translation
Abdullah Alshammari, for Arabic translation
Osamu Ohara, for Japanese translation
Andreas Stöckel, for German translation

View file

@ -0,0 +1,604 @@
2009-03-08 Matěj Týč <bubla@users.sf.net>
* docs/Makefile.am: Fixed distcheck by overriding dvi target.
* lib/Makefile.am: Renoved ilu_mipmap.h file
* configure.ac: Added option to disable checks for 'nvidia texture tools' and
'libsquish'
2009-03-08 Denton Woods <doomwiz@users.sf.net>
* il_ilbm.c:410: Changed to IL_BGR from IL_RGB.
* il_iff.c (ilLoadIffF/ilLoadIffL): Changed to call Lbm loading functions
if Iff loading fails, since they both can have the .iff extension.
* il_ilbm.c:416: Added origin reference.
* configure.ac: Added more file formats to the format checks.
* Makefile.am: Removed ilu_mipmap.h. Added ilu_error-french.h.
2009-03-07 Denton Woods <doomwiz@users.sf.net>
* Updated version numbers to 1.7.8 project-wide.
* DevIL_manual.texi: Added several file formats to the appendix.
* il_io.c: Updated Doxygen comments for loading/saving functions.
* libraries.txt: Updated with new libraries.
* il_io.c (ilTypeFromExt): Changed return value of FITS files to IL_FITS.
Added DICOM, FTX, Rot and Texture checks.
* il_states.c/.h: Updated with newer file formats.
* il_blp.c:649: Fixed ilNewImageFull call to use color index.
659: Fixed memcpy from base image to new mipmap.
* il_dcx.c, il_exr.cpp and many more: Checks return value of ilFixImage now.
* il_iff.c:271: Got rid of ilConvertImage call.
2009-03-06 Denton Woods <doomwiz@users.sf.net>
* Updated VC8 projects to use il_mp3.c.
* il.h: Added description to IL_WDP.
2009-03-05 Denton Woods <doomwiz@users.sf.net>
* il_mp3.c: Added this file.
* il_io.c: Added loading calls for .mp3 files.
* il_internal.h: Added .mp3 loading declarations.
* Makefile.am: Added il_mp3.c to source line.
* il.h: Added IL_MP3 define.
2009-03-04 Denton Woods <doomwiz@users.sf.net>
* il_utx.cpp: Started cleanup of file using C++ constructs.
* Updated VC8 projects to use il_utx.cpp.
2009-03-03 Denton Woods <doomwiz@users.sf.net>
* ilu_error-french.h: Added French translation of errors.
* ilu.h: Added ILU_FRENCH define.
* Changed il_utx.c to il_utx.cpp.
2009-03-02 Denton Woods <doomwiz@users.sf.net>
* il_utx.c: Added DXT1 loading in UTX files.
* il_utx.h: Added this file.
* lib/Makefile.am: Added il_utx.h to include line.
* il_utx.c: Fixed loading of larger images.
* windows_example.rc: Fixed accelerator for menu.
2009-03-01 Denton Woods <doomwiz@users.sf.net>
* il_utx.c: Added this file.
* lib/Makefile.am: Added il_utx.c to source line.
* il_internal.h: Added .utx loading declarations.
* il_io.c: Added loading calls for .utx files.
2009-02-28 Denton Woods <doomwiz@users.sf.net>
* il_states.c / il_states.h: Added ilVtfCompression to IL_STATES.
* il_vtf.c: Added more formats to saving.
* il.h: Added IL_VTF_COMP define.
* il_io.c: Added saving calls for .vtf files.
* il_dds.c: Added DecompressARGB16 to load a2r10g10b10 and a2b10g10r10 formats.
* il_convbuff (iSwitchTypes): Added several missing break statements.
* il_convbuff:1988: Changed to check types instead of bpc.
2009-02-27 Denton Woods <doomwiz@users.sf.net>
* il_dpx.c / il_dpx.h: Got basic dpx loading working.
* WindowsTest.cpp: Fixed memory leak when loading files.
* il_vtf.c (iGetVtfHead): Added support for headers of 64 bytes.
* il_iwi.c (iLoadIwiInternal): Added IL_INVALID_FILE_HEADER error.
* il_vtf.c: Added VTF writing functions.
2009-02-26 Denton Woods <doomwiz@users.sf.net>
* configure.ac, lib/Makefile.am, il.h, il_internal.h, il_ilbm.c, il_io.c: Added
patch from Ben Campbell for ILBM files at
https://sourceforge.net/tracker2/index.php?func=detail&aid=2635333&group_id=4470&atid=304470.
* il_dpx.c / il_dpx.h: Added these files.
* lib/Makefile.am: Added il_dpx.c and il_dpx.h to source/include lines.
* il_internal.h: Added .dpx loading declarations.
* il_io.c: Added loading calls for .dpx files.
2009-02-25 Denton Woods <doomwiz@users.sf.net>
* il_iwi.c:329: Changed IL_MAX parameter from 16 to 8 (copy+paste error).
* WindowsTest.cpp: Added mipmap functionality to 0-9 keys (0 goes to main image).
2009-02-24 Denton Woods <doomwiz@users.sf.net>
* vc9 Unicode projects: Changed settings to use x64 and x86 directories for .obj files.
* test/in: Removed this directory.
* Added "Test Images" to SVN.
* il_dds.c (DecompressFloat): Added proper support for G16B16, G32B32, R16 and R32 images.
2009-02-23 Denton Woods <doomwiz@users.sf.net>
* il_pnm.c: Fixed bug at https://sourceforge.net/forum/message.php?msg_id=6491617 -
Changed order of lines 448 and 450.
2009-02-22 Denton Woods <doomwiz@users.sf.net>
* il_internal.h: Added IL_NO_EXTLIBS define.
* il_dds-save.c: Removed unused variables.
* ilu_mipmap.c: Finished redoing all mipmap functions.
* ilu_mipmap.h: Removed this file.
2009-02-21 Denton Woods <doomwiz@users.sf.net>
* ilu_mipmap.c: Redid mipmap functions to use iluScale functions instead of nearest.
2009-02-20 Matěj Týč <bubla@users.sf.net>
* docs/Makefile.am,docs/Devil_manual.texi: Added new ILU images to the
manual, set the manual license to GFDL.
* testil, ilur: Licensed under GPL v3
2009-02-19 Denton Woods <doomwiz@users.sf.net>
* windows_example\resources: Added DevIL Logo.ico, removed OpenIL Logo.ico.
* windows_example\resource.h: Changed to use DevIL Logo.ico.
* il_io.c (ilSaveL): Fixed bug where return type was cast to 1 byte.
2009-02-18 Denton Woods <doomwiz@users.sf.net>
* configure.ac: Added descriptions of more image formats.
* il_ftx.c (iLoadFtxInternal): Changed to load all FTX images as RGBA.
2009-02-17 Denton Woods <doomwiz@users.sf.net>
* ilu_mipmap.c: Changed all references of Next to Mipmaps to fix bug noticed at
https://sourceforge.net/forum/message.php?msg_id=6443698.
* Added support for IL_NO_GAMES in il_internal.h.
2009-02-17 Matěj Týč <bubla@users.sf.net>
* configure.ac, m4/devil-definitions.m4 (TEST_FORMAT): Added an option
to describe image formats.
2009-02-16 Matěj Týč <bubla@users.sf.net>
* src-ILU/ilur: Made ilur independent on regex.h
* autogen.sh: Simplified autotools invocation to autoreconf only
* configure.ac: Added support for IL_NO_GAMES if users don't want
support for game formats
* docs/DevIL_manual.texi: Fixed errors causing trouble when making
info files + some minor syntax enhancements.
2009-02-16 Denton Woods <doomwiz@users.sf.net>
* il_manip.c (ilGetAlpha): Added IL_ALPHA case.
* il_manip.c (ilSetAlpha): Cleaned up formatting. Added IL_ALPHA case.
Fixed casting issue in integer case.
* il_texture.c: Added this file and the simple .texture loading.
* lib/Makefile.am and src-IL/src/Makefile.am: Added il_texture.c to source line.
* il.h: Added IL_TEXTURE define.
* il_internal.h: Added .texture loading declarations.
* DevIL.nb: Removed the test image from the notebook to drop it from over 9MB to 4.5KB.
2009-02-15 Denton Woods <doomwiz@users.sf.net>
* il_blp.c (iLoadBlpInternal): Finished testing and fixed BLP2 RAW with 1-bit alpha.
* il_dicom.c: Added this file.
* config.h.win: Added defines for new image formats.
* il_io.c / il_jp2.c: Added .jpx, .j2k and .j2c extensions for JPEG 2000.
* il_io.c / il_jpeg.c: Added .jif and .jfif extensions for JPEG.
* il_dicom.c: Added DICOM loading for uncompressed formats and little endian data.
* lib/Makefile.am and src-IL/src/Makefile.am: Added il_dicom.c to source line.
* il_dicom.c: Added DICOM support for big endian data.
* test/in/tiff: Removed this directory.
* il_rot.c: Added this file. Added .rot loading.
* lib/Makefile.am and src-IL/src/Makefile.am: Added il_rot.c to source line.
* il.h: Added IL_ROT define.
* il_internal.h: Added Rot loading declarations.
2009-02-15 Matěj Týč <bubla@users.sf.net>
* src-ILU/ilur: Added the ilur - commandline ILU frontend
* bin, examples/Makefile.am: Moved examples's Makefile.am to bin
directory. Added ilur to it.
* docs/DevIL_manual.texi: Made slight syntax corrections, fixed the
sample program and added functions index
2009-02-14 Denton Woods <doomwiz@users.sf.net>
* il_blp.c (iLoadBlp1): Support for mipmaps added.
* il_gif.h: Moved iCopyPalette declaration out of here into il_internal.h.
* il_gif.c: Moved iCopyPalette definition out of here into il_pal.c.
* projects/Mathematica: Added this folder.
* il_fits.c (iCheckFits): Implemented this.
* il_fits.c (iLoadFitsInternal): Renormalized float and double data.
* il_blp.c (iLoadBlp1): Added seeks to image data (not necessarily following palette).
* il_blp.c (iLoadBlpInternal): Added loading for BLP2 RAW with 1-bit alpha.
2009-02-13 Denton Woods <doomwiz@users.sf.net>
* WindowsTest.cpp: Added slideshow capabilities with Page Up and Page Down.
* il_jpeg.c:357: Added ilFixImage call.
* il_jpeg.c (ilLoadFromJpegStruct): Changed return value to the return of ilFixImage.
* il_blp.c:466-467: Fixed to read these images properly.
* WindowsTest Project: Changed x64 debug to use runtime library debug DLLs.
2009-02-12 Denton Woods <doomwiz@users.sf.net>
* il_ftx.c: Added this file.
* lib/Makefile.am and src-IL/src/Makefile.am: Added il_ftx.c to source line.
* il_io.c: Added Ftx loading function calls.
* il_blp.c: Added BLP1-loading functions.
2009-02-11 Denton Woods <doomwiz@users.sf.net>
* il_jpeg.c (ilSaveJpegL): Changed the itellw call to after iSetOutputLump
(was returning bad values, since the lump was not set yet).
* il_io.c (ilSaveL): Changed return value to Ret and got rid of IL_FALSE check.
* il_bmp.c, il_dds-save.c, il_hdr.c, il_jp2.c, il_pcx.c, il_png.c, il_pnm.c, il_psd.c, il_raw.c,
il_sgi.c, il_wbmp.c: Fixed same problem that il_jpeg.c had with saving lumps.
* il_sgi.c: Put header on file.
* il_iwi.c:337: Removed this line, which called iread a second time for CompData.
2009-02-10 Denton Woods <doomwiz@users.sf.net>
* il_io.c: Added ilLoadBlp calls in il_io.c.
* VC9 projects: Turned off x64 incremental linking to prevent debugging problems described here:
http://stackoverflow.com/questions/218747/msvcr90ddll-not-found-in-debug-mode-with-visual-c-2008
* il_blp.c: Added code to read BLP2 files.
2009-02-09 Denton Woods <doomwiz@users.sf.net>
* ilu_scale2d.c (iluScale2DBilinear_): Started rewrite, since results were really ugly.
* il_iwi.c / il_vtf.c: Changed max references to IL_MAX.
* il_wdp.c: Redid all of the code so that it actually works now.
* il_internal.h:42-46: Added lines to define IL_NO_WDP if not in Windows.
* il_io.c: Added Iwi and Fits loading calls.
* il.h: Added IL_BLP and IL_DICOM. Switched IL_DICOM and IL_IWI defines.
* il_internal.h: Added Blp and Dicom function defines.
* il_blp.c: Added this file and started code.
* lib/Makefile.am and src-IL/src/Makefile.am: Added il_blp.c to source line.
2009-02-09 Matěj Týč <bubla@users.sf.net>
* tests/testil.c: Added checks what IL loading/saving routines ended
* build system: Removed --enable-monolithic option.
2009-02-07/08 Denton Woods <doomwiz@users.sf.net>
* il_iwi.c: Added this file and code to load .iwi files.
* il_vtf.c (iLoadVtfInternal): Added checks for CompData == NULL.
* il_dds.c/il_dds.h: Changed CompFormat to a local variable. Renamed Decompress to DdsDecompress.
* ChangeLog (this file): Changed order to newest at the top.
* il.h: Added IL_FITS and IL_IWI defines.
* config.h.win: Added IL_FITS, IL_IWI, IL_SUN and IL_TPL.
* lib/Makefile.am and src-IL/src/Makefile.am: Added il_fits.c and il_iwi.c to source line.
--- 1.7.7 release ---
2009-02-06 Matěj Týč <bubla@users.sf.net>
* configure.ac, lib/Makefile.am: Added explicit linking with libm
library + fixed the ilut_x11.c file conditions of compilation
* examples/Makefile.am + IL examples, test/Makefile.am + testil: Added
conditional compilation option when compiling only with IL (without
ILU, iluErrorString() absence workaround)
2009-02-06 Denton Woods <doomwiz@users.sf.net>
* README.win and README.unix: Updated with Cygwin/MinGW instructions.
2009-02-05 Denton Woods <doomwiz@users.sf.net>
* il_tga.c: Fixed bug loading malformed RLE Targa images.
* il_rle.c:20: Changed size_t cast to ILint to resolve compiler warning.
* il.def: Added definitions.
* Updated version numbers to 1.7.7 everywhere.
2009-02-04 Denton Woods <doomwiz@users.sf.net>
* ilut_opengl.c:160: Changed checks to see if less than 0.
* il_fits.c: Got this reading FITS files properly.
2009-02-04 Matěj Týč <bubla@users.sf.net>
* configure.ac: Corrected handling of --enable-debug options, added
working install support for pkg-config
* data/Makefile.am, *.pc.in: Corrected pkg-config files
2009-02-03 Denton Woods <doomwiz@users.sf.net>
* il_io.c: Updated Doxygen comments.
* il_fits.c: Added this file (not in any projects yet).
* il_fits.c: Wrote beginning of FITS loading code.
2009-02-02 Denton Woods <doomwiz@users.sf.net>
* il_manip.c (ilCopyPixels):311: Added check for destination format of color index.
* il_convbuff.c (ilConvertBuffer): Changed to accept the source image palette. Added code to
convert from buffers that are related to a palette before the large switch.
* il_alloc.c (ifree): Changed so that if Ptr == NULL, it does not try to free the pointer.
* il_nvidia.cpp/il_squish.cpp: Added empty functions if nVidia or libsquish support is not
compiled in.
* test/format_test/testil.c:5: Added _USE_MATH_DEFINES.
2009-02-01 Matěj Týč <bubla@users.sf.net>
* test/format_test: Tweaked the script to use wine if cross-compiling
to run the tests, extended testil capabilities
* m4/devil-definitions.m4: Fixed bugs that caused that you couldn't
disable support for some formats no matter what :-)
* m4/devil-api-checks.m4: Added Xrender build support (by Jesse Maurais)
2009-02-01 Denton Woods <doomwiz@users.sf.net>
* devil_internal_exports.h: Commented members of ILimage struct using Doxygen-style comments.
Removed deprecated, commented-out members (NumNext, NumLayers, NumMips).
* Updated several functions with appropriate Doxygen comments.
* il.h: Updated IL_XXX file format defines with Doxygen comments.
* ilu_rotate.c: Changed min/max calls to IL_MIN/IL_MAX.
* ilut_states.c (ilutSetInteger): Fixed ILUT_MAXTEX_DEPTH call and added checks around first
three calls for Param >= 1.
2009-01-31 Denton Woods <doomwiz@users.sf.net>
* Added newlines to the end of several files to keep gcc quiet.
* Added new MSVC++ projects for examples.
* il_bmp.c:556: Changed to Header->biWidth from iCurImage->Width. iCurImage->Width was not
updated to the new width at this point.
* il_rotate.c (iluRotate_): Rewrote to fix 1 pixel shifting issue.
* Updated DevIL Manual with new ilSaveL information.
* il_stack.c (ilCloseImage): Added missing delete of Faces member.
* il_dds-save.c (ilCompressDXT): Added this function.
* il.h: Removed ilNVidiaCompressDXT and ilSquishCompressDXT - moved to il_internal.h.
* il_dds-save.c:151: Changed to Faces from Images.
* il_dds-save.c (CompressTo565): Added IL_ALPHA case.
* Updated DevIL Manual with new DXTC information.
2009-01-30 Denton Woods <doomwiz@users.sf.net>
* Added DevIL.NET to projects folder.
* il_dds.c: Changed Image->Next code for cubemaps to read Image->Faces. Also changed Image->Next
code for mipmaps to read Image->Mipmaps, even further down the chain.
* il_dds.c (ilTexImageDxtc): Added call to ilCloseImage for Image->Faces.
* il_endian.h:113: Fixed bug #2545848 - inline GCC ASM changed.
* ilut_directx9.c (ilutD3D9CubeTexture): Changed ->Next to ->Faces.
* ilut_directx9.c (iD3D9CreateMipmaps): Changed ->Next to ->Mipmaps.
* il_states.c:605: Changed from ->Next to ->Mipmaps.
* il_states.c (iGetActiveNum): Rewrote to not use ->Next pointer for everything.
* il_vtf.c (VtfInitMipmaps): Changed to reflect the new mipmap arrangement as well.
* il_wal.c:141,142: Changed ->Next to ->Mipmaps.
* il_wal.c: Cleaned up the formatting a bit.
* il_stack.c (ilActiveMipmap): Changed ->Next to ->Mipmaps.
* il_stack.c (ilActiveImage/Mipmap/Face/Layer): Added another check for NULL, changed error.
Changed order of statements in for loop. This leads to much much less in the way of
ilSetError calls, since we do not have iCurImage == NULL.
* il_vtf.h:43: Changed to ILuint from ILint.
* il_vtf.c: Changed VtfInitMipmaps calls to VtfInitFacesMipmaps calls and changed iLoadVtfInternal
to support environment maps.
* il.h:384: Added IL_SPHEREMAP.
* il_hdr.c:467: Changed to char* to get OS X to stop issuing a warning.
* il_size.c:53: Changed return value to ILuint.
* devil_cpp_wrapper.hpp: Removed MSVC++ #pragma at the top for deprecated lib.
2009-01-28 Denton Woods <doomwiz@users.sf.net>
* il_tpl.c: Added line 219.
2009-01-27 Denton Woods <doomwiz@users.sf.net>
* il_bits.c (bseek): Changed check for return values of iseek.
* il_tpl.c: Added support for many more TPL data formats.
* il_tpl.c: Added support for color indexed data formats.
* il_tpl.c: Added support for multiple images in a file.
* il_sdl.c (ilutConvertToSDLSurface): Overhauled this code.
* ilut_opengl.c: Removed iGLSetMaxW/H/D and MaxTexW/H/D.
* ilut_states.h/ilut_states.c: Added MaxTexW/H/D to ILUT_STATES.
* ilut_states.c (ilutGetIntegerv): Added ILUT_MAXTEX_WIDTH/HEIGHT/DEPTH.
2009-01-26 Denton Woods <doomwiz@users.sf.net>
* projects/win mobile: Added Windows Mobile projects.
* Removed .cvsignore files from SVN.
* il_bits.c:65: Commented out icloser call.
* include/IL/DevIL.i: Removed IL/ prefix on header filenames.
* include/IL/build-python and build-lua: Updated paths.
* projects folder: Renamed msvc to msvc9.
* il_tpl.c: Added for TPL support.
* il_io.c: Added function calls for TPL support.
* il_internal.h: Added declarations for TPL support.
2009-01-25 Denton Woods <doomwiz@users.sf.net>
* ilut_internal.h:63-67: Redid definitions of IL_TEXT to coincide with il_internal.h.
* il_states.c: Updated _ilLoadExt/_ilSaveExt with all extensions.
* il_states.h: Updated with all extensions.
* All image formats with saving: Changed return values of ilSaveXxxF and ilSaveXxxL to be
an integer stating the number of bytes written. This is what ilSaveF/L have been
trying to return all along.
* il_pal.c:1075: Added error condition.
* lib/Makefile.am: Added il_size.c.
* simple.c: Added iluInit call.
* il_dds-save.c (GetAlphaBlock): Applied code from GetBlock, since it was still reading out of bounds.
* il_psd.c (ParseResources):808: Added check for ResourceSize being too small.
834-837: Added check to insure that we are not copying from past the end of Resource.
* il_hdr.c:527-528: Changed order so that beg_run+run_count is tested first.
* il_psd.c:829: Subtracted an additional 4 for the Size obtained in the lines before.
* il_jp2.c:792-792: Added cleanup code if failure. 676-680: Added call to jas_init.
Added code throughout to prevent from having to initialize Jasper more than once.
* il_internal.h/il_internal.c: Added strdup for Windows CE.
* il_internal.h:105-107: Added so that we do not try to compile inline ASM with Windows Mobile.
2009-01-24 Denton Woods <doomwiz@users.sf.net>
* il_internal.h,il_tiff.c: Changed ilSaveTiffL to void* instead of const void*.
* il_tiff.c: Added _tiffFileReadProcW. Changed _tiffFileSeekProc(W) to return the
result of itellw instead of tOff. This allows us to finally overload the TIFF
writing code.
* il_internal.h: Removed #pragma comments, which were commented out anyway.
* il_io.c (ilSaveL): Added call to ilDetermineSize.
* il_size.c: Added this file.
* il_manip.c:14: Removed #include <IL/il.h>.
* il_jpeg.c:53: Added check for IL_USE_IJL.
* il_exr.cpp:319,329: Changed to write functions instead of read.
* il_files.c: Added iSetOutputFake.
* il_files.c (iSetOutputLump): Added check for NULL to accommodate ilDetermineSize function.
* il_hdr.c:457: Changed from char* to ILbyte*.
* il_icns.h:24,30: Changed from ILbyte to char.
* il_size.c: Added #ifdefs for when user has declared IL_NO_XXX. Changed error to ENUM instead of PARAM.
* Updated MSVC8 projects with il_size.c.
* src-IL/src/Makefile.am: Added il_size.c.
* il_jp2.c: Added ilIsValidJp2* functions.
* il.h: Added ilDetermineType and ilDetermineTypeL to declarations.
* il_io.c: Changed ilDetermineTypeL to be exported.
* il_pcx.c: Formatting issues fixed.
* il_mdl.c: Added ilIsValidJp2* functions.
* il_io.c: Added JP2, MDL and XPM support to ilDetermineType and ilIsValid functions.
* il_icon.c/il_png.c: Renamed color_type to ico_color_type and png_color_type to avoid name conflicts.
* il_iff.c: Changed all malloc->ialloc and free->ifree. Added checks for ialloc failure.
* il_io.c (ilDetermineTypeL): Changed VTF check to return IL_VTF instead of the miscopied IL_SUN.
* il_size.c (ilDetermineSize): Now calls iTargaSize for Targa files.
* il_tga.c: Added iTargaSize.
2009-01-22 Denton Woods <doomwiz@users.sf.net>
* ilut_internal.h:66: Changed to compile under Cygwin.
* ilut_opengl.c:108: Replaced _MSC_VER with _WIN32 and _WIN64.
* il_dds-save.c:343: Fixed bug #1067590 - Removed this line, which caused crashes.
* il_pic.c (iLoadPicInternal): Fixed ilTexImage call, moved it after channel information read.
* il_pic.c (readScanline):294-295: Added check for alpha channel.
* il_pic.c: Added ilSetError calls throughout.
* il_sgi.c (iLoadSgiInternal): Fixed bug #1060946 - Removed IL_LUMINANCE_ALPHA filetype.
* WindowsTest.cpp:52,53: Changed border size to accommodate Windows Vista/7.
* il_endian.h:20: Changed to give __BIG_ENDIAN__ a value of 1. The Google cached page of
http://74.125.47.132/search?q=cache:YfSl36C2pAQJ:patch-tracking.debian.net/patch/series/view/devil/1.7.2-1/00_endian_and_ILvoid_fixes.diff+devil+big+endian&hl=en&ct=clnk&cd=11&gl=us&lr=lang_en
has this patch (Nov. 24, 2008 cache).
* devil_internal_exports.h:34: Uncommented and commented line 30.
2009-01-20 Matěj Týč <bubla@users.sf.net>
* test/format_test: Added a program and script as 'make check' target.
Those will test whether IL is capable of saving and loading images and whether the saved and
loaded image is similar to the original.
* configure.ac, lib/Makefile.am: Added support to IFF compilation.
* docs/DevIL_manual.texi: Added missing documentation about getting
image data + fixed some typos.
* include/IL/devil_cpp_wrapper.hpp: Fixed a typo that caused
compilation error
2009-01-20 Denton Woods <doomwiz@users.sf.net>
* ilut_opengl.c (ilutGLScreen): Added glPixelStorei call.
* Added il_iff.c from GAIA.
* Added "x64 DLL Install.exe" to SVN.
* il_internal.h: Renamed ilIsValidJpg* functions to ilIsValidJpeg*. Added Iff functions.
* il_io.c: Added checks for Iff-loading.
* ilut_win32.c (ilutConvertSliceToHBitmap): Added better error handling.
* src-IL/src/Makefile.am: Added il_iff.c.
* ilu_rotate.c (iluRotate_): Changed ilResizeImage call.
* Added ilut_config.h.
* ilut.h: Added reference to ilut_config.h for Windows.
* il_files.c/il_icon.c/il_png.c/il_mng.c: Fixed typecasting warnings.
* il_jp2.c/il_wbmp.c (ilSaveJp2L/ilSaveWbmpL): Removed const qualifier.
2009-01-19 Denton Woods <doomwiz@users.sf.net>
* il_hdr.c: Changed line 73 to have space for terminating NULL.
* src-IL/src/Makefile.am: Added il_vtf.c and *.cpp files.
* Fixed the MSVC++ 9 solutions pointing to the MSVC++ 8 project files.
* devil_cpp_wrapper.hpp: Updated to use ILconst_string instead of char*.
* il.h: Changed definition of IL_ALPHA to match OpenGL's GL_ALPHA.
* src-IL/include/Makefile.am: Added il_exr.h.
* il_dds.c/il.h: Readded DXT extension code.
* il_internal.h: Added declaration of ilFixCur.
2009-01-16 Denton Woods <doomwiz@users.sf.net>
* Updated x64 projects
2009-01-15 Matěj Týč <bubla@users.sf.net>
* il_io.h, include/IL/il.h, il_states.h: Changed some normal strings to constant
strings (in ilSave, ilIsValid and ilGetString)
* configure.ac, lib/Makefile.am: Added wbmp compilation support
* il_jp2.c, il_wbmp.c: Fixed a typo that prevented compilation
* include/IL/devil_cpp_wrapper.hpp: Added a hopefully harmless solution for
the initialization of DevIL.
2009-01-15 Denton Woods <doomwiz@users.sf.net>
* il_manip.c / il.h: Added ilClampNTSC function.
* il_squish.cpp: Added file.
* il_dds-save.c: Added line 688.
* il_states.c: Added lines for libsquish support.
* il_dds-save.c (Compress): Added libsquish compression.
* il_io.c (ilDetermineTypeF/L and ilIsValid/F/L): Added VTF, SUN and EXR.
* il_io.c (ilIsValidF/L): Added TIF
* il_jp2.c:131-137: Added these lines to take care of erroneous error generated by JasPer's buffering.
* il_jp2.c: Added functions to save JPEG 2000 images.
* il_utility.c (ilGetBppFormat): Added IL_ALPHA.
* il_jp2.c (iLoadJp2Internal): Added 1 and 2 channel format loading.
* il_dds-save.c:700-701: Changed to IL_RGBA.
* il_dds-save.c (ChooseEndpoints): Changed to use norm squared instead of a sum of the components.
* il_dds-save.c (GetBlock): Changed to copy adjacent data if it goes beyond the bounds of the image.
* il_icon.c: Removed extra whitespace.
* il_icns.c / il_internal.h: Added ilIsValidIcns*.
* il_icns.h: Changed comments on ICNSDATA.
* il_exr.c: Added ilIsValidExr*.
* il_io.c (ilLoadF): Uncommented ilLoadJp2F.
* il_dds-save.c (CompressTo565): Changed 24-bit to 16-bit code based on Charles Bloom's rant.
* il_dds.c (DxtcReadColor/DxtcReadColors): Changed conversion to copy high bits to lowest bits as well.
* il_io.c: Reenabled PhotoCD support.
* il_pcd.c (iLoadPcdInternal): Added check for end-of-file.
* il_exr.c: Added EXR saving functions.
2009-01-13 Denton Woods <doomwiz@users.sf.net>
* Converted source repository to SVN from CVS.
2009-01-12 Denton Woods <doomwiz@users.sf.net>
* ilut_directx9.c: Cleared up formatting some.
2009-01-11 Denton Woods <doomwiz@users.sf.net>
* MSVC9 Unicode projects: Updated to work better in 64-bit Windows.
* il_vtf.c: Removed commented lines 238-242.
* Created application to copy DLL files to the System32 directory.
2009-01-10 Matěj Týč <bubla@users.sf.net>
* m4/devil-definitions.m4, m4/devil-reports.m4: Added a report saying
what libraries were linked with DevIL (should be helpful to packagers
who need to know DevIL dependencies)
* il_endian.h (iGwapUShort/iSwapUInt): Finished fixing bug #2023453
(inline GCC asm, there was a typo left)
* src_IL/src/il_tiff.c (ilSaveTiff): Fixed a typo that was causing
conflicting declarations error
* configure.ac:264: Added IL_NO_WBMP since the Wbmp loading functions
that are referenced, but not implemented, caused linking errors
2009-01-09 Denton Woods <doomwiz@users.sf.net>
* ilut_opengl.h: Moved ILGLCOMPRESSEDTEXIMAGE2DARBPROC typedef out of #ifdefs.
* ilut_opengl.c: Added ilutGLSetTex2D and ilutGLSetTex3D. Changed ilutGLSetTex to
just call ilutGLSetTex2D. Did the same thing for ilutGLSubTex. Added checks for
volume image extensions. Renamed MakeGLCompliant to MakeGLCompliant2D. Added
MakeGLCompliant3D.
* ilut_opengl.c (ilutGLScreen): Added check for ilTexImage failing.
* il_vtf.c (iLoadVtfInternal): Added BGRA4444 support.
* il_alloc.c / ilu_scale.c: Cleaned up formatting some.
* devil_internal_exports.h: Added Faces member to ILimage.
* il_devil.c (iCopySubImages): Added support for faces.
* il_register.c: Added ilRegisterNumFaces.
* il_convert.c (ilFixImage): Added support for faces.
* il_stack.c: Added ilActiveFace.
* ilut_directx9:63,779: Added ILboolean typecast.
* ilut_win32:102: Added ILboolean typecast.
* il_jpeg.c:987: Commented out pragma warning at the end.
* il_mng.c: Added #pragma warning at the top to get rid of redefinition warning when compiling.
* il_nvidia.cpp (ilNVidiaCompressDXT): Added check for Data being NULL.
* ilut_win32.c (ilutConvertSliceToHBitmap): Fixed bug #2496509 - added line 117 and
added DataSize member.
* il_hdr.c (iGetHdrHead): Fixed bug #2496518 - Added check for count. Changed
sscanf to use %2s format specifier to prevent buffer overruns in x and y.
* il_pnm.c (iGetWord): Fixed bug mentioned in #2496518 - igetc was moved back
into the while loop. Added a check for WordPos to prevent buffer overflow.
Restructured the while loop to work properly.
* il_convert.c (iConvertPalette): Changed references of iCurImage to Image.
* il_gif.c (GifGetData): Added DataPtr and changed line 636 to use Data instead of Image->Data.
* il_gif.c (iGetPalette / GetImages): Changed to better deal with local palettes.
2009-01-08 Matěj Týč <bubla@users.sf.net>
* TODO: Added some tasks that I would like to undertake
* ChangeLog, NEWS: Copied old ChangeLog entries to NEWS file
* lib/Makefile.am: Added two new files to the list of IL sources
(il_sun.c, il_nvidia.cpp)
* examples/iller: Made empty files where the ILU frontend will be in
the future.
* configure.ac, m4/devil-reports.m4: Put the report stage of the
configure script to a separate m4 file.
2009-01-08 Denton Woods <doomwiz@users.sf.net>
* opengl_example/gltest.c (main): Added iluInit/ilutInit calls.
* ilut_opengl.c (ilutGLFormat): Added IL_ALPHA support.
* il_bmp.c: Minor formatting issues fixed.
* il.h: Added IL_NVIDIA_COMPRESS #define.
* il_states.h: Added ilUseNVidiaDXT to IL_STATES.
* il_state.c: Added IL_NVIDIA_COMPRESS support.
* il_dds-save.c (Compress): Changed to use NVTT if needed.
* il_nvidia.cpp: Added ilNVidiaCompressDXTFile and Depth parameter to ilNVidiaCompressDXT.
2009-01-06/07 Denton Woods <doomwiz@users.sf.net>
* Added il_sun.c (Sun Raster file support)
* ilut_opengl.c (ilutGLInit): Changed Linux ilGLCompressed2D pointer casting
to coincide with the old SVN version.
* il_tiff.c / il_alloc.c: Fixed a few pointer casts that were fixed in SVN.
* test/DDrawTest: Fixed extra whitespace in all files in this project.
* il_endian.h (iGwapUShort/iSwapUInt): Fixed bug #2023453 (inline GCC asm).
* ilut_win32.c (ilutConvertSliceToBitmap): Fixed bug #1775036 (definition of buff).
* il_psd.c (PsdGetData): Fixed bug #2219350 (16-bit luminance images not loading properly).
* il_manip.c: Cleared up some minor formatting issues.
* il_png.c (iSavePngInternal): Fixed bug #1680577 (some metadata not written correctly).
* il_nvidia.cpp (ilnVidiaCompressDXT1): Disabled mipmap generation and added code to
ilOutputHandler constructor to determine the proper size of the buffer.
* il.h: Added IL_DXT1A define for nVidia Texture Tools.
* il_nvidia.cpp: Added DXT1a, DXT3 and DXT5 support. Renamed ilnVidiaCompressDXT to
ilnVidiaCompressDXT and added the DxtType parameter.
* il_internal.c: Cleaned up extra whitespace toward end.
2009-01-02 Matěj Týč <bubla@users.sf.net>
* src-{IL,ILU,ILUT}/src/*_internal.c: Hopefully resolved the
HAVE_CONFIG_H thing once for all :-)
* src-IL/src/il_exr.cpp: Undefined OPENEXR_DLL if we are not on
Windows (=> when HAVE_CONFIG_H is not defined)
* src-IL/src/il_io.c:765: Fixed a typo
* src-IL/src/il_vtf.c: Added min and max macros to the beginning
* docs/Devil_manual.texi: Corrected typos and missing @code and other
formatting stuff, corrected image names and incorrect usage of @xref
etc. that prevented compilation
* build setup (Makefile.am and configure.ac): Added support for
compilation of EXR and WDP formats + various other tweaks.
Up to 2009-01-02 (since 1.7.5 release) Denton Woods <doomwiz@users.sf.net>
* Readded EXR code.
* Redefined clamping values in il.h.
* Added 64-bit integer types.
* Fixed bug in iRegisterLoad (https://sourceforge.net/forum/message.php?msg_id=5973761).
* Changed seek functions in il_files.c to return ILint.
* Added rpcsal.h and sal.h #includes to ilut.h for DX10.
* Added IL_MAX_QUANT_INDICES to use instead of IL_MAX_QUANT_INDEXS (misspelled).
* Added WBMP support (loading and saving).
* EXR files can now be loaded as file streams and lumps.
* Changed iNeuQuant to take number of colors in palette.
* Compiled MNG support back in.

View file

@ -0,0 +1,5 @@
[InternetShortcut]
URL=http://openil.sf.net/
IDList=
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2

View file

@ -0,0 +1,40 @@
Libraries needed to compile DevIL* :
----------------------------------
(Most of these are optional)
Libpng for .png (and some .ico) support available at http://www.libpng.org/pub/png/libpng.html
ZLib for .png (and some .ico) support available at http://www.gzip.org/zlib/
Libjpeg for .jpg (and some .blp) support from http://www.ijg.org/
Libtiff for .tif support from http://www.libtiff.org/
Libmng for .mng and .jng support from http://www.libmng.com/
JasPer for .jp2 (and some .icns) support available at http://www.ece.uvic.ca/~mdadams/jasper/
HD Photo Device Porting Kit for .wdp/.hdp support from http://www.microsoft.com/Downloads/details.aspx?FamilyID=285eeffd-d86c-48c3-ab93-3abd5ee7f1ce&displaylang=en.
Little CMS for color profiles (ILU) from http://www.littlecms.com/
Colour Picker lib for WindowsTest from http://www.fluidstudios.com/freeware.html
Freeglut (or glut) for GLTest from http://freeglut.sourceforge.net
glext.h from http://oss.sgi.com/projects/ogl-sample/ABI/glext.h (as <gl/glext.h> if using OpenGL)
libsquish for DXT compression from http://code.google.com/p/libsquish/
nVidia Texture Tools for DXT compression from http://developer.nvidia.com/object/nv_texture_tools.html.
MSVC++ precompiled versions of libpng, zlib, libjpeg, libtiff, lcms and JasPer can be found
at http://openil.sourceforge.net/libs/LibCompiled-vc8.zip or
http://openil.sourceforge.net/libs/LibCompiled-vc9.zip.
Sources of libpng, zlib, libjpeg, libmng, libungif, libtiff, lcms and JasPer can be
found at http://openil.sourceforge.net/libs/LibSrc.zip
Intel Jpeg Library from
http://developer.intel.com/software/products/perflib/ijl/index.htm
MAC OS X
These library are not still uploaded!
To learn how to install these libraries, read README.macosx
Source of external framework, downloaded from the previous sites
http://openil.sourceforge.net/libs/ExternFrameworksSrc.sitx
Complete Compiled Library
http://openil.sourceforge.net/libs/OpenILBin.sitx

View file

@ -0,0 +1,176 @@
Developer's Image Library version 1.7.8 Readme, Notes and Quick Use
-------------------------------------------------------------------
<DZA[afk]> DevIL song: "la la la, a cross-platform image library utilizing a
simple syntax to load, save, convert, manipulate, filter and display
a variety of images with ease, la la la"
What is it?
-----------
DevIL is an Open Source image library whose distribution is done under the
terms of the GNU LGPL license. See the COPYING file for more details.
DevIL offers you a simple way to implement loading, manipulating, filtering,
converting, displaying, saving from/to several different image formats in your
own project.
Where can I find it?
--------------------
DevIL can be found at http://openil.sourceforge.net
How do I build and install the 3 libraries ?
-----------------------------------------
*nix users should read README.unix
VisualC users should read README.win
Cygwin users should read README.cygwin
MacOSX users should read README.macosx
PS: *nix stands for GNU/Linux, *BSD, SunOS/Solaris and perhaps some more.
More Extensive Documentation
----------------------------
This file is only a quick guide to point you to more detailed information on
how to use DevIL. More extensive documentation can currently be found on the
DevIL site at http://openil.sf.net and in the /Docs directory in a normal
install.
Why the hell another image library?
-----------------------------------
I have never seen an image library that can do everything DevIL does. Sure,
various different libraries can do part of what DevIL can do as well or even
better, but I wanted a simple to use library that encompassed all of these
features. I also wanted an extremely portable image library that could be used
from a variety of languages and utilized the OpenGL syntax.
Basic Readme
------------
Most anything stated in this document applies to DevIL as well as DevILU and
DevILUT, unless otherwise stated. (This file is best viewed with word wrap on.)
Errors:
-------
All errors generated inside DevIL, along with illegal parameters passed to
DevIL functions are caught and passed to ilSetError(), an internal library
function. The calling program can call ilGetError() to get the value of the
error generated. Error types are defined in il.h, using the 0x501 - 0x5FF
range. ilGetError() will return 0 (IL_NO_ERROR) if no error has occurred.
Basic Usage:
------
This demonstrates loading an image through DevIL for OpenGL. Don't forget to
call ilInit before you before you do anything:
#include <IL/il.h>
#include <IL/ilu.h>
#include <IL/ilut.h>
...
ILuint devilError;
ilInit();
devilError = ilGetError();
if (devilError != IL_NO_ERROR) {
printf ("Devil Error (ilInit: %s\n", iluGetErrorString (devilError));
exit (2);
}
....
ILuint devilID;
ilGenImages(1, &devilID);
ilBindImage(devilID);
ilLoadImage("default1.tga"); // Loads into the current bound image
devilError = ilGetError();
if (devilError != IL_NO_ERROR) {
printf ("Devil Error (ilLoadImage: %s\n", iluGetErrorString (devilError));
exit (2);
}
....
ilutRenderer(IL_OPENGL); // Switch the renderer
....
GLuint openglID, openglError;
openglID = ilutGLBindTexImage(); // This generates the texture for you
devilError = ilGetError();
if (devilError != IL_NO_ERROR) {
printf ("Error: %s\n", iluGetErrorString (devilError));
exit (2);
}
if (openglError != GL_NO_ERROR) {
printf ("Opengl Error (ilutGLBindTexImage): %s\n", gluGetErrorString (openglError));
exit (2);
}
// Make sure to close the image when you are done with it (though DevIL
// automatically deletes them when the program exits):
glDeleteTextures(1, &openglID);
ilDeleteImages (1, &devilID);
More Examples:
---------
The TestIL project is included to test features of DevIL.
DevIL includes a project called GLTest. This is a simple test of DevIL's
capabilities. All it does it load any image and displays it in a window
created by FreeGlut, which is available on http://freeglut.sourceforge.net. It
is also included to let the user have an idea of what the library can really
be used for.
Several other test projects are included to test support with various display
APIs. The WindowsTest project is a basic image program that only runs in
Windows right now but showcases several of DevIL's features through various
menus.
If you want more in-depth tutorials, you can find them on
http://openil.sf.net, or they may be in your installation under the /examples
directory. Documents are also available in the /docs directory.
Additional Reading
------------------
All image formats used in DevIL have corresponding documents on
http://www.wotsit.org, under the Graphics Files section. These documents
proved invaluable for the creation of this library when there was no library
already available for that image format.
Legalese
--------
All contents of this file are intellectual property of Denton Woods,
copyright 2001-2008.

View file

@ -0,0 +1,44 @@
Where do I find the project files ?
-----------------------------------------
MSVC++ projects are in DevIL\projects\vc8 and DevIL\projects\vc9.
If compiling with Cygwin or MinGW, use the instructions in README.unix.
The IL_NO_XXX #define's:
------------------------
A user can recompile this library without complete image support in it. For
example, if your project does not use .jpg files, you can uncomment
#define IL_NO_JPG at the top of il/il.h, recompile the library, and no .jpg
support will be added, meaning quicker compiles and a smaller library.
The ILUT_USE_XXX #define's:
---------------------------
To disable support for a specific API, edit IL/ilut.h and comment the
corresponding #define. Per example, to disable OpenGL functions support,
add // in front of the line that reads:
#define ILUT_USE_OPENGL
Libraries needed to compile DevIL* :
-----------------------------------
Libraries.txt (included with the DevIL distribution) lists all libraries needed
to properly compile DevIL.
Precompiled versions and sources of all libraries needed to compile DevIL are
available at http://openil.sourceforge.net/libs/LibCompiled.zip and
http://openil.sourceforge.net/libs/LibSrc.zip , respectively.
Installation:
-------------
Just unzip and compile other libs included if needed.
Please also refer to MSVC++.txt for further instructions if you are using
Microsoft Visual C++.

View file

@ -0,0 +1,140 @@
/* include/IL/config.h. Generated by configure. */
/* include/IL/config.h.in. Generated from configure.in by autoheader. */
#ifndef __CONFIG_H__
#define __CONFIG_H__
#define IL_USE_PRAGMA_LIBS
// Supported image formats (IL)
// #define IL_NO_BLP
// #define IL_NO_BMP
// #define IL_NO_CUT
// #define IL_NO_CHEAD
// #define IL_NO_DCX
// #define IL_NO_DDS
// #define IL_NO_DICOM
// #define IL_NO_DOOM
// #define IL_NO_EXR
// #define IL_NO_FITS
// #define IL_NO_FTX
// #define IL_NO_GIF
// #define IL_NO_HDR
// #define IL_NO_ICO
// #define IL_NO_ICNS
// #define IL_NO_IWI
// #define IL_NO_JP2
// #define IL_NO_JPG
// #define IL_NO_LCMS
// #define IL_NO_LIF
// #define IL_NO_MDL
// #define IL_NO_MNG
// #define IL_NO_PCD
// #define IL_NO_PCX
// #define IL_NO_PIC
// #define IL_NO_PIX
// #define IL_NO_PNG
// #define IL_NO_PNM
// #define IL_NO_PSD
// #define IL_NO_PSP
// #define IL_NO_PXR
// #define IL_NO_RAW
// #define IL_NO_ROT
// #define IL_NO_SGI
// #define IL_NO_SUN
// #define IL_NO_TGA
// #define IL_NO_TIF
// #define IL_NO_TPL
// #define IL_NO_WAL
// #define IL_NO_WDP
// #define IL_NO_XPM
#define IL_USE_JPEGLIB_UNMODIFIED 1
//#define IL_USE_DXTC_NVIDIA
#define IL_USE_DXTC_SQUISH
/* Supported api (ilut) */
//
// sorry just
// can't get this one to work under windows
// have disabled for the now
//
// will look at it some more later
//
// Kriss
//
#undef ILUT_USE_ALLEGRO
#undef ILUT_USE_DIRECTX8
//#define ILUT_USE_DIRECTX9
//#define ILUT_USE_DIRECTX10
//#define ILUT_USE_OPENGL
//#define ILUT_USE_SDL
//#define ILUT_USE_WIN32
/* Define to 1 if you have the <dlfcn.h> header file. */
//#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
//#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the <memory.h> header file. */
//#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <stdint.h> header file. */
//#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
//#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
//#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
//#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
//#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
//#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
//#define HAVE_UNISTD_H 1
/* Name of package */
#define IL_PACKAGE "DevIL"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define IL_PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define IL_PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define IL_PACKAGE_TARNAME ""
/* Define to the version of this package. */
#define IL_PACKAGE_VERSION ""
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
//#define IL_VERSION "1.7.3"
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
/* If using Mac OS X uncomment this line */
/* #include "macconfig.h" */
/* Define to 1 if the X Window System is missing or not being used. */
/* #undef X_DISPLAY_MISSING */
#endif /* __CONFIG_H__ */

View file

@ -0,0 +1,79 @@
#ifndef __CONFIG_H__
#define __CONFIG_H__
#define IL_USE_PRAGMA_LIBS // Links to only the libraries that are requested.
#define IL_INLINE_ASM 1 // Define if you can support at least some ASM
// Supported images formats (IL)
// #define IL_NO_BLP
// #define IL_NO_BMP
// #define IL_NO_CUT
// #define IL_NO_CHEAD
// #define IL_NO_DCX
// #define IL_NO_DDS
// #define IL_NO_DICOM
// #define IL_NO_DOOM
// #define IL_NO_EXR
// #define IL_NO_FITS
// #define IL_NO_FTX
// #define IL_NO_GIF
// #define IL_NO_HDR
// #define IL_NO_ICO
// #define IL_NO_ICNS
// #define IL_NO_IWI
// #define IL_NO_JP2
// #define IL_NO_JPG
// #define IL_NO_LCMS
// #define IL_NO_LIF
// #define IL_NO_MDL
// #define IL_NO_MNG
// #define IL_NO_PCD
// #define IL_NO_PCX
// #define IL_NO_PIC
// #define IL_NO_PIX
// #define IL_NO_PNG
// #define IL_NO_PNM
// #define IL_NO_PSD
// #define IL_NO_PSP
// #define IL_NO_PXR
// #define IL_NO_RAW
// #define IL_NO_ROT
// #define IL_NO_SGI
// #define IL_NO_SUN
// #define IL_NO_TGA
// #define IL_NO_TIF
// #define IL_NO_TPL
// #define IL_NO_WAL
// #define IL_NO_WDP
// #define IL_NO_XPM
#define IL_USE_JPEGLIB_UNMODIFIED 1
#define IL_USE_DXTC_NVIDIA
#define IL_USE_DXTC_SQUISH
//#define IL_NO_GAMES
/* Supported api (ilut) */
//
// sorry just
// can't get this one to work under windows
// have disabled for the now
//
// will look at it some more later
//
// Kriss
//
#undef ILUT_USE_ALLEGRO
#undef ILUT_USE_DIRECTX8
#define ILUT_USE_DIRECTX9
#define ILUT_USE_DIRECTX10
#define ILUT_USE_OPENGL
#define ILUT_USE_SDL
#define ILUT_USE_WIN32
#endif /* __CONFIG_H__ */

View file

@ -0,0 +1,161 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2009 by Denton Woods
// Last modified: 01/06/2009
//
// Filename: IL/devil_internal_exports.h
//
// Description: Internal stuff for DevIL (IL, ILU and ILUT)
//
//-----------------------------------------------------------------------------
#ifndef IL_EXPORTS_H
#define IL_EXPORTS_H
#include "IL/il.h"
#ifdef DEBUG
#include <assert.h>
#else
#define assert(x)
#endif
//#ifndef NOINLINE
#ifndef INLINE
#if defined(__GNUC__)
#define INLINE extern inline
#elif defined(_MSC_VER) //@TODO: Get this working in MSVC++.
// http://www.greenend.org.uk/rjk/2003/03/inline.html
#define NOINLINE
//#define INLINE
/*#ifndef _WIN64 // Cannot use inline assembly in x64 target platform.
#define USE_WIN32_ASM
#endif//_WIN64*/
#define INLINE __inline
#else
#define INLINE inline
#endif
#endif
//#else
//#define INLINE
//#endif //NOINLINE
#ifdef __cplusplus
extern "C" {
#endif
#define IL_MAX(a,b) (((a) > (b)) ? (a) : (b))
#define IL_MIN(a,b) (((a) < (b)) ? (a) : (b))
//! Basic Palette struct
typedef struct ILpal
{
ILubyte* Palette; //!< the image palette (if any)
ILuint PalSize; //!< size of the palette (in bytes)
ILenum PalType; //!< the palette types in il.h (0x0500 range)
} ILpal;
//! The Fundamental Image structure
/*! Every bit of information about an image is stored in this internal structure.*/
typedef struct ILimage
{
ILuint Width; //!< the image's width
ILuint Height; //!< the image's height
ILuint Depth; //!< the image's depth
ILubyte Bpp; //!< bytes per pixel (now number of channels)
ILubyte Bpc; //!< bytes per channel
ILuint Bps; //!< bytes per scanline (components for IL)
ILubyte* Data; //!< the image data
ILuint SizeOfData; //!< the total size of the data (in bytes)
ILuint SizeOfPlane; //!< SizeOfData in a 2d image, size of each plane slice in a 3d image (in bytes)
ILenum Format; //!< image format (in IL enum style)
ILenum Type; //!< image type (in IL enum style)
ILenum Origin; //!< origin of the image
ILpal Pal; //!< palette details
ILuint Duration; //!< length of the time to display this "frame"
ILenum CubeFlags; //!< cube map flags for sides present in chain
struct ILimage* Mipmaps; //!< mipmapped versions of this image terminated by a NULL - usu. NULL
struct ILimage* Next; //!< next image in the chain - usu. NULL
struct ILimage* Faces; //!< next cubemap face in the chain - usu. NULL
struct ILimage* Layers; //!< subsequent layers in the chain - usu. NULL
ILuint* AnimList; //!< animation list
ILuint AnimSize; //!< animation list size
void* Profile; //!< colour profile
ILuint ProfileSize; //!< colour profile size
ILuint OffX; //!< x-offset of the image
ILuint OffY; //!< y-offset of the image
ILubyte* DxtcData; //!< compressed data
ILenum DxtcFormat; //!< compressed data format
ILuint DxtcSize; //!< compressed data size
} ILimage;
// Memory functions
ILAPI void* ILAPIENTRY ialloc(const ILsizei Size);
ILAPI void ILAPIENTRY ifree(const void *Ptr);
ILAPI void* ILAPIENTRY icalloc(const ILsizei Size, const ILsizei Num);
#ifdef ALTIVEC_GCC
ILAPI void* ILAPIENTRY ivec_align_buffer(void *buffer, const ILuint size);
#endif
// Internal library functions in IL
ILAPI ILimage* ILAPIENTRY ilGetCurImage(void);
ILAPI void ILAPIENTRY ilSetCurImage(ILimage *Image);
ILAPI void ILAPIENTRY ilSetError(ILenum Error);
ILAPI void ILAPIENTRY ilSetPal(ILpal *Pal);
//
// Utility functions
//
ILAPI ILubyte ILAPIENTRY ilGetBppFormat(ILenum Format);
ILAPI ILenum ILAPIENTRY ilGetFormatBpp(ILubyte Bpp);
ILAPI ILubyte ILAPIENTRY ilGetBpcType(ILenum Type);
ILAPI ILenum ILAPIENTRY ilGetTypeBpc(ILubyte Bpc);
ILAPI ILubyte ILAPIENTRY ilGetBppPal(ILenum PalType);
ILAPI ILenum ILAPIENTRY ilGetPalBaseType(ILenum PalType);
ILAPI ILuint ILAPIENTRY ilNextPower2(ILuint Num);
ILAPI ILenum ILAPIENTRY ilTypeFromExt(ILconst_string FileName);
ILAPI void ILAPIENTRY ilReplaceCurImage(ILimage *Image);
ILAPI void ILAPIENTRY iMemSwap(ILubyte *, ILubyte *, const ILuint);
//
// Image functions
//
ILAPI void ILAPIENTRY iBindImageTemp (void);
ILAPI ILboolean ILAPIENTRY ilClearImage_ (ILimage *Image);
ILAPI void ILAPIENTRY ilCloseImage (ILimage *Image);
ILAPI void ILAPIENTRY ilClosePal (ILpal *Palette);
ILAPI ILpal* ILAPIENTRY iCopyPal (void);
ILAPI ILboolean ILAPIENTRY ilCopyImageAttr (ILimage *Dest, ILimage *Src);
ILAPI ILimage* ILAPIENTRY ilCopyImage_ (ILimage *Src);
ILAPI void ILAPIENTRY ilGetClear (void *Colours, ILenum Format, ILenum Type);
ILAPI ILuint ILAPIENTRY ilGetCurName (void);
ILAPI ILboolean ILAPIENTRY ilIsValidPal (ILpal *Palette);
ILAPI ILimage* ILAPIENTRY ilNewImage (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc);
ILAPI ILimage* ILAPIENTRY ilNewImageFull (ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data);
ILAPI ILboolean ILAPIENTRY ilInitImage (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data);
ILAPI ILboolean ILAPIENTRY ilResizeImage (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILubyte Bpc);
ILAPI ILboolean ILAPIENTRY ilTexImage_ (ILimage *Image, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp, ILenum Format, ILenum Type, void *Data);
ILAPI ILboolean ILAPIENTRY ilTexSubImage_ (ILimage *Image, void *Data);
ILAPI void* ILAPIENTRY ilConvertBuffer (ILuint SizeOfData, ILenum SrcFormat, ILenum DestFormat, ILenum SrcType, ILenum DestType, ILpal *SrcPal, void *Buffer);
ILAPI ILimage* ILAPIENTRY iConvertImage (ILimage *Image, ILenum DestFormat, ILenum DestType);
ILAPI ILpal* ILAPIENTRY iConvertPal (ILpal *Pal, ILenum DestFormat);
ILAPI ILubyte* ILAPIENTRY iGetFlipped (ILimage *Image);
ILAPI ILboolean ILAPIENTRY iMirror();
ILAPI void ILAPIENTRY iFlipBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num);
ILubyte* iFlipNewBuffer(ILubyte *buff, ILuint depth, ILuint line_size, ILuint line_num);
ILAPI void ILAPIENTRY iGetIntegervImage(ILimage *Image, ILenum Mode, ILint *Param);
// Internal library functions in ILU
ILAPI ILimage* ILAPIENTRY iluRotate_(ILimage *Image, ILfloat Angle);
ILAPI ILimage* ILAPIENTRY iluRotate3D_(ILimage *Image, ILfloat x, ILfloat y, ILfloat z, ILfloat Angle);
ILAPI ILimage* ILAPIENTRY iluScale_(ILimage *Image, ILuint Width, ILuint Height, ILuint Depth);
#ifdef __cplusplus
}
#endif
#endif//IL_EXPORTS_H

View file

@ -0,0 +1,644 @@
//-----------------------------------------------------------------------------
//
// ImageLib Sources
// Copyright (C) 2000-2009 by Denton Woods
// Last modified: 03/07/2009
//
// Filename: IL/il.h
//
// Description: The main include file for DevIL
//
//-----------------------------------------------------------------------------
// Doxygen comment
/*! \file il.h
The main include file for DevIL
*/
#ifndef __il_h_
#ifndef __IL_H__
#define __il_h_
#define __IL_H__
#ifdef __cplusplus
extern "C" {
#endif
//this define controls if floats and doubles are clampled to [0..1]
//during conversion. It takes a little more time, but it is the correct
//way of doing this. If you are sure your floats are always valid,
//you can undefine this value...
#define CLAMP_HALF 1
#define CLAMP_FLOATS 1
#define CLAMP_DOUBLES 1
/*#ifdef _WIN32_WCE
#define IL_NO_EXR
#define IL_NO_GIF
#define IL_NO_JP2
#define IL_NO_JPG
#define IL_NO_MNG
#define IL_NO_PNG
#define IL_NO_TIF
#define IL_NO_LCMS
#endif //_WIN32_WCE
#ifdef DJGPP
#define IL_NO_EXR
#define IL_NO_GIF
#define IL_NO_JP2
#define IL_NO_JPG
#define IL_NO_MNG
#define IL_NO_PNG
#define IL_NO_TIF
#define IL_NO_LCMS
#endif //DJGPP*/
#ifdef _WIN32
#if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
#if defined(_MSC_VER) || defined(__BORLANDC__)
#pragma comment(lib, "DevIL.lib")
#endif
#endif
#endif
#ifdef RESTRICT_KEYWORD
#define RESTRICT restrict
#define CONST_RESTRICT const restrict
#else
#define RESTRICT
#define CONST_RESTRICT const
#endif
#include <stdio.h>
typedef unsigned int ILenum;
typedef unsigned char ILboolean;
typedef unsigned int ILbitfield;
typedef signed char ILbyte;
typedef signed short ILshort;
typedef int ILint;
typedef size_t ILsizei;
typedef unsigned char ILubyte;
typedef unsigned short ILushort;
typedef unsigned int ILuint;
typedef float ILfloat;
typedef float ILclampf;
typedef double ILdouble;
typedef double ILclampd;
#ifdef _MSC_VER
typedef __int64 ILint64;
typedef unsigned __int64 ILuint64;
#else
typedef long long int ILint64;
typedef long long unsigned int ILuint64;
#endif
#include <limits.h>
#ifdef _UNICODE
#ifndef _WIN32_WCE
#include <wchar.h>
#endif
//if we use a define instead of a typedef,
//ILconst_string works as intended
#define ILchar wchar_t
#define ILstring wchar_t*
#define ILconst_string wchar_t const *
#else
//if we use a define instead of a typedef,
//ILconst_string works as intended
#define ILchar char
#define ILstring char*
#define ILconst_string char const *
#endif //_UNICODE
#define IL_FALSE 0
#define IL_TRUE 1
// Matches OpenGL's right now.
//! Data formats \link Formats Formats\endlink
#define IL_COLOUR_INDEX 0x1900
#define IL_COLOR_INDEX 0x1900
#define IL_ALPHA 0x1906
#define IL_RGB 0x1907
#define IL_RGBA 0x1908
#define IL_BGR 0x80E0
#define IL_BGRA 0x80E1
#define IL_LUMINANCE 0x1909
#define IL_LUMINANCE_ALPHA 0x190A
//! Data types \link Types Types\endlink
#define IL_BYTE 0x1400
#define IL_UNSIGNED_BYTE 0x1401
#define IL_SHORT 0x1402
#define IL_UNSIGNED_SHORT 0x1403
#define IL_INT 0x1404
#define IL_UNSIGNED_INT 0x1405
#define IL_FLOAT 0x1406
#define IL_DOUBLE 0x140A
#define IL_HALF 0x140B
#define IL_MAX_BYTE SCHAR_MAX
#define IL_MAX_UNSIGNED_BYTE UCHAR_MAX
#define IL_MAX_SHORT SHRT_MAX
#define IL_MAX_UNSIGNED_SHORT USHRT_MAX
#define IL_MAX_INT INT_MAX
#define IL_MAX_UNSIGNED_INT UINT_MAX
#define IL_LIMIT(x,m,M) (x<m?m:(x>M?M:x))
#define IL_CLAMP(x) IL_LIMIT(x,0,1)
#define IL_VENDOR 0x1F00
#define IL_LOAD_EXT 0x1F01
#define IL_SAVE_EXT 0x1F02
//
// IL-specific #define's
//
#define IL_VERSION_1_7_8 1
#define IL_VERSION 178
// Attribute Bits
#define IL_ORIGIN_BIT 0x00000001
#define IL_FILE_BIT 0x00000002
#define IL_PAL_BIT 0x00000004
#define IL_FORMAT_BIT 0x00000008
#define IL_TYPE_BIT 0x00000010
#define IL_COMPRESS_BIT 0x00000020
#define IL_LOADFAIL_BIT 0x00000040
#define IL_FORMAT_SPECIFIC_BIT 0x00000080
#define IL_ALL_ATTRIB_BITS 0x000FFFFF
// Palette types
#define IL_PAL_NONE 0x0400
#define IL_PAL_RGB24 0x0401
#define IL_PAL_RGB32 0x0402
#define IL_PAL_RGBA32 0x0403
#define IL_PAL_BGR24 0x0404
#define IL_PAL_BGR32 0x0405
#define IL_PAL_BGRA32 0x0406
// Image types
#define IL_TYPE_UNKNOWN 0x0000
#define IL_BMP 0x0420 //!< Microsoft Windows Bitmap - .bmp extension
#define IL_CUT 0x0421 //!< Dr. Halo - .cut extension
#define IL_DOOM 0x0422 //!< DooM walls - no specific extension
#define IL_DOOM_FLAT 0x0423 //!< DooM flats - no specific extension
#define IL_ICO 0x0424 //!< Microsoft Windows Icons and Cursors - .ico and .cur extensions
#define IL_JPG 0x0425 //!< JPEG - .jpg, .jpe and .jpeg extensions
#define IL_JFIF 0x0425 //!<
#define IL_ILBM 0x0426 //!< Amiga IFF (FORM ILBM) - .iff, .ilbm, .lbm extensions
#define IL_PCD 0x0427 //!< Kodak PhotoCD - .pcd extension
#define IL_PCX 0x0428 //!< ZSoft PCX - .pcx extension
#define IL_PIC 0x0429 //!< PIC - .pic extension
#define IL_PNG 0x042A //!< Portable Network Graphics - .png extension
#define IL_PNM 0x042B //!< Portable Any Map - .pbm, .pgm, .ppm and .pnm extensions
#define IL_SGI 0x042C //!< Silicon Graphics - .sgi, .bw, .rgb and .rgba extensions
#define IL_TGA 0x042D //!< TrueVision Targa File - .tga, .vda, .icb and .vst extensions
#define IL_TIF 0x042E //!< Tagged Image File Format - .tif and .tiff extensions
#define IL_CHEAD 0x042F //!< C-Style Header - .h extension
#define IL_RAW 0x0430 //!< Raw Image Data - any extension
#define IL_MDL 0x0431 //!< Half-Life Model Texture - .mdl extension
#define IL_WAL 0x0432 //!< Quake 2 Texture - .wal extension
#define IL_LIF 0x0434 //!< Homeworld Texture - .lif extension
#define IL_MNG 0x0435 //!< Multiple-image Network Graphics - .mng extension
#define IL_JNG 0x0435 //!<
#define IL_GIF 0x0436 //!< Graphics Interchange Format - .gif extension
#define IL_DDS 0x0437 //!< DirectDraw Surface - .dds extension
#define IL_DCX 0x0438 //!< ZSoft Multi-PCX - .dcx extension
#define IL_PSD 0x0439 //!< Adobe PhotoShop - .psd extension
#define IL_EXIF 0x043A //!<
#define IL_PSP 0x043B //!< PaintShop Pro - .psp extension
#define IL_PIX 0x043C //!< PIX - .pix extension
#define IL_PXR 0x043D //!< Pixar - .pxr extension
#define IL_XPM 0x043E //!< X Pixel Map - .xpm extension
#define IL_HDR 0x043F //!< Radiance High Dynamic Range - .hdr extension
#define IL_ICNS 0x0440 //!< Macintosh Icon - .icns extension
#define IL_JP2 0x0441 //!< Jpeg 2000 - .jp2 extension
#define IL_EXR 0x0442 //!< OpenEXR - .exr extension
#define IL_WDP 0x0443 //!< Microsoft HD Photo - .wdp and .hdp extension
#define IL_VTF 0x0444 //!< Valve Texture Format - .vtf extension
#define IL_WBMP 0x0445 //!< Wireless Bitmap - .wbmp extension
#define IL_SUN 0x0446 //!< Sun Raster - .sun, .ras, .rs, .im1, .im8, .im24 and .im32 extensions
#define IL_IFF 0x0447 //!< Interchange File Format - .iff extension
#define IL_TPL 0x0448 //!< Gamecube Texture - .tpl extension
#define IL_FITS 0x0449 //!< Flexible Image Transport System - .fit and .fits extensions
#define IL_DICOM 0x044A //!< Digital Imaging and Communications in Medicine (DICOM) - .dcm and .dicom extensions
#define IL_IWI 0x044B //!< Call of Duty Infinity Ward Image - .iwi extension
#define IL_BLP 0x044C //!< Blizzard Texture Format - .blp extension
#define IL_FTX 0x044D //!< Heavy Metal: FAKK2 Texture - .ftx extension
#define IL_ROT 0x044E //!< Homeworld 2 - Relic Texture - .rot extension
#define IL_TEXTURE 0x044F //!< Medieval II: Total War Texture - .texture extension
#define IL_DPX 0x0450 //!< Digital Picture Exchange - .dpx extension
#define IL_UTX 0x0451 //!< Unreal (and Unreal Tournament) Texture - .utx extension
#define IL_MP3 0x0452 //!< MPEG-1 Audio Layer 3 - .mp3 extension
#define IL_JASC_PAL 0x0475 //!< PaintShop Pro Palette
// Error Types
#define IL_NO_ERROR 0x0000
#define IL_INVALID_ENUM 0x0501
#define IL_OUT_OF_MEMORY 0x0502
#define IL_FORMAT_NOT_SUPPORTED 0x0503
#define IL_INTERNAL_ERROR 0x0504
#define IL_INVALID_VALUE 0x0505
#define IL_ILLEGAL_OPERATION 0x0506
#define IL_ILLEGAL_FILE_VALUE 0x0507
#define IL_INVALID_FILE_HEADER 0x0508
#define IL_INVALID_PARAM 0x0509
#define IL_COULD_NOT_OPEN_FILE 0x050A
#define IL_INVALID_EXTENSION 0x050B
#define IL_FILE_ALREADY_EXISTS 0x050C
#define IL_OUT_FORMAT_SAME 0x050D
#define IL_STACK_OVERFLOW 0x050E
#define IL_STACK_UNDERFLOW 0x050F
#define IL_INVALID_CONVERSION 0x0510
#define IL_BAD_DIMENSIONS 0x0511
#define IL_FILE_READ_ERROR 0x0512 // 05/12/2002: Addition by Sam.
#define IL_FILE_WRITE_ERROR 0x0512
#define IL_LIB_GIF_ERROR 0x05E1
#define IL_LIB_JPEG_ERROR 0x05E2
#define IL_LIB_PNG_ERROR 0x05E3
#define IL_LIB_TIFF_ERROR 0x05E4
#define IL_LIB_MNG_ERROR 0x05E5
#define IL_LIB_JP2_ERROR 0x05E6
#define IL_LIB_EXR_ERROR 0x05E7
#define IL_UNKNOWN_ERROR 0x05FF
// Origin Definitions
#define IL_ORIGIN_SET 0x0600
#define IL_ORIGIN_LOWER_LEFT 0x0601
#define IL_ORIGIN_UPPER_LEFT 0x0602
#define IL_ORIGIN_MODE 0x0603
// Format and Type Mode Definitions
#define IL_FORMAT_SET 0x0610
#define IL_FORMAT_MODE 0x0611
#define IL_TYPE_SET 0x0612
#define IL_TYPE_MODE 0x0613
// File definitions
#define IL_FILE_OVERWRITE 0x0620
#define IL_FILE_MODE 0x0621
// Palette definitions
#define IL_CONV_PAL 0x0630
// Load fail definitions
#define IL_DEFAULT_ON_FAIL 0x0632
// Key colour and alpha definitions
#define IL_USE_KEY_COLOUR 0x0635
#define IL_USE_KEY_COLOR 0x0635
#define IL_BLIT_BLEND 0x0636
// Interlace definitions
#define IL_SAVE_INTERLACED 0x0639
#define IL_INTERLACE_MODE 0x063A
// Quantization definitions
#define IL_QUANTIZATION_MODE 0x0640
#define IL_WU_QUANT 0x0641
#define IL_NEU_QUANT 0x0642
#define IL_NEU_QUANT_SAMPLE 0x0643
#define IL_MAX_QUANT_INDEXS 0x0644 //XIX : ILint : Maximum number of colors to reduce to, default of 256. and has a range of 2-256
#define IL_MAX_QUANT_INDICES 0x0644 // Redefined, since the above #define is misspelled
// Hints
#define IL_FASTEST 0x0660
#define IL_LESS_MEM 0x0661
#define IL_DONT_CARE 0x0662
#define IL_MEM_SPEED_HINT 0x0665
#define IL_USE_COMPRESSION 0x0666
#define IL_NO_COMPRESSION 0x0667
#define IL_COMPRESSION_HINT 0x0668
// Compression
#define IL_NVIDIA_COMPRESS 0x0670
#define IL_SQUISH_COMPRESS 0x0671
// Subimage types
#define IL_SUB_NEXT 0x0680
#define IL_SUB_MIPMAP 0x0681
#define IL_SUB_LAYER 0x0682
// Compression definitions
#define IL_COMPRESS_MODE 0x0700
#define IL_COMPRESS_NONE 0x0701
#define IL_COMPRESS_RLE 0x0702
#define IL_COMPRESS_LZO 0x0703
#define IL_COMPRESS_ZLIB 0x0704
// File format-specific values
#define IL_TGA_CREATE_STAMP 0x0710
#define IL_JPG_QUALITY 0x0711
#define IL_PNG_INTERLACE 0x0712
#define IL_TGA_RLE 0x0713
#define IL_BMP_RLE 0x0714
#define IL_SGI_RLE 0x0715
#define IL_TGA_ID_STRING 0x0717
#define IL_TGA_AUTHNAME_STRING 0x0718
#define IL_TGA_AUTHCOMMENT_STRING 0x0719
#define IL_PNG_AUTHNAME_STRING 0x071A
#define IL_PNG_TITLE_STRING 0x071B
#define IL_PNG_DESCRIPTION_STRING 0x071C
#define IL_TIF_DESCRIPTION_STRING 0x071D
#define IL_TIF_HOSTCOMPUTER_STRING 0x071E
#define IL_TIF_DOCUMENTNAME_STRING 0x071F
#define IL_TIF_AUTHNAME_STRING 0x0720
#define IL_JPG_SAVE_FORMAT 0x0721
#define IL_CHEAD_HEADER_STRING 0x0722
#define IL_PCD_PICNUM 0x0723
#define IL_PNG_ALPHA_INDEX 0x0724 //XIX : ILint : the color in the palette at this index value (0-255) is considered transparent, -1 for no trasparent color
#define IL_JPG_PROGRESSIVE 0x0725
#define IL_VTF_COMP 0x0726
// DXTC definitions
#define IL_DXTC_FORMAT 0x0705
#define IL_DXT1 0x0706
#define IL_DXT2 0x0707
#define IL_DXT3 0x0708
#define IL_DXT4 0x0709
#define IL_DXT5 0x070A
#define IL_DXT_NO_COMP 0x070B
#define IL_KEEP_DXTC_DATA 0x070C
#define IL_DXTC_DATA_FORMAT 0x070D
#define IL_3DC 0x070E
#define IL_RXGB 0x070F
#define IL_ATI1N 0x0710
#define IL_DXT1A 0x0711 // Normally the same as IL_DXT1, except for nVidia Texture Tools.
// Environment map definitions
#define IL_CUBEMAP_POSITIVEX 0x00000400
#define IL_CUBEMAP_NEGATIVEX 0x00000800
#define IL_CUBEMAP_POSITIVEY 0x00001000
#define IL_CUBEMAP_NEGATIVEY 0x00002000
#define IL_CUBEMAP_POSITIVEZ 0x00004000
#define IL_CUBEMAP_NEGATIVEZ 0x00008000
#define IL_SPHEREMAP 0x00010000
// Values
#define IL_VERSION_NUM 0x0DE2
#define IL_IMAGE_WIDTH 0x0DE4
#define IL_IMAGE_HEIGHT 0x0DE5
#define IL_IMAGE_DEPTH 0x0DE6
#define IL_IMAGE_SIZE_OF_DATA 0x0DE7
#define IL_IMAGE_BPP 0x0DE8
#define IL_IMAGE_BYTES_PER_PIXEL 0x0DE8
#define IL_IMAGE_BPP 0x0DE8
#define IL_IMAGE_BITS_PER_PIXEL 0x0DE9
#define IL_IMAGE_FORMAT 0x0DEA
#define IL_IMAGE_TYPE 0x0DEB
#define IL_PALETTE_TYPE 0x0DEC
#define IL_PALETTE_SIZE 0x0DED
#define IL_PALETTE_BPP 0x0DEE
#define IL_PALETTE_NUM_COLS 0x0DEF
#define IL_PALETTE_BASE_TYPE 0x0DF0
#define IL_NUM_FACES 0x0DE1
#define IL_NUM_IMAGES 0x0DF1
#define IL_NUM_MIPMAPS 0x0DF2
#define IL_NUM_LAYERS 0x0DF3
#define IL_ACTIVE_IMAGE 0x0DF4
#define IL_ACTIVE_MIPMAP 0x0DF5
#define IL_ACTIVE_LAYER 0x0DF6
#define IL_ACTIVE_FACE 0x0E00
#define IL_CUR_IMAGE 0x0DF7
#define IL_IMAGE_DURATION 0x0DF8
#define IL_IMAGE_PLANESIZE 0x0DF9
#define IL_IMAGE_BPC 0x0DFA
#define IL_IMAGE_OFFX 0x0DFB
#define IL_IMAGE_OFFY 0x0DFC
#define IL_IMAGE_CUBEFLAGS 0x0DFD
#define IL_IMAGE_ORIGIN 0x0DFE
#define IL_IMAGE_CHANNELS 0x0DFF
# if defined __GNUC__ && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0))
// __attribute__((deprecated)) is supported by GCC 3.1 and later.
# define DEPRECATED(D) D __attribute__((deprecated))
# elif defined _MSC_VER && _MSC_VER >= 1300
// __declspec(deprecated) is supported by MSVC 7.0 and later.
# define DEPRECATED(D) __declspec(deprecated) D
# else
# define DEPRECATED (D) D
# endif
//
// Section shamelessly modified from the glut header.
//
// This is from Win32's <windef.h>
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__)
#define ILAPIENTRY __stdcall
#define IL_PACKSTRUCT
//#elif defined(linux) || defined(MACOSX) || defined(__CYGWIN__) //fix bug 840364
#elif defined( __GNUC__ )
// this should work for any of the above commented platforms
// plus any platform using GCC
#ifdef __MINGW32__
#define ILAPIENTRY __stdcall
#else
#define ILAPIENTRY
#endif
#define IL_PACKSTRUCT __attribute__ ((packed))
#else
#define ILAPIENTRY
#define IL_PACKSTRUCT
#endif
// This is from Win32's <wingdi.h> and <winnt.h>
#if defined(__LCC__)
#define ILAPI __stdcall
#elif defined(_WIN32) //changed 20031221 to fix bug 840421
#ifdef IL_STATIC_LIB
#define ILAPI
#else
#ifdef _IL_BUILD_LIBRARY
#define ILAPI __declspec(dllexport)
#else
#define ILAPI __declspec(dllimport)
#endif
#endif
#elif __APPLE__
#define ILAPI extern
#else
#define ILAPI
#endif
#define IL_SEEK_SET 0
#define IL_SEEK_CUR 1
#define IL_SEEK_END 2
#define IL_EOF -1
// Callback functions for file reading
typedef void* ILHANDLE;
typedef void (ILAPIENTRY *fCloseRProc)(ILHANDLE);
typedef ILboolean (ILAPIENTRY *fEofProc) (ILHANDLE);
typedef ILint (ILAPIENTRY *fGetcProc) (ILHANDLE);
typedef ILHANDLE (ILAPIENTRY *fOpenRProc) (ILconst_string);
typedef ILint (ILAPIENTRY *fReadProc) (void*, ILuint, ILuint, ILHANDLE);
typedef ILint (ILAPIENTRY *fSeekRProc) (ILHANDLE, ILint, ILint);
typedef ILint (ILAPIENTRY *fTellRProc) (ILHANDLE);
// Callback functions for file writing
typedef void (ILAPIENTRY *fCloseWProc)(ILHANDLE);
typedef ILHANDLE (ILAPIENTRY *fOpenWProc) (ILconst_string);
typedef ILint (ILAPIENTRY *fPutcProc) (ILubyte, ILHANDLE);
typedef ILint (ILAPIENTRY *fSeekWProc) (ILHANDLE, ILint, ILint);
typedef ILint (ILAPIENTRY *fTellWProc) (ILHANDLE);
typedef ILint (ILAPIENTRY *fWriteProc) (const void*, ILuint, ILuint, ILHANDLE);
// Callback functions for allocation and deallocation
typedef void* (ILAPIENTRY *mAlloc)(const ILsizei);
typedef void (ILAPIENTRY *mFree) (const void* CONST_RESTRICT);
// Registered format procedures
typedef ILenum (ILAPIENTRY *IL_LOADPROC)(ILconst_string);
typedef ILenum (ILAPIENTRY *IL_SAVEPROC)(ILconst_string);
// ImageLib Functions
ILAPI ILboolean ILAPIENTRY ilActiveFace(ILuint Number);
ILAPI ILboolean ILAPIENTRY ilActiveImage(ILuint Number);
ILAPI ILboolean ILAPIENTRY ilActiveLayer(ILuint Number);
ILAPI ILboolean ILAPIENTRY ilActiveMipmap(ILuint Number);
ILAPI ILboolean ILAPIENTRY ilApplyPal(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilApplyProfile(ILstring InProfile, ILstring OutProfile);
ILAPI void ILAPIENTRY ilBindImage(ILuint Image);
ILAPI ILboolean ILAPIENTRY ilBlit(ILuint Source, ILint DestX, ILint DestY, ILint DestZ, ILuint SrcX, ILuint SrcY, ILuint SrcZ, ILuint Width, ILuint Height, ILuint Depth);
ILAPI ILboolean ILAPIENTRY ilClampNTSC(void);
ILAPI void ILAPIENTRY ilClearColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha);
ILAPI ILboolean ILAPIENTRY ilClearImage(void);
ILAPI ILuint ILAPIENTRY ilCloneCurImage(void);
ILAPI ILubyte* ILAPIENTRY ilCompressDXT(ILubyte *Data, ILuint Width, ILuint Height, ILuint Depth, ILenum DXTCFormat, ILuint *DXTCSize);
ILAPI ILboolean ILAPIENTRY ilCompressFunc(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilConvertImage(ILenum DestFormat, ILenum DestType);
ILAPI ILboolean ILAPIENTRY ilConvertPal(ILenum DestFormat);
ILAPI ILboolean ILAPIENTRY ilCopyImage(ILuint Src);
ILAPI ILuint ILAPIENTRY ilCopyPixels(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data);
ILAPI ILuint ILAPIENTRY ilCreateSubImage(ILenum Type, ILuint Num);
ILAPI ILboolean ILAPIENTRY ilDefaultImage(void);
ILAPI void ILAPIENTRY ilDeleteImage(const ILuint Num);
ILAPI void ILAPIENTRY ilDeleteImages(ILsizei Num, const ILuint *Images);
ILAPI ILenum ILAPIENTRY ilDetermineType(ILconst_string FileName);
ILAPI ILenum ILAPIENTRY ilDetermineTypeF(ILHANDLE File);
ILAPI ILenum ILAPIENTRY ilDetermineTypeL(const void *Lump, ILuint Size);
ILAPI ILboolean ILAPIENTRY ilDisable(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilDxtcDataToImage(void);
ILAPI ILboolean ILAPIENTRY ilDxtcDataToSurface(void);
ILAPI ILboolean ILAPIENTRY ilEnable(ILenum Mode);
ILAPI void ILAPIENTRY ilFlipSurfaceDxtcData(void);
ILAPI ILboolean ILAPIENTRY ilFormatFunc(ILenum Mode);
ILAPI void ILAPIENTRY ilGenImages(ILsizei Num, ILuint *Images);
ILAPI ILuint ILAPIENTRY ilGenImage(void);
ILAPI ILubyte* ILAPIENTRY ilGetAlpha(ILenum Type);
ILAPI ILboolean ILAPIENTRY ilGetBoolean(ILenum Mode);
ILAPI void ILAPIENTRY ilGetBooleanv(ILenum Mode, ILboolean *Param);
ILAPI ILubyte* ILAPIENTRY ilGetData(void);
ILAPI ILuint ILAPIENTRY ilGetDXTCData(void *Buffer, ILuint BufferSize, ILenum DXTCFormat);
ILAPI ILenum ILAPIENTRY ilGetError(void);
ILAPI ILint ILAPIENTRY ilGetInteger(ILenum Mode);
ILAPI void ILAPIENTRY ilGetIntegerv(ILenum Mode, ILint *Param);
ILAPI ILuint ILAPIENTRY ilGetLumpPos(void);
ILAPI ILubyte* ILAPIENTRY ilGetPalette(void);
ILAPI ILconst_string ILAPIENTRY ilGetString(ILenum StringName);
ILAPI void ILAPIENTRY ilHint(ILenum Target, ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilInvertSurfaceDxtcDataAlpha(void);
ILAPI void ILAPIENTRY ilInit(void);
ILAPI ILboolean ILAPIENTRY ilImageToDxtcData(ILenum Format);
ILAPI ILboolean ILAPIENTRY ilIsDisabled(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilIsEnabled(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilIsImage(ILuint Image);
ILAPI ILboolean ILAPIENTRY ilIsValid(ILenum Type, ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilIsValidF(ILenum Type, ILHANDLE File);
ILAPI ILboolean ILAPIENTRY ilIsValidL(ILenum Type, void *Lump, ILuint Size);
ILAPI void ILAPIENTRY ilKeyColour(ILclampf Red, ILclampf Green, ILclampf Blue, ILclampf Alpha);
ILAPI ILboolean ILAPIENTRY ilLoad(ILenum Type, ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilLoadF(ILenum Type, ILHANDLE File);
ILAPI ILboolean ILAPIENTRY ilLoadImage(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilLoadL(ILenum Type, const void *Lump, ILuint Size);
ILAPI ILboolean ILAPIENTRY ilLoadPal(ILconst_string FileName);
ILAPI void ILAPIENTRY ilModAlpha(ILdouble AlphaValue);
ILAPI ILboolean ILAPIENTRY ilOriginFunc(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilOverlayImage(ILuint Source, ILint XCoord, ILint YCoord, ILint ZCoord);
ILAPI void ILAPIENTRY ilPopAttrib(void);
ILAPI void ILAPIENTRY ilPushAttrib(ILuint Bits);
ILAPI void ILAPIENTRY ilRegisterFormat(ILenum Format);
ILAPI ILboolean ILAPIENTRY ilRegisterLoad(ILconst_string Ext, IL_LOADPROC Load);
ILAPI ILboolean ILAPIENTRY ilRegisterMipNum(ILuint Num);
ILAPI ILboolean ILAPIENTRY ilRegisterNumFaces(ILuint Num);
ILAPI ILboolean ILAPIENTRY ilRegisterNumImages(ILuint Num);
ILAPI void ILAPIENTRY ilRegisterOrigin(ILenum Origin);
ILAPI void ILAPIENTRY ilRegisterPal(void *Pal, ILuint Size, ILenum Type);
ILAPI ILboolean ILAPIENTRY ilRegisterSave(ILconst_string Ext, IL_SAVEPROC Save);
ILAPI void ILAPIENTRY ilRegisterType(ILenum Type);
ILAPI ILboolean ILAPIENTRY ilRemoveLoad(ILconst_string Ext);
ILAPI ILboolean ILAPIENTRY ilRemoveSave(ILconst_string Ext);
ILAPI void ILAPIENTRY ilResetMemory(void); // Deprecated
ILAPI void ILAPIENTRY ilResetRead(void);
ILAPI void ILAPIENTRY ilResetWrite(void);
ILAPI ILboolean ILAPIENTRY ilSave(ILenum Type, ILconst_string FileName);
ILAPI ILuint ILAPIENTRY ilSaveF(ILenum Type, ILHANDLE File);
ILAPI ILboolean ILAPIENTRY ilSaveImage(ILconst_string FileName);
ILAPI ILuint ILAPIENTRY ilSaveL(ILenum Type, void *Lump, ILuint Size);
ILAPI ILboolean ILAPIENTRY ilSavePal(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilSetAlpha(ILdouble AlphaValue);
ILAPI ILboolean ILAPIENTRY ilSetData(void *Data);
ILAPI ILboolean ILAPIENTRY ilSetDuration(ILuint Duration);
ILAPI void ILAPIENTRY ilSetInteger(ILenum Mode, ILint Param);
ILAPI void ILAPIENTRY ilSetMemory(mAlloc, mFree);
ILAPI void ILAPIENTRY ilSetPixels(ILint XOff, ILint YOff, ILint ZOff, ILuint Width, ILuint Height, ILuint Depth, ILenum Format, ILenum Type, void *Data);
ILAPI void ILAPIENTRY ilSetRead(fOpenRProc, fCloseRProc, fEofProc, fGetcProc, fReadProc, fSeekRProc, fTellRProc);
ILAPI void ILAPIENTRY ilSetString(ILenum Mode, const char *String);
ILAPI void ILAPIENTRY ilSetWrite(fOpenWProc, fCloseWProc, fPutcProc, fSeekWProc, fTellWProc, fWriteProc);
ILAPI void ILAPIENTRY ilShutDown(void);
ILAPI ILboolean ILAPIENTRY ilSurfaceToDxtcData(ILenum Format);
ILAPI ILboolean ILAPIENTRY ilTexImage(ILuint Width, ILuint Height, ILuint Depth, ILubyte NumChannels, ILenum Format, ILenum Type, void *Data);
ILAPI ILboolean ILAPIENTRY ilTexImageDxtc(ILint w, ILint h, ILint d, ILenum DxtFormat, const ILubyte* data);
ILAPI ILenum ILAPIENTRY ilTypeFromExt(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY ilTypeFunc(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilLoadData(ILconst_string FileName, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);
ILAPI ILboolean ILAPIENTRY ilLoadDataF(ILHANDLE File, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);
ILAPI ILboolean ILAPIENTRY ilLoadDataL(void *Lump, ILuint Size, ILuint Width, ILuint Height, ILuint Depth, ILubyte Bpp);
ILAPI ILboolean ILAPIENTRY ilSaveData(ILconst_string FileName);
// For all those weirdos that spell "colour" without the 'u'.
#define ilClearColor ilClearColour
#define ilKeyColor ilKeyColour
#define imemclear(x,y) memset(x,0,y);
#ifdef __cplusplus
}
#endif
#endif // __IL_H__
#endif // __il_h__

View file

@ -0,0 +1,205 @@
#ifndef WRAPPER_H
#define WRAPPER_H
/*#include <il/il.h>
#include <il/ilu.h>*/
#include <IL/ilut.h> // Probably only have to #include this one
#ifdef _MSC_VER
#ifndef _IL_WRAP_BUILD_LIB
#pragma comment(lib, "il_wrap.lib")
#endif
#endif
class ilImage
{
public:
ilImage();
ilImage(char *);
ilImage(const ilImage &);
virtual ~ilImage();
ILboolean Load(char *);
ILboolean Load(char *, ILenum);
ILboolean Save(char *);
ILboolean Save(char *, ILenum);
// ImageLib functions
ILboolean ActiveImage(ILuint);
ILboolean ActiveLayer(ILuint);
ILboolean ActiveMipmap(ILuint);
ILboolean Clear(void);
ILvoid ClearColour(ILclampf, ILclampf, ILclampf, ILclampf);
ILboolean Convert(ILenum);
ILboolean Copy(ILuint);
ILboolean Default(void);
ILboolean Flip(void);
ILboolean SwapColours(void);
ILboolean Resize(ILuint, ILuint, ILuint);
ILboolean TexImage(ILuint, ILuint, ILuint, ILubyte, ILenum, ILenum, ILvoid*);
// Image handling
ILvoid Bind(void) const;
ILvoid Bind(ILuint);
ILvoid Close(void) { this->Delete(); }
ILvoid Delete(void);
ILvoid iGenBind();
ILenum PaletteAlphaIndex();
// Image characteristics
ILuint Width(void);
ILuint Height(void);
ILuint Depth(void);
ILubyte Bpp(void);
ILubyte Bitpp(void);
ILenum PaletteType(void);
ILenum Format(void);
ILenum Type(void);
ILuint NumImages(void);
ILuint NumMipmaps(void);
ILuint GetId(void) const;
ILenum GetOrigin(void);
ILubyte *GetData(void);
ILubyte *GetPalette(void);
// Rendering
ILuint BindImage(void);
ILuint BindImage(ILenum);
// Operators
ilImage& operator = (ILuint);
ilImage& operator = (const ilImage &);
protected:
ILuint Id;
private:
ILvoid iStartUp();
};
class ilFilters
{
public:
static ILboolean Alienify(ilImage &);
static ILboolean BlurAvg(ilImage &, ILuint Iter);
static ILboolean BlurGaussian(ilImage &, ILuint Iter);
static ILboolean Contrast(ilImage &, ILfloat Contrast);
static ILboolean EdgeDetectE(ilImage &);
static ILboolean EdgeDetectP(ilImage &);
static ILboolean EdgeDetectS(ilImage &);
static ILboolean Emboss(ilImage &);
static ILboolean Gamma(ilImage &, ILfloat Gamma);
static ILboolean Negative(ilImage &);
static ILboolean Noisify(ilImage &, ILubyte Factor);
static ILboolean Pixelize(ilImage &, ILuint PixSize);
static ILboolean Saturate(ilImage &, ILfloat Saturation);
static ILboolean Saturate(ilImage &, ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation);
static ILboolean ScaleColours(ilImage &, ILfloat r, ILfloat g, ILfloat b);
static ILboolean Sharpen(ilImage &, ILfloat Factor, ILuint Iter);
};
#ifdef ILUT_USE_OPENGL
class ilOgl
{
public:
static ILvoid Init(void);
static GLuint BindTex(ilImage &);
static ILboolean Upload(ilImage &, ILuint);
static GLuint Mipmap(ilImage &);
static ILboolean Screen(void);
static ILboolean Screenie(void);
};
#endif//ILUT_USE_OPENGL
#ifdef ILUT_USE_ALLEGRO
class ilAlleg
{
public:
static ILvoid Init(void);
static BITMAP *Convert(ilImage &);
};
#endif//ILUT_USE_ALLEGRO
#ifdef ILUT_USE_WIN32
class ilWin32
{
public:
static ILvoid Init(void);
static HBITMAP Convert(ilImage &);
static ILboolean GetClipboard(ilImage &);
static ILvoid GetInfo(ilImage &, BITMAPINFO *Info);
static ILubyte *GetPadData(ilImage &);
static HPALETTE GetPal(ilImage &);
static ILboolean GetResource(ilImage &, HINSTANCE hInst, ILint ID, char *ResourceType);
static ILboolean GetResource(ilImage &, HINSTANCE hInst, ILint ID, char *ResourceType, ILenum Type);
static ILboolean SetClipboard(ilImage &);
};
#endif//ILUT_USE_WIN32
class ilValidate
{
public:
static ILboolean Valid(ILenum, char *);
static ILboolean Valid(ILenum, FILE *);
static ILboolean Valid(ILenum, ILvoid *, ILuint);
protected:
private:
};
class ilState
{
public:
static ILboolean Disable(ILenum);
static ILboolean Enable(ILenum);
static ILvoid Get(ILenum, ILboolean &);
static ILvoid Get(ILenum, ILint &);
static ILboolean GetBool(ILenum);
static ILint GetInt(ILenum);
static const char *GetString(ILenum);
static ILboolean IsDisabled(ILenum);
static ILboolean IsEnabled(ILenum);
static ILboolean Origin(ILenum);
static ILvoid Pop(void);
static ILvoid Push(ILuint);
protected:
private:
};
class ilError
{
public:
static ILvoid Check(ILvoid (*Callback)(const char*));
static ILvoid Check(ILvoid (*Callback)(ILenum));
static ILenum Get(void);
static const char *String(void);
static const char *String(ILenum);
protected:
private:
};
#endif//WRAPPER_H

View file

@ -0,0 +1,195 @@
//-----------------------------------------------------------------------------
//
// ImageLib Utility Sources
// Copyright (C) 2000-2009 by Denton Woods
// Last modified: 03/07/2009
//
// Filename: IL/ilu.h
//
// Description: The main include file for ILU
//
//-----------------------------------------------------------------------------
// Doxygen comment
/*! \file ilu.h
The main include file for ILU
*/
#ifndef __ilu_h_
#ifndef __ILU_H__
#define __ilu_h_
#define __ILU_H__
#include <IL/il.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN32
#if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
#if defined(_MSC_VER) || defined(__BORLANDC__)
#pragma comment(lib, "ILU.lib")
#endif
#endif
#endif
#define ILU_VERSION_1_7_8 1
#define ILU_VERSION 178
#define ILU_FILTER 0x2600
#define ILU_NEAREST 0x2601
#define ILU_LINEAR 0x2602
#define ILU_BILINEAR 0x2603
#define ILU_SCALE_BOX 0x2604
#define ILU_SCALE_TRIANGLE 0x2605
#define ILU_SCALE_BELL 0x2606
#define ILU_SCALE_BSPLINE 0x2607
#define ILU_SCALE_LANCZOS3 0x2608
#define ILU_SCALE_MITCHELL 0x2609
// Error types
#define ILU_INVALID_ENUM 0x0501
#define ILU_OUT_OF_MEMORY 0x0502
#define ILU_INTERNAL_ERROR 0x0504
#define ILU_INVALID_VALUE 0x0505
#define ILU_ILLEGAL_OPERATION 0x0506
#define ILU_INVALID_PARAM 0x0509
// Values
#define ILU_PLACEMENT 0x0700
#define ILU_LOWER_LEFT 0x0701
#define ILU_LOWER_RIGHT 0x0702
#define ILU_UPPER_LEFT 0x0703
#define ILU_UPPER_RIGHT 0x0704
#define ILU_CENTER 0x0705
#define ILU_CONVOLUTION_MATRIX 0x0710
#define ILU_VERSION_NUM IL_VERSION_NUM
#define ILU_VENDOR IL_VENDOR
// Languages
#define ILU_ENGLISH 0x0800
#define ILU_ARABIC 0x0801
#define ILU_DUTCH 0x0802
#define ILU_JAPANESE 0x0803
#define ILU_SPANISH 0x0804
#define ILU_GERMAN 0x0805
#define ILU_FRENCH 0x0806
// Filters
/*
#define ILU_FILTER_BLUR 0x0803
#define ILU_FILTER_GAUSSIAN_3x3 0x0804
#define ILU_FILTER_GAUSSIAN_5X5 0x0805
#define ILU_FILTER_EMBOSS1 0x0807
#define ILU_FILTER_EMBOSS2 0x0808
#define ILU_FILTER_LAPLACIAN1 0x080A
#define ILU_FILTER_LAPLACIAN2 0x080B
#define ILU_FILTER_LAPLACIAN3 0x080C
#define ILU_FILTER_LAPLACIAN4 0x080D
#define ILU_FILTER_SHARPEN1 0x080E
#define ILU_FILTER_SHARPEN2 0x080F
#define ILU_FILTER_SHARPEN3 0x0810
*/
typedef struct ILinfo
{
ILuint Id; // the image's id
ILubyte *Data; // the image's data
ILuint Width; // the image's width
ILuint Height; // the image's height
ILuint Depth; // the image's depth
ILubyte Bpp; // bytes per pixel (not bits) of the image
ILuint SizeOfData; // the total size of the data (in bytes)
ILenum Format; // image format (in IL enum style)
ILenum Type; // image type (in IL enum style)
ILenum Origin; // origin of the image
ILubyte *Palette; // the image's palette
ILenum PalType; // palette type
ILuint PalSize; // palette size
ILenum CubeFlags; // flags for what cube map sides are present
ILuint NumNext; // number of images following
ILuint NumMips; // number of mipmaps
ILuint NumLayers; // number of layers
} ILinfo;
typedef struct ILpointf {
ILfloat x;
ILfloat y;
} ILpointf;
typedef struct ILpointi {
ILint x;
ILint y;
} ILpointi;
ILAPI ILboolean ILAPIENTRY iluAlienify(void);
ILAPI ILboolean ILAPIENTRY iluBlurAvg(ILuint Iter);
ILAPI ILboolean ILAPIENTRY iluBlurGaussian(ILuint Iter);
ILAPI ILboolean ILAPIENTRY iluBuildMipmaps(void);
ILAPI ILuint ILAPIENTRY iluColoursUsed(void);
ILAPI ILboolean ILAPIENTRY iluCompareImage(ILuint Comp);
ILAPI ILboolean ILAPIENTRY iluContrast(ILfloat Contrast);
ILAPI ILboolean ILAPIENTRY iluCrop(ILuint XOff, ILuint YOff, ILuint ZOff, ILuint Width, ILuint Height, ILuint Depth);
ILAPI void ILAPIENTRY iluDeleteImage(ILuint Id); // Deprecated
ILAPI ILboolean ILAPIENTRY iluEdgeDetectE(void);
ILAPI ILboolean ILAPIENTRY iluEdgeDetectP(void);
ILAPI ILboolean ILAPIENTRY iluEdgeDetectS(void);
ILAPI ILboolean ILAPIENTRY iluEmboss(void);
ILAPI ILboolean ILAPIENTRY iluEnlargeCanvas(ILuint Width, ILuint Height, ILuint Depth);
ILAPI ILboolean ILAPIENTRY iluEnlargeImage(ILfloat XDim, ILfloat YDim, ILfloat ZDim);
ILAPI ILboolean ILAPIENTRY iluEqualize(void);
ILAPI ILconst_string ILAPIENTRY iluErrorString(ILenum Error);
ILAPI ILboolean ILAPIENTRY iluConvolution(ILint *matrix, ILint scale, ILint bias);
ILAPI ILboolean ILAPIENTRY iluFlipImage(void);
ILAPI ILboolean ILAPIENTRY iluGammaCorrect(ILfloat Gamma);
ILAPI ILuint ILAPIENTRY iluGenImage(void); // Deprecated
ILAPI void ILAPIENTRY iluGetImageInfo(ILinfo *Info);
ILAPI ILint ILAPIENTRY iluGetInteger(ILenum Mode);
ILAPI void ILAPIENTRY iluGetIntegerv(ILenum Mode, ILint *Param);
ILAPI ILstring ILAPIENTRY iluGetString(ILenum StringName);
ILAPI void ILAPIENTRY iluImageParameter(ILenum PName, ILenum Param);
ILAPI void ILAPIENTRY iluInit(void);
ILAPI ILboolean ILAPIENTRY iluInvertAlpha(void);
ILAPI ILuint ILAPIENTRY iluLoadImage(ILconst_string FileName);
ILAPI ILboolean ILAPIENTRY iluMirror(void);
ILAPI ILboolean ILAPIENTRY iluNegative(void);
ILAPI ILboolean ILAPIENTRY iluNoisify(ILclampf Tolerance);
ILAPI ILboolean ILAPIENTRY iluPixelize(ILuint PixSize);
ILAPI void ILAPIENTRY iluRegionfv(ILpointf *Points, ILuint n);
ILAPI void ILAPIENTRY iluRegioniv(ILpointi *Points, ILuint n);
ILAPI ILboolean ILAPIENTRY iluReplaceColour(ILubyte Red, ILubyte Green, ILubyte Blue, ILfloat Tolerance);
ILAPI ILboolean ILAPIENTRY iluRotate(ILfloat Angle);
ILAPI ILboolean ILAPIENTRY iluRotate3D(ILfloat x, ILfloat y, ILfloat z, ILfloat Angle);
ILAPI ILboolean ILAPIENTRY iluSaturate1f(ILfloat Saturation);
ILAPI ILboolean ILAPIENTRY iluSaturate4f(ILfloat r, ILfloat g, ILfloat b, ILfloat Saturation);
ILAPI ILboolean ILAPIENTRY iluScale(ILuint Width, ILuint Height, ILuint Depth);
ILAPI ILboolean ILAPIENTRY iluScaleAlpha(ILfloat scale);
ILAPI ILboolean ILAPIENTRY iluScaleColours(ILfloat r, ILfloat g, ILfloat b);
ILAPI ILboolean ILAPIENTRY iluSetLanguage(ILenum Language);
ILAPI ILboolean ILAPIENTRY iluSharpen(ILfloat Factor, ILuint Iter);
ILAPI ILboolean ILAPIENTRY iluSwapColours(void);
ILAPI ILboolean ILAPIENTRY iluWave(ILfloat Angle);
#define iluColorsUsed iluColoursUsed
#define iluSwapColors iluSwapColours
#define iluReplaceColor iluReplaceColour
#define iluScaleColor iluScaleColour
#ifdef __cplusplus
}
#endif
#endif // __ILU_H__
#endif // __ilu_h_

View file

@ -0,0 +1,25 @@
//-----------------------------------------------------------------------------
//
// ImageLib Utility Sources
// Copyright (C) 2000-2002 by Denton Woods
// Last modified: 07/09/2002 <--Y2K Compliant! =]
//
// Filename: src-ILU/src/ilu_region.h
//
// Description: Creates an image region.
//
//-----------------------------------------------------------------------------
#ifndef ILU_REGION_H
#define ILU_REGION_H
typedef struct Edge
{
ILint yUpper;
ILfloat xIntersect, dxPerScan;
struct Edge *next;
} Edge;
#endif//ILU_REGION_H

View file

@ -0,0 +1,390 @@
//-----------------------------------------------------------------------------
//
// ImageLib Utility Toolkit Sources
// Copyright (C) 2000-2009 by Denton Woods
// Last modified: 03/07/2009
//
// Filename: IL/ilut.h
//
// Description: The main include file for ILUT
//
//-----------------------------------------------------------------------------
// Doxygen comment
/*! \file ilut.h
The main include file for ILUT
*/
#ifndef __ilut_h_
#ifndef __ILUT_H__
#define __ilut_h_
#define __ILUT_H__
#include <IL/il.h>
#include <IL/ilu.h>
//-----------------------------------------------------------------------------
// Defines
//-----------------------------------------------------------------------------
#define ILUT_VERSION_1_7_8 1
#define ILUT_VERSION 178
// Attribute Bits
#define ILUT_OPENGL_BIT 0x00000001
#define ILUT_D3D_BIT 0x00000002
#define ILUT_ALL_ATTRIB_BITS 0x000FFFFF
// Error Types
#define ILUT_INVALID_ENUM 0x0501
#define ILUT_OUT_OF_MEMORY 0x0502
#define ILUT_INVALID_VALUE 0x0505
#define ILUT_ILLEGAL_OPERATION 0x0506
#define ILUT_INVALID_PARAM 0x0509
#define ILUT_COULD_NOT_OPEN_FILE 0x050A
#define ILUT_STACK_OVERFLOW 0x050E
#define ILUT_STACK_UNDERFLOW 0x050F
#define ILUT_BAD_DIMENSIONS 0x0511
#define ILUT_NOT_SUPPORTED 0x0550
// State Definitions
#define ILUT_PALETTE_MODE 0x0600
#define ILUT_OPENGL_CONV 0x0610
#define ILUT_D3D_MIPLEVELS 0x0620
#define ILUT_MAXTEX_WIDTH 0x0630
#define ILUT_MAXTEX_HEIGHT 0x0631
#define ILUT_MAXTEX_DEPTH 0x0632
#define ILUT_GL_USE_S3TC 0x0634
#define ILUT_D3D_USE_DXTC 0x0634
#define ILUT_GL_GEN_S3TC 0x0635
#define ILUT_D3D_GEN_DXTC 0x0635
#define ILUT_S3TC_FORMAT 0x0705
#define ILUT_DXTC_FORMAT 0x0705
#define ILUT_D3D_POOL 0x0706
#define ILUT_D3D_ALPHA_KEY_COLOR 0x0707
#define ILUT_D3D_ALPHA_KEY_COLOUR 0x0707
#define ILUT_FORCE_INTEGER_FORMAT 0x0636
//This new state does automatic texture target detection
//if enabled. Currently, only cubemap detection is supported.
//if the current image is no cubemap, the 2d texture is chosen.
#define ILUT_GL_AUTODETECT_TEXTURE_TARGET 0x0807
// Values
#define ILUT_VERSION_NUM IL_VERSION_NUM
#define ILUT_VENDOR IL_VENDOR
// The different rendering api's...more to be added later?
#define ILUT_OPENGL 0
#define ILUT_ALLEGRO 1
#define ILUT_WIN32 2
#define ILUT_DIRECT3D8 3
#define ILUT_DIRECT3D9 4
#define ILUT_X11 5
#define ILUT_DIRECT3D10 6
/*
// Includes specific config
#ifdef DJGPP
#define ILUT_USE_ALLEGRO
#elif _WIN32_WCE
#define ILUT_USE_WIN32
#elif _WIN32
//#ifdef __GNUC__ //__CYGWIN32__ (Cygwin seems to not define this with DevIL builds)
#define ILUT_USE_WIN32
#include "IL/config.h"
// Temporary fix for the SDL main() linker bug.
//#ifdef ILUT_USE_SDL
//#undef ILUT_USE_SDL
//#endif//ILUT_USE_SDL
//#else
// #define ILUT_USE_WIN32
// #define ILUT_USE_OPENGL
// #define ILUT_USE_SDL
// #define ILUT_USE_DIRECTX8
//#endif
#elif BEOS // Don't know the #define
#define ILUT_USE_BEOS
#define ILUT_USE_OPENGL
#elif MACOSX
#define ILUT_USE_OPENGL
#else
// We are surely using a *nix so the configure script
// may have written the configured config.h header
#include "IL/config.h"
#endif
*/
#if (defined(_WIN32) || defined(_WIN64))
#if (defined(IL_USE_PRAGMA_LIBS)) && (!defined(_IL_BUILD_LIBRARY))
#if defined(_MSC_VER) || defined(__BORLANDC__)
#pragma comment(lib, "ILUT.lib")
#endif
#endif
#include <IL/ilut_config.h>
#endif
//this should remain private and hidden
//#include "IL/config.h"
//////////////
// OpenGL
//////////////
#ifdef ILUT_USE_OPENGL
#if defined(_MSC_VER) || defined(_WIN32)
//#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif//_MSC_VER
#ifdef __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#include <GL/glu.h>
#endif//__APPLE__
#endif
#ifdef ILUT_USE_WIN32
//#define WIN32_LEAN_AND_MEAN
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#ifndef _WIN32_WCE
#include <crtdbg.h>
#endif
#endif
#include <windows.h>
#endif
//
// If we can avoid including these in all cases thing tend to break less
// and we can keep all of them defined as available
//
// Kriss
//
// ImageLib Utility Toolkit's Allegro Functions
#ifdef ILUT_USE_ALLEGRO
// #include <allegro.h>
#endif//ILUT_USE_ALLEGRO
#ifdef ILUT_USE_SDL
// #include <SDL.h>
#endif
#ifdef ILUT_USE_DIRECTX8
#include <d3d8.h>
#endif//ILUT_USE_DIRECTX9
#ifdef ILUT_USE_DIRECTX9
#include <d3d9.h>
#endif//ILUT_USE_DIRECTX9
#ifdef ILUT_USE_DIRECTX10
#pragma warning(push)
#pragma warning(disable : 4201) // Disables 'nonstandard extension used : nameless struct/union' warning
#include <rpcsal.h>
#include <sal.h>
#include <d3d10.h>
#pragma warning(pop)
#endif//ILUT_USE_DIRECTX10
#ifdef ILUT_USE_X11
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#ifdef ILUT_USE_XSHM
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
#endif//ILUT_USE_XSHM
#endif//ILUT_USE_X11
//-----------------------------------------------------------------------------
// Functions
//-----------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
// ImageLib Utility Toolkit Functions
ILAPI ILboolean ILAPIENTRY ilutDisable(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilutEnable(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilutGetBoolean(ILenum Mode);
ILAPI void ILAPIENTRY ilutGetBooleanv(ILenum Mode, ILboolean *Param);
ILAPI ILint ILAPIENTRY ilutGetInteger(ILenum Mode);
ILAPI void ILAPIENTRY ilutGetIntegerv(ILenum Mode, ILint *Param);
ILAPI ILstring ILAPIENTRY ilutGetString(ILenum StringName);
ILAPI void ILAPIENTRY ilutInit(void);
ILAPI ILboolean ILAPIENTRY ilutIsDisabled(ILenum Mode);
ILAPI ILboolean ILAPIENTRY ilutIsEnabled(ILenum Mode);
ILAPI void ILAPIENTRY ilutPopAttrib(void);
ILAPI void ILAPIENTRY ilutPushAttrib(ILuint Bits);
ILAPI void ILAPIENTRY ilutSetInteger(ILenum Mode, ILint Param);
ILAPI ILboolean ILAPIENTRY ilutRenderer(ILenum Renderer);
// ImageLib Utility Toolkit's OpenGL Functions
#ifdef ILUT_USE_OPENGL
ILAPI GLuint ILAPIENTRY ilutGLBindTexImage();
ILAPI GLuint ILAPIENTRY ilutGLBindMipmaps(void);
ILAPI ILboolean ILAPIENTRY ilutGLBuildMipmaps(void);
ILAPI GLuint ILAPIENTRY ilutGLLoadImage(ILstring FileName);
ILAPI ILboolean ILAPIENTRY ilutGLScreen(void);
ILAPI ILboolean ILAPIENTRY ilutGLScreenie(void);
ILAPI ILboolean ILAPIENTRY ilutGLSaveImage(ILstring FileName, GLuint TexID);
ILAPI ILboolean ILAPIENTRY ilutGLSubTex2D(GLuint TexID, ILuint XOff, ILuint YOff);
ILAPI ILboolean ILAPIENTRY ilutGLSubTex3D(GLuint TexID, ILuint XOff, ILuint YOff, ILuint ZOff);
ILAPI ILboolean ILAPIENTRY ilutGLSetTex2D(GLuint TexID);
ILAPI ILboolean ILAPIENTRY ilutGLSetTex3D(GLuint TexID);
ILAPI ILboolean ILAPIENTRY ilutGLTexImage(GLuint Level);
ILAPI ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, ILuint YOff);
ILAPI ILboolean ILAPIENTRY ilutGLSetTex(GLuint TexID); // Deprecated - use ilutGLSetTex2D.
ILAPI ILboolean ILAPIENTRY ilutGLSubTex(GLuint TexID, ILuint XOff, ILuint YOff); // Use ilutGLSubTex2D.
#endif//ILUT_USE_OPENGL
// ImageLib Utility Toolkit's Allegro Functions
#ifdef ILUT_USE_ALLEGRO
#ifdef __cplusplus
extern "C" {
#endif
#include <allegro.h>
#ifdef __cplusplus
}
#endif
ILAPI BITMAP* ILAPIENTRY ilutAllegLoadImage(ILstring FileName);
ILAPI BITMAP* ILAPIENTRY ilutConvertToAlleg(PALETTE Pal);
#endif//ILUT_USE_ALLEGRO
// ImageLib Utility Toolkit's SDL Functions
#ifdef ILUT_USE_SDL
ILAPI struct SDL_Surface* ILAPIENTRY ilutConvertToSDLSurface(unsigned int flags);
ILAPI struct SDL_Surface* ILAPIENTRY ilutSDLSurfaceLoadImage(ILstring FileName);
ILAPI ILboolean ILAPIENTRY ilutSDLSurfaceFromBitmap(struct SDL_Surface *Bitmap);
#endif//ILUT_USE_SDL
// ImageLib Utility Toolkit's BeOS Functions
#ifdef ILUT_USE_BEOS
ILAPI BBitmap ILAPIENTRY ilutConvertToBBitmap(void);
#endif//ILUT_USE_BEOS
// ImageLib Utility Toolkit's Win32 GDI Functions
#ifdef ILUT_USE_WIN32
ILAPI HBITMAP ILAPIENTRY ilutConvertToHBitmap(HDC hDC);
ILAPI HBITMAP ILAPIENTRY ilutConvertSliceToHBitmap(HDC hDC, ILuint slice);
ILAPI void ILAPIENTRY ilutFreePaddedData(ILubyte *Data);
ILAPI void ILAPIENTRY ilutGetBmpInfo(BITMAPINFO *Info);
ILAPI HPALETTE ILAPIENTRY ilutGetHPal(void);
ILAPI ILubyte* ILAPIENTRY ilutGetPaddedData(void);
ILAPI ILboolean ILAPIENTRY ilutGetWinClipboard(void);
ILAPI ILboolean ILAPIENTRY ilutLoadResource(HINSTANCE hInst, ILint ID, ILstring ResourceType, ILenum Type);
ILAPI ILboolean ILAPIENTRY ilutSetHBitmap(HBITMAP Bitmap);
ILAPI ILboolean ILAPIENTRY ilutSetHPal(HPALETTE Pal);
ILAPI ILboolean ILAPIENTRY ilutSetWinClipboard(void);
ILAPI HBITMAP ILAPIENTRY ilutWinLoadImage(ILstring FileName, HDC hDC);
ILAPI ILboolean ILAPIENTRY ilutWinLoadUrl(ILstring Url);
ILAPI ILboolean ILAPIENTRY ilutWinPrint(ILuint XPos, ILuint YPos, ILuint Width, ILuint Height, HDC hDC);
ILAPI ILboolean ILAPIENTRY ilutWinSaveImage(ILstring FileName, HBITMAP Bitmap);
#endif//ILUT_USE_WIN32
// ImageLib Utility Toolkit's DirectX 8 Functions
#ifdef ILUT_USE_DIRECTX8
// ILAPI void ILAPIENTRY ilutD3D8MipFunc(ILuint NumLevels);
ILAPI struct IDirect3DTexture8* ILAPIENTRY ilutD3D8Texture(struct IDirect3DDevice8 *Device);
ILAPI struct IDirect3DVolumeTexture8* ILAPIENTRY ilutD3D8VolumeTexture(struct IDirect3DDevice8 *Device);
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFile(struct IDirect3DDevice8 *Device, char *FileName, struct IDirect3DTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFile(struct IDirect3DDevice8 *Device, char *FileName, struct IDirect3DVolumeTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileInMemory(struct IDirect3DDevice8 *Device, void *Lump, ILuint Size, struct IDirect3DTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileInMemory(struct IDirect3DDevice8 *Device, void *Lump, ILuint Size, struct IDirect3DVolumeTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromFileHandle(struct IDirect3DDevice8 *Device, ILHANDLE File, struct IDirect3DTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromFileHandle(struct IDirect3DDevice8 *Device, ILHANDLE File, struct IDirect3DVolumeTexture8 **Texture);
// These two are not tested yet.
ILAPI ILboolean ILAPIENTRY ilutD3D8TexFromResource(struct IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8VolTexFromResource(struct IDirect3DDevice8 *Device, HMODULE SrcModule, char *SrcResource, struct IDirect3DVolumeTexture8 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D8LoadSurface(struct IDirect3DDevice8 *Device, struct IDirect3DSurface8 *Surface);
#endif//ILUT_USE_DIRECTX8
#ifdef ILUT_USE_DIRECTX9
#pragma warning(push)
#pragma warning(disable : 4115) // Disables 'named type definition in parentheses' warning
// ILAPI void ILAPIENTRY ilutD3D9MipFunc(ILuint NumLevels);
ILAPI struct IDirect3DTexture9* ILAPIENTRY ilutD3D9Texture (struct IDirect3DDevice9* Device);
ILAPI struct IDirect3DVolumeTexture9* ILAPIENTRY ilutD3D9VolumeTexture (struct IDirect3DDevice9* Device);
ILAPI struct IDirect3DCubeTexture9* ILAPIENTRY ilutD3D9CubeTexture (struct IDirect3DDevice9* Device);
ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFile(struct IDirect3DDevice9 *Device, ILconst_string FileName, struct IDirect3DCubeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileInMemory(struct IDirect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DCubeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DCubeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9CubeTexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDirect3DCubeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFile(struct IDirect3DDevice9 *Device, ILconst_string FileName, struct IDirect3DTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFile(struct IDirect3DDevice9 *Device, ILconst_string FileName, struct IDirect3DVolumeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileInMemory(struct IDirect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileInMemory(struct IDirect3DDevice9 *Device, void *Lump, ILuint Size, struct IDirect3DVolumeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromFileHandle(struct IDirect3DDevice9 *Device, ILHANDLE File, struct IDirect3DVolumeTexture9 **Texture);
// These three are not tested yet.
ILAPI ILboolean ILAPIENTRY ilutD3D9TexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDirect3DTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9VolTexFromResource(struct IDirect3DDevice9 *Device, HMODULE SrcModule, ILconst_string SrcResource, struct IDirect3DVolumeTexture9 **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D9LoadSurface(struct IDirect3DDevice9 *Device, struct IDirect3DSurface9 *Surface);
#pragma warning(pop)
#endif//ILUT_USE_DIRECTX9
#ifdef ILUT_USE_DIRECTX10
ILAPI ID3D10Texture2D* ILAPIENTRY ilutD3D10Texture(ID3D10Device *Device);
ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFile(ID3D10Device *Device, ILconst_string FileName, ID3D10Texture2D **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFileInMemory(ID3D10Device *Device, void *Lump, ILuint Size, ID3D10Texture2D **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromResource(ID3D10Device *Device, HMODULE SrcModule, ILconst_string SrcResource, ID3D10Texture2D **Texture);
ILAPI ILboolean ILAPIENTRY ilutD3D10TexFromFileHandle(ID3D10Device *Device, ILHANDLE File, ID3D10Texture2D **Texture);
#endif//ILUT_USE_DIRECTX10
#ifdef ILUT_USE_X11
ILAPI XImage * ILAPIENTRY ilutXCreateImage( Display* );
ILAPI Pixmap ILAPIENTRY ilutXCreatePixmap( Display*,Drawable );
ILAPI XImage * ILAPIENTRY ilutXLoadImage( Display*,char* );
ILAPI Pixmap ILAPIENTRY ilutXLoadPixmap( Display*,Drawable,char* );
#ifdef ILUT_USE_XSHM
ILAPI XImage * ILAPIENTRY ilutXShmCreateImage( Display*,XShmSegmentInfo* );
ILAPI void ILAPIENTRY ilutXShmDestroyImage( Display*,XImage*,XShmSegmentInfo* );
ILAPI Pixmap ILAPIENTRY ilutXShmCreatePixmap( Display*,Drawable,XShmSegmentInfo* );
ILAPI void ILAPIENTRY ilutXShmFreePixmap( Display*,Pixmap,XShmSegmentInfo* );
ILAPI XImage * ILAPIENTRY ilutXShmLoadImage( Display*,char*,XShmSegmentInfo* );
ILAPI Pixmap ILAPIENTRY ilutXShmLoadPixmap( Display*,Drawable,char*,XShmSegmentInfo* );
#endif//ILUT_USE_XSHM
#endif//ILUT_USE_X11
#ifdef __cplusplus
}
#endif
#endif // __ILUT_H__
#endif // __ilut_h_

View file

@ -0,0 +1,26 @@
#ifndef __ILUT_CONFIG_H__
#define __ILUT_CONFIG_H__
#define IL_USE_PRAGMA_LIBS
// Supported APIs (ILUT)
//
// sorry just
// can't get this one to work under windows
// have disabled for the now
//
// will look at it some more later
//
// Kriss
//
#undef ILUT_USE_ALLEGRO
#undef ILUT_USE_DIRECTX8
//#define ILUT_USE_DIRECTX9
//#define ILUT_USE_DIRECTX10
#define ILUT_USE_OPENGL
//#define ILUT_USE_SDL
#define ILUT_USE_WIN32
#endif//__ILUT_CONFIG_H__