File: formats.cpp

package info (click to toggle)
kdegraphics 2%3A980312-3
  • links: PTS
  • area: contrib
  • in suites: hamm
  • size: 6,168 kB
  • ctags: 5,778
  • sloc: ansic: 26,607; cpp: 21,205; sh: 5,224; makefile: 1,651; perl: 108
file content (50 lines) | stat: -rw-r--r-- 984 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

/////////////
// formats.cpp -- define QImage IO handlers for new graphic
// file formats.

// Sirtaj Kang, Oct '96.

// $Id: formats.cpp,v 1.6 1998/02/24 14:40:29 kulow Exp $

#include<stdio.h>
#include<string.h>
#include<stdlib.h>

#include<qimage.h>

#include"viewport.h"
#include"formats.h"


void WViewPort::registerFormats()
{

#ifdef HAVE_LIBJPEG
        QImageIO::defineIOHandler("JFIF","^\377\330\377\340..JFIF", 0,
                read_jpeg_jfif, NULL);
#endif

#ifdef HAVE_LIBPNG
	QImageIO::defineIOHandler("PNG","^\211PNG\015\012\32\012", 0,
		read_png_file, NULL);	
#endif

//
// Add new format handlers here
//
	
	QImageIO::defineIOHandler("PS","^%!PS-Adobe-[1-2]", 0,
		read_ps_epsf, NULL);	

	QImageIO::defineIOHandler("PCX","^\012", 0,
		read_pcx, NULL);	
	QImageIO::defineIOHandler("ILBM","^FORM....ILBM", 0,
		read_ilbm, NULL);	

	QImageIO::defineIOHandler("TGA","^\024", 0,
		read_tga, NULL);	
	QImageIO::defineIOHandler("TGA","^\001", 0,
		read_tga, NULL);	
	
}