1 module dmagick.c.compress;
2 
3 import dmagick.c.image;
4 import dmagick.c.magickType;
5 
6 extern(C)
7 {
8 	/**
9 	 * Express the desired compression type when encoding an image. Be aware
10 	 * that most image types only support a sub-set of the available
11 	 * compression types. If the compression type specified is incompatible
12 	 * with the image, ImageMagick selects a compression type compatible
13 	 * with the image type.
14 	 */
15 	enum CompressionType
16 	{
17 		/** */
18 		UndefinedCompression,
19 
20 		/**
21 		 * The default for most formats.
22 		 */
23 		NoCompression,
24 		
25 		/**
26 		 * BZip (Burrows-Wheeler block-sorting text compression algorithm
27 		 * and Huffman coding) as used by bzip2 utilities
28 		 */
29 		BZipCompression,
30 		
31 		/** */
32 		DXT1Compression,
33 		
34 		/** */
35 		DXT3Compression,
36 		
37 		/** */
38 		DXT5Compression,
39 		
40 		/**
41 		 * CCITT Group 3 FAX compression.
42 		 */
43 		FaxCompression,
44 		
45 		/**
46 		 * CCITT Group 4 FAX compression (used only for TIFF).
47 		 */
48 		Group4Compression,
49 		
50 		/**
51 		 * JPEG compression.
52 		 * 
53 		 * See_Also: $(LINK2 http://www.faqs.org/faqs/jpeg-faq/part1/,
54 		 *     The JPEG image compression FAQ).
55 		 */
56 		JPEGCompression,
57 		
58 		/**
59 		 * JPEG2000 compression for compressed PDF images.
60 		 * 
61 		 * ISO/IEC std 15444-1
62 		 */
63 		JPEG2000Compression,
64 		
65 		/** */
66 		LosslessJPEGCompression,
67 		
68 		/**
69 		 * Lempel-Ziv-Welch (LZW) compression.
70 		 */
71 		LZWCompression,
72 		
73 		/**
74 		 * Run-length encoding.
75 		 * 
76 		 * See_Also: $(LINK2 http://en.wikipedia.org/wiki/Run_length_encoding,
77 		 *     Wikipedia).
78 		 */
79 		RLECompression,
80 		
81 		/**
82 		 * Lempel-Ziv compression (LZ77) as used in PKZIP and GNU gzip.
83 		 */
84 		ZipCompression,
85 		
86 		/** */
87 		ZipSCompression,
88 		
89 		/** */
90 		PizCompression,
91 		
92 		/** */
93 		Pxr24Compression,
94 		
95 		/** */
96 		B44Compression,
97 		
98 		/** */
99 		B44ACompression,
100 		
101 		/**
102 		 * Lempel-Ziv-Markov chain algorithm
103 		 */
104 		LZMACompression,
105 		
106 		/**
107 		 * ISO/IEC std 11544 / ITU-T rec T.82
108 		 */
109 		JBIG1Compression,
110 		
111 		/**
112 		 * ISO/IEC std 14492 / ITU-T rec T.88
113 		 */
114 		JBIG2Compression
115 	}
116 
117 	struct Ascii85Info {}
118 
119 	MagickBooleanType HuffmanDecodeImage(Image*);
120 	MagickBooleanType HuffmanEncodeImage(const(ImageInfo)*, Image*, Image*);
121 	MagickBooleanType LZWEncodeImage(Image*, const size_t, ubyte*);
122 	MagickBooleanType PackbitsEncodeImage(Image*, const size_t, ubyte*);
123 	MagickBooleanType ZLIBEncodeImage(Image*, const size_t, ubyte*);
124 
125 	void Ascii85Encode(Image*, const ubyte);
126 	void Ascii85Flush(Image*);
127 	void Ascii85Initialize(Image*);
128 }