tdelibs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OBATA Akio 9e6c88287f
Change to define __STDC_LIMIT_MACROS first
3 weeks ago
..
AUTHORS Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 9 years ago
CMakeLists.txt Revert commit 1d498994 4 years ago
ChangeLog Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
Mainpage.dox Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
Makefile.am LIB_QT -> LIB_TQT conversion to align to updated admin module 5 months ago
README Rename a number of libraries and executables to avoid conflicts with KDE4 6 years ago
bmp.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 9 years ago
configure.in.in Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
dds.cpp Rename additional header files to avoid conflicts with KDE4 6 years ago
dds.h TQt conversion fixes 8 years ago
dds.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
eps.cpp Rename additional header files to avoid conflicts with KDE4 6 years ago
eps.h Trinity Qt initial conversion 8 years ago
eps.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
exr.cpp Rename additional header files to avoid conflicts with KDE4 6 years ago
exr.h TQt conversion fixes 8 years ago
exr.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
g3.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
g3r.cpp Trinity Qt initial conversion 8 years ago
g3r.h TQt conversion fixes 8 years ago
gif.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
gimp.h Rename additional header files to avoid conflicts with KDE4 6 years ago
hdr.cpp Rename additional header files to avoid conflicts with KDE4 6 years ago
hdr.h TQt conversion fixes 8 years ago
hdr.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
ico.cpp Remove additional unneeded tq method conversions 7 years ago
ico.h TQt conversion fixes 8 years ago
ico.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
jp2.cpp Change to define __STDC_LIMIT_MACROS first 3 weeks ago
jp2.h TQt conversion fixes 8 years ago
jp2.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
jpeg.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
mng.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
pbm.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
pcx.cpp Remove additional unneeded tq method conversions 7 years ago
pcx.h Initial conversion for TQt for Qt4 3.4.0 TP2 This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! 8 years ago
pcx.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
pgm.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
png.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
ppm.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
psd.cpp Remove additional unneeded tq method conversions 7 years ago
psd.h TQt conversion fixes 8 years ago
psd.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
rgb.cpp Fix remnant QMIN/QMAX to TQMIN/TQMAX. 5 years ago
rgb.h Fix kdelibs FTBFS on native TQt3 7 years ago
rgb.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
tga.cpp Remove additional unneeded tq method conversions 7 years ago
tga.h TQt conversion fixes 8 years ago
tga.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
tiff.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
tiffr.cpp Remove additional unneeded tq method conversions 7 years ago
tiffr.h TQt conversion fixes 8 years ago
xbm.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
xcf.cpp Fix remnant QMIN/QMAX to TQMIN/TQMAX. 5 years ago
xcf.h Initial conversion for TQt for Qt4 3.4.0 TP2 This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! 8 years ago
xcf.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
xpm.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
xv.kimgio Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 9 years ago
xview.cpp Remove additional unneeded tq method conversions 7 years ago
xview.h TQt conversion fixes 8 years ago

README

KDE Image I/O library
---------------------
This library allows applications that use the Qt library
(i.e. QImageIO, QImage, QPixmap and friends) to read and
write images in extra formats. Current formats include:

JPEG <read> <write>
JPEG2000 <read> <write>
XV <read> <write>
EPS <read> <write>
NETPBM <incomplete>
PNG <read> <write, only with newer libraries>
TIFF <read>
TGA <read> <write>
PCX <read> <write>
SGI <read> <write> (images/x-rgb: *.bw, *.rgb, *.rgba, *.sgi)
DDS <read>
XCF <read>

(Some example files are in kdenonbeta/kimgio_examples.)


To use these formats, you only need to:

1. link the application with the libtdeio library
2. Include the <kimageio.h> header
3. call KImageIO::registerFormats() once, somewhere in your code
before you load an image.

Writing handlers
----------------

0. Please read the documentation for the QImageIO class in the Qt
documentation.

1. When writing handlers, there is a function naming convention;
suppose, for example, we were writing PNG read and write handlers,
we would name them

void kimgio_png_read ( QImageIO * );
void kimgio_png_write( QImageIO * );

ie

kimgio_<format>_<read/write>

This should reduce the chance of identifier clashes with other code.

2. Remember that a given KDE application may try to load dozens of
images at once such as when loading icons, or creating thumbnails.
Also, it may well be loading them over a network connection.
Therefore,

- Avoid creating temporary files or allocating too much memory
when decoding and encoding. Especially try to avoid firing off
external programs.

- Don't assume that the IODevice which is the source or target
of the image data is pointing to a file on the local filesystem.
Use the IODevice methods to read and write image data.

- Check for file corruption or premature end of the image,
especially before using values read from the file
e.g. for memory allocations.

3. If you only have either a reader or the writer for a particular
format, don't use NULL in QImageIO::defineIOHandler. Instead, write
a stub function for the unimplemented handler which displays a message
on standard output. This prevents kimgio-using programs dumping core
when attempting to call the unimplemented handler.


Yours in good faith and pedantry,

Sirtaj Singh Kang <taj@kde.org>, 23 September 1998.