poppler 2.2.0-x86-mingw32 → 2.2.1-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +5 -5
- data/ext/poppler/extconf.rb +1 -1
- data/lib/2.0/poppler.so +0 -0
- data/test/test_annotation.rb +3 -1
- data/test/test_page.rb +0 -18
- data/vendor/local/bin/cjpeg.exe +0 -0
- data/vendor/local/bin/djpeg.exe +0 -0
- data/vendor/local/bin/jpegtran.exe +0 -0
- data/vendor/local/bin/libjpeg-9.dll +0 -0
- data/vendor/local/bin/{libpoppler-44.dll → libpoppler-46.dll} +0 -0
- data/vendor/local/bin/libpoppler-cpp-0.dll +0 -0
- data/vendor/local/bin/libpoppler-glib-8.dll +0 -0
- data/vendor/local/bin/libsqlite3-0.dll +0 -0
- data/vendor/local/bin/pdfdetach.exe +0 -0
- data/vendor/local/bin/pdffonts.exe +0 -0
- data/vendor/local/bin/pdfimages.exe +0 -0
- data/vendor/local/bin/pdfinfo.exe +0 -0
- data/vendor/local/bin/pdfseparate.exe +0 -0
- data/vendor/local/bin/pdftocairo.exe +0 -0
- data/vendor/local/bin/pdftohtml.exe +0 -0
- data/vendor/local/bin/pdftoppm.exe +0 -0
- data/vendor/local/bin/pdftops.exe +0 -0
- data/vendor/local/bin/pdftotext.exe +0 -0
- data/vendor/local/bin/pdfunite.exe +0 -0
- data/vendor/local/bin/rdjpgcom.exe +0 -0
- data/vendor/local/bin/sqlite3.exe +0 -0
- data/vendor/local/bin/wrjpgcom.exe +0 -0
- data/vendor/local/include/jconfig.h +7 -1
- data/vendor/local/include/jmorecfg.h +68 -12
- data/vendor/local/include/jpeglib.h +19 -12
- data/vendor/local/include/poppler/cpp/poppler-document.h +104 -0
- data/vendor/local/include/poppler/cpp/poppler-embedded-file.h +55 -0
- data/vendor/local/include/poppler/cpp/poppler-font.h +91 -0
- data/vendor/local/include/poppler/cpp/poppler-global.h +111 -0
- data/vendor/local/include/poppler/cpp/poppler-image.h +71 -0
- data/vendor/local/include/poppler/cpp/poppler-page-renderer.h +66 -0
- data/vendor/local/include/poppler/cpp/poppler-page-transition.h +82 -0
- data/vendor/local/include/poppler/cpp/poppler-page.h +76 -0
- data/vendor/local/include/poppler/cpp/poppler-rectangle.h +84 -0
- data/vendor/local/include/poppler/cpp/poppler-toc.h +74 -0
- data/vendor/local/include/poppler/cpp/poppler-version.h +39 -0
- data/vendor/local/include/poppler/glib/poppler-annot.h +64 -0
- data/vendor/local/include/poppler/glib/poppler-enums.h +34 -0
- data/vendor/local/include/poppler/glib/poppler-features.h +1 -1
- data/vendor/local/include/poppler/glib/poppler-media.h +1 -1
- data/vendor/local/include/poppler/glib/poppler-page.h +61 -0
- data/vendor/local/include/poppler/glib/poppler-structure-element.h +357 -0
- data/vendor/local/include/poppler/glib/poppler.h +11 -1
- data/vendor/local/include/sqlite3.h +245 -89
- data/vendor/local/lib/girepository-1.0/Poppler-0.18.typelib +0 -0
- data/vendor/local/lib/libjpeg.a +0 -0
- data/vendor/local/lib/libjpeg.dll.a +0 -0
- data/vendor/local/lib/libjpeg.la +2 -2
- data/vendor/local/lib/libpoppler-cpp.a +0 -0
- data/vendor/local/lib/libpoppler-cpp.dll.a +0 -0
- data/vendor/local/lib/libpoppler-cpp.la +41 -0
- data/vendor/local/lib/libpoppler-glib.a +0 -0
- data/vendor/local/lib/libpoppler-glib.dll.a +0 -0
- data/vendor/local/lib/libpoppler-glib.la +2 -2
- data/vendor/local/lib/libpoppler.a +0 -0
- data/vendor/local/lib/libpoppler.dll.a +0 -0
- data/vendor/local/lib/libpoppler.la +4 -4
- data/vendor/local/lib/libsqlite3.a +0 -0
- data/vendor/local/lib/libsqlite3.dll.a +0 -0
- data/vendor/local/lib/libsqlite3.la +1 -1
- data/vendor/local/lib/pkgconfig/poppler-cairo.pc +2 -2
- data/vendor/local/lib/pkgconfig/poppler-cpp.pc +13 -0
- data/vendor/local/lib/pkgconfig/poppler-glib.pc +2 -2
- data/vendor/local/lib/pkgconfig/poppler-splash.pc +2 -2
- data/vendor/local/lib/pkgconfig/poppler.pc +1 -1
- data/vendor/local/lib/pkgconfig/sqlite3.pc +2 -2
- data/vendor/local/share/gir-1.0/Poppler-0.18.gir +2993 -169
- data/vendor/local/share/gtk-doc/html/poppler/PopplerAnnot.html +2674 -1137
- data/vendor/local/share/gtk-doc/html/poppler/PopplerAttachment.html +186 -133
- data/vendor/local/share/gtk-doc/html/poppler/PopplerDocument.html +2523 -1782
- data/vendor/local/share/gtk-doc/html/poppler/PopplerFormField.html +1071 -738
- data/vendor/local/share/gtk-doc/html/poppler/PopplerLayer.html +225 -146
- data/vendor/local/share/gtk-doc/html/poppler/PopplerMedia.html +276 -201
- data/vendor/local/share/gtk-doc/html/poppler/PopplerMovie.html +142 -101
- data/vendor/local/share/gtk-doc/html/poppler/PopplerPage.html +2191 -1421
- data/vendor/local/share/gtk-doc/html/poppler/PopplerStructureElement.html +3781 -0
- data/vendor/local/share/gtk-doc/html/poppler/annotation-glossary.html +30 -44
- data/vendor/local/share/gtk-doc/html/poppler/api-index-0-12.html +34 -39
- data/vendor/local/share/gtk-doc/html/poppler/api-index-0-14.html +27 -32
- data/vendor/local/share/gtk-doc/html/poppler/api-index-0-16.html +50 -55
- data/vendor/local/share/gtk-doc/html/poppler/api-index-0-18.html +23 -28
- data/vendor/local/share/gtk-doc/html/poppler/api-index-0-20.html +12 -15
- data/vendor/local/share/gtk-doc/html/poppler/api-index-0-22.html +18 -23
- data/vendor/local/share/gtk-doc/html/poppler/api-index-deprecated.html +12 -15
- data/vendor/local/share/gtk-doc/html/poppler/api-index-full.html +762 -280
- data/vendor/local/share/gtk-doc/html/poppler/ch01.html +12 -9
- data/vendor/local/share/gtk-doc/html/poppler/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/poppler/index.html +7 -4
- data/vendor/local/share/gtk-doc/html/poppler/index.sgml +258 -269
- data/vendor/local/share/gtk-doc/html/poppler/left-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/poppler/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/poppler/poppler-PopplerAction.html +454 -320
- data/vendor/local/share/gtk-doc/html/poppler/poppler-Version-and-Features-Information.html +102 -76
- data/vendor/local/share/gtk-doc/html/poppler/poppler-poppler.html +367 -278
- data/vendor/local/share/gtk-doc/html/poppler/poppler.devhelp2 +356 -409
- data/vendor/local/share/gtk-doc/html/poppler/right-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/poppler/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/poppler/style.css +314 -104
- data/vendor/local/share/gtk-doc/html/poppler/up-insensitive.png +0 -0
- data/vendor/local/share/gtk-doc/html/poppler/up.png +0 -0
- data/vendor/local/share/man/man1/cjpeg.1 +23 -2
- data/vendor/local/share/man/man1/djpeg.1 +2 -2
- data/vendor/local/share/man/man1/jpegtran.1 +12 -4
- data/vendor/local/share/man/man1/pdfimages.1 +78 -7
- data/vendor/local/share/man/man1/pdfinfo.1 +6 -0
- data/vendor/local/share/man/man1/pdftocairo.1 +9 -17
- data/vendor/local/share/man/man1/pdftohtml.1 +1 -1
- data/vendor/local/share/man/man1/pdftoppm.1 +12 -0
- data/vendor/local/share/man/man1/pdftops.1 +10 -20
- data/vendor/local/share/man/man1/rdjpgcom.1 +1 -1
- data/vendor/local/share/man/man1/sqlite3.1 +72 -22
- metadata +34 -15
- data/lib/1.9/poppler.so +0 -0
- data/lib/2.1/poppler.so +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fbd163a340b57d36400ae3b88d47a8b0768f5c0
|
4
|
+
data.tar.gz: 016be96c275bbef923de1243e6760e1c6efee5f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dc368d37b1be1e2cd382873f4667d2a41941dc7a27566e2237f3ed8d52a67f7d5395fca3e564e9e29eef10d8d508a2b3b9b2d463cf145ae8cb22ebb9daf0428
|
7
|
+
data.tar.gz: b32292494cb1318897b15d205ee25b3b6a5c05931c9f4761aa7d520e29b5ac8f14955de092b8f98a903878f268a43fd8b6d14450247f40741734ce70e0edbdb1
|
data/Rakefile
CHANGED
@@ -37,8 +37,8 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
|
|
37
37
|
package.external_packages = [
|
38
38
|
{
|
39
39
|
:name => "libjpeg",
|
40
|
-
:base_name => "jpeg-
|
41
|
-
:archive_base_name => "jpegsrc.
|
40
|
+
:base_name => "jpeg-9a",
|
41
|
+
:archive_base_name => "jpegsrc.v9a.tar.gz",
|
42
42
|
:download_base_url => "http://www.ijg.org/files",
|
43
43
|
:label => "libjpeg",
|
44
44
|
:windows => {
|
@@ -48,9 +48,9 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
|
|
48
48
|
},
|
49
49
|
{
|
50
50
|
:name => "sqlite-autoconf",
|
51
|
-
:download_base_url => "http://www.sqlite.org/
|
51
|
+
:download_base_url => "http://www.sqlite.org/2014",
|
52
52
|
:label => "SQLite",
|
53
|
-
:version => "
|
53
|
+
:version => "3080600",
|
54
54
|
:compression_method => "gz",
|
55
55
|
:windows => {
|
56
56
|
:configure_args => [],
|
@@ -61,7 +61,7 @@ package_task = GNOME2::Rake::PackageTask.new do |package|
|
|
61
61
|
:name => "poppler",
|
62
62
|
:download_base_url => "http://poppler.freedesktop.org",
|
63
63
|
:label => "Poppler",
|
64
|
-
:version => "0.
|
64
|
+
:version => "0.26.5",
|
65
65
|
:compression_method => "xz",
|
66
66
|
:windows => {
|
67
67
|
:configure_args => [
|
data/ext/poppler/extconf.rb
CHANGED
@@ -61,7 +61,7 @@ setup_win32(module_name, base_dir)
|
|
61
61
|
unless required_pkg_config_package([package_id, 0, 12, 0],
|
62
62
|
:debian => "libpoppler-glib-dev",
|
63
63
|
:redhat => "poppler-glib-devel",
|
64
|
-
|
64
|
+
:homebrew => "poppler",
|
65
65
|
:macports => "poppler")
|
66
66
|
exit(false)
|
67
67
|
end
|
data/lib/2.0/poppler.so
CHANGED
Binary file
|
data/test/test_annotation.rb
CHANGED
data/test/test_page.rb
CHANGED
@@ -30,24 +30,6 @@ class TestPage < Test::Unit::TestCase
|
|
30
30
|
assert_kind_of(Poppler::Annotation, mapping.annotation)
|
31
31
|
end
|
32
32
|
|
33
|
-
def test_render
|
34
|
-
only_poppler_version(0, 20, 0)
|
35
|
-
document = Poppler::Document.new(image_pdf)
|
36
|
-
page = document[0]
|
37
|
-
png = StringIO.new
|
38
|
-
png.set_encoding("ASCII-8BIT")
|
39
|
-
Cairo::ImageSurface.new(:argb32, *page.size) do |surface|
|
40
|
-
Cairo::Context.new(surface) do |context|
|
41
|
-
page.render(context)
|
42
|
-
end
|
43
|
-
surface.write_to_png(png)
|
44
|
-
end
|
45
|
-
File.open(image_png, "rb") do |image|
|
46
|
-
# TODO: support image diff
|
47
|
-
assert_equal(image.read, png.string)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
33
|
private
|
52
34
|
def find_first_image_mapping(document)
|
53
35
|
document.each do |page|
|
data/vendor/local/bin/cjpeg.exe
CHANGED
Binary file
|
data/vendor/local/bin/djpeg.exe
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -18,11 +18,17 @@
|
|
18
18
|
/* Define this if you get warnings about undefined structures. */
|
19
19
|
/* #undef INCOMPLETE_TYPES_BROKEN */
|
20
20
|
|
21
|
-
/* Define "boolean" as unsigned char, not
|
21
|
+
/* Define "boolean" as unsigned char, not enum, on Windows systems. */
|
22
22
|
#ifdef _WIN32
|
23
23
|
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
|
24
24
|
typedef unsigned char boolean;
|
25
25
|
#endif
|
26
|
+
#ifndef FALSE /* in case these macros already exist */
|
27
|
+
#define FALSE 0 /* values of boolean */
|
28
|
+
#endif
|
29
|
+
#ifndef TRUE
|
30
|
+
#define TRUE 1
|
31
|
+
#endif
|
26
32
|
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
|
27
33
|
#endif
|
28
34
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* jmorecfg.h
|
3
3
|
*
|
4
4
|
* Copyright (C) 1991-1997, Thomas G. Lane.
|
5
|
-
* Modified 1997-
|
5
|
+
* Modified 1997-2013 by Guido Vollbeding.
|
6
6
|
* This file is part of the Independent JPEG Group's software.
|
7
7
|
* For conditions of distribution and use, see the accompanying README file.
|
8
8
|
*
|
@@ -15,13 +15,22 @@
|
|
15
15
|
/*
|
16
16
|
* Define BITS_IN_JSAMPLE as either
|
17
17
|
* 8 for 8-bit sample values (the usual setting)
|
18
|
+
* 9 for 9-bit sample values
|
19
|
+
* 10 for 10-bit sample values
|
20
|
+
* 11 for 11-bit sample values
|
18
21
|
* 12 for 12-bit sample values
|
19
|
-
* Only 8 and 12
|
20
|
-
*
|
21
|
-
*
|
22
|
+
* Only 8, 9, 10, 11, and 12 bits sample data precision are supported for
|
23
|
+
* full-feature DCT processing. Further depths up to 16-bit may be added
|
24
|
+
* later for the lossless modes of operation.
|
25
|
+
* Run-time selection and conversion of data precision will be added later
|
26
|
+
* and are currently not supported, sorry.
|
27
|
+
* Exception: The transcoding part (jpegtran) supports all settings in a
|
28
|
+
* single instance, since it operates on the level of DCT coefficients and
|
29
|
+
* not sample values. The DCT coefficients are of the same type (16 bits)
|
30
|
+
* in all cases (see below).
|
22
31
|
*/
|
23
32
|
|
24
|
-
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
|
33
|
+
#define BITS_IN_JSAMPLE 8 /* use 8, 9, 10, 11, or 12 */
|
25
34
|
|
26
35
|
|
27
36
|
/*
|
@@ -77,6 +86,48 @@ typedef char JSAMPLE;
|
|
77
86
|
#endif /* BITS_IN_JSAMPLE == 8 */
|
78
87
|
|
79
88
|
|
89
|
+
#if BITS_IN_JSAMPLE == 9
|
90
|
+
/* JSAMPLE should be the smallest type that will hold the values 0..511.
|
91
|
+
* On nearly all machines "short" will do nicely.
|
92
|
+
*/
|
93
|
+
|
94
|
+
typedef short JSAMPLE;
|
95
|
+
#define GETJSAMPLE(value) ((int) (value))
|
96
|
+
|
97
|
+
#define MAXJSAMPLE 511
|
98
|
+
#define CENTERJSAMPLE 256
|
99
|
+
|
100
|
+
#endif /* BITS_IN_JSAMPLE == 9 */
|
101
|
+
|
102
|
+
|
103
|
+
#if BITS_IN_JSAMPLE == 10
|
104
|
+
/* JSAMPLE should be the smallest type that will hold the values 0..1023.
|
105
|
+
* On nearly all machines "short" will do nicely.
|
106
|
+
*/
|
107
|
+
|
108
|
+
typedef short JSAMPLE;
|
109
|
+
#define GETJSAMPLE(value) ((int) (value))
|
110
|
+
|
111
|
+
#define MAXJSAMPLE 1023
|
112
|
+
#define CENTERJSAMPLE 512
|
113
|
+
|
114
|
+
#endif /* BITS_IN_JSAMPLE == 10 */
|
115
|
+
|
116
|
+
|
117
|
+
#if BITS_IN_JSAMPLE == 11
|
118
|
+
/* JSAMPLE should be the smallest type that will hold the values 0..2047.
|
119
|
+
* On nearly all machines "short" will do nicely.
|
120
|
+
*/
|
121
|
+
|
122
|
+
typedef short JSAMPLE;
|
123
|
+
#define GETJSAMPLE(value) ((int) (value))
|
124
|
+
|
125
|
+
#define MAXJSAMPLE 2047
|
126
|
+
#define CENTERJSAMPLE 1024
|
127
|
+
|
128
|
+
#endif /* BITS_IN_JSAMPLE == 11 */
|
129
|
+
|
130
|
+
|
80
131
|
#if BITS_IN_JSAMPLE == 12
|
81
132
|
/* JSAMPLE should be the smallest type that will hold the values 0..4095.
|
82
133
|
* On nearly all machines "short" will do nicely.
|
@@ -252,7 +303,10 @@ typedef void noreturn_t;
|
|
252
303
|
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
|
253
304
|
*/
|
254
305
|
|
255
|
-
#
|
306
|
+
#ifndef HAVE_BOOLEAN
|
307
|
+
#if defined FALSE || defined TRUE || defined QGLOBAL_H
|
308
|
+
/* Qt3 defines FALSE and TRUE as "const" variables in qglobal.h */
|
309
|
+
typedef int boolean;
|
256
310
|
#ifndef FALSE /* in case these macros already exist */
|
257
311
|
#define FALSE 0 /* values of boolean */
|
258
312
|
#endif
|
@@ -262,6 +316,7 @@ typedef void noreturn_t;
|
|
262
316
|
#else
|
263
317
|
typedef enum { FALSE = 0, TRUE = 1 } boolean;
|
264
318
|
#endif
|
319
|
+
#endif
|
265
320
|
|
266
321
|
|
267
322
|
/*
|
@@ -299,11 +354,12 @@ typedef enum { FALSE = 0, TRUE = 1 } boolean;
|
|
299
354
|
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
300
355
|
#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/
|
301
356
|
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
|
302
|
-
/* Note: if you selected
|
303
|
-
* ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only
|
304
|
-
* precision, so
|
305
|
-
*
|
306
|
-
* you'll have to
|
357
|
+
/* Note: if you selected more than 8-bit data precision, it is dangerous to
|
358
|
+
* turn off ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only
|
359
|
+
* good for 8-bit precision, so arithmetic coding is recommended for higher
|
360
|
+
* precision. The Huffman encoder normally uses entropy optimization to
|
361
|
+
* compute usable tables for higher precision. Otherwise, you'll have to
|
362
|
+
* supply different default Huffman tables.
|
307
363
|
* The exact same statements apply for progressive JPEG: the default tables
|
308
364
|
* don't work for progressive mode. (This may get fixed, however.)
|
309
365
|
*/
|
@@ -314,7 +370,7 @@ typedef enum { FALSE = 0, TRUE = 1 } boolean;
|
|
314
370
|
#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
|
315
371
|
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
|
316
372
|
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
|
317
|
-
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
|
373
|
+
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? (Requires DCT_ISLOW)*/
|
318
374
|
#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */
|
319
375
|
#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */
|
320
376
|
#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* jpeglib.h
|
3
3
|
*
|
4
4
|
* Copyright (C) 1991-1998, Thomas G. Lane.
|
5
|
-
* Modified 2002-
|
5
|
+
* Modified 2002-2013 by Guido Vollbeding.
|
6
6
|
* This file is part of the Independent JPEG Group's software.
|
7
7
|
* For conditions of distribution and use, see the accompanying README file.
|
8
8
|
*
|
@@ -39,12 +39,12 @@ extern "C" {
|
|
39
39
|
|
40
40
|
#define JPEG_LIB_VERSION 90 /* Compatibility version 9.0 */
|
41
41
|
#define JPEG_LIB_VERSION_MAJOR 9
|
42
|
-
#define JPEG_LIB_VERSION_MINOR
|
42
|
+
#define JPEG_LIB_VERSION_MINOR 1
|
43
43
|
|
44
44
|
|
45
45
|
/* Various constants determining the sizes of things.
|
46
|
-
* All of these are specified by the JPEG standard,
|
47
|
-
* if you want to be compatible.
|
46
|
+
* All of these are specified by the JPEG standard,
|
47
|
+
* so don't change them if you want to be compatible.
|
48
48
|
*/
|
49
49
|
|
50
50
|
#define DCTSIZE 8 /* The basic DCT block is 8x8 coefficients */
|
@@ -157,16 +157,21 @@ typedef struct {
|
|
157
157
|
/* The downsampled dimensions are the component's actual, unpadded number
|
158
158
|
* of samples at the main buffer (preprocessing/compression interface);
|
159
159
|
* DCT scaling is included, so
|
160
|
-
* downsampled_width =
|
160
|
+
* downsampled_width =
|
161
|
+
* ceil(image_width * Hi/Hmax * DCT_h_scaled_size/block_size)
|
161
162
|
* and similarly for height.
|
162
163
|
*/
|
163
164
|
JDIMENSION downsampled_width; /* actual width in samples */
|
164
165
|
JDIMENSION downsampled_height; /* actual height in samples */
|
165
|
-
/*
|
166
|
-
*
|
167
|
-
*
|
166
|
+
/* For decompression, in cases where some of the components will be
|
167
|
+
* ignored (eg grayscale output from YCbCr image), we can skip most
|
168
|
+
* computations for the unused components.
|
169
|
+
* For compression, some of the components will need further quantization
|
170
|
+
* scale by factor of 2 after DCT (eg BG_YCC output from normal RGB input).
|
171
|
+
* The field is first set TRUE for decompression, FALSE for compression
|
172
|
+
* in initial_setup, and then adapted in color conversion setup.
|
168
173
|
*/
|
169
|
-
boolean component_needed;
|
174
|
+
boolean component_needed;
|
170
175
|
|
171
176
|
/* These values are computed before starting a scan of the component. */
|
172
177
|
/* The decompressor output side may not use these variables. */
|
@@ -215,10 +220,12 @@ struct jpeg_marker_struct {
|
|
215
220
|
typedef enum {
|
216
221
|
JCS_UNKNOWN, /* error/unspecified */
|
217
222
|
JCS_GRAYSCALE, /* monochrome */
|
218
|
-
JCS_RGB, /* red/green/blue */
|
219
|
-
JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */
|
223
|
+
JCS_RGB, /* red/green/blue, standard RGB (sRGB) */
|
224
|
+
JCS_YCbCr, /* Y/Cb/Cr (also known as YUV), standard YCC */
|
220
225
|
JCS_CMYK, /* C/M/Y/K */
|
221
|
-
JCS_YCCK /* Y/Cb/Cr/K */
|
226
|
+
JCS_YCCK, /* Y/Cb/Cr/K */
|
227
|
+
JCS_BG_RGB, /* big gamut red/green/blue, bg-sRGB */
|
228
|
+
JCS_BG_YCC /* big gamut Y/Cb/Cr, bg-sYCC */
|
222
229
|
} J_COLOR_SPACE;
|
223
230
|
|
224
231
|
/* Supported color transforms. */
|
@@ -0,0 +1,104 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (C) 2009-2010, Pino Toscano <pino@kde.org>
|
3
|
+
*
|
4
|
+
* This program is free software; you can redistribute it and/or modify
|
5
|
+
* it under the terms of the GNU General Public License as published by
|
6
|
+
* the Free Software Foundation; either version 2, or (at your option)
|
7
|
+
* any later version.
|
8
|
+
*
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
* GNU General Public License for more details.
|
13
|
+
*
|
14
|
+
* You should have received a copy of the GNU General Public License
|
15
|
+
* along with this program; if not, write to the Free Software
|
16
|
+
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
|
17
|
+
*/
|
18
|
+
|
19
|
+
#ifndef POPPLER_DOCUMENT_H
|
20
|
+
#define POPPLER_DOCUMENT_H
|
21
|
+
|
22
|
+
#include "poppler-global.h"
|
23
|
+
#include "poppler-font.h"
|
24
|
+
|
25
|
+
namespace poppler
|
26
|
+
{
|
27
|
+
|
28
|
+
class document_private;
|
29
|
+
class embedded_file;
|
30
|
+
class page;
|
31
|
+
class toc;
|
32
|
+
|
33
|
+
class POPPLER_CPP_EXPORT document : public poppler::noncopyable
|
34
|
+
{
|
35
|
+
public:
|
36
|
+
enum page_mode_enum {
|
37
|
+
use_none,
|
38
|
+
use_outlines,
|
39
|
+
use_thumbs,
|
40
|
+
fullscreen,
|
41
|
+
use_oc,
|
42
|
+
use_attach
|
43
|
+
};
|
44
|
+
|
45
|
+
enum page_layout_enum {
|
46
|
+
no_layout,
|
47
|
+
single_page,
|
48
|
+
one_column,
|
49
|
+
two_column_left,
|
50
|
+
two_column_right,
|
51
|
+
two_page_left,
|
52
|
+
two_page_right
|
53
|
+
};
|
54
|
+
|
55
|
+
~document();
|
56
|
+
|
57
|
+
bool is_locked() const;
|
58
|
+
bool unlock(const std::string &owner_password, const std::string &user_password);
|
59
|
+
|
60
|
+
page_mode_enum page_mode() const;
|
61
|
+
page_layout_enum page_layout() const;
|
62
|
+
void get_pdf_version(int *major, int *minor) const;
|
63
|
+
std::vector<std::string> info_keys() const;
|
64
|
+
ustring info_key(const std::string &key) const;
|
65
|
+
time_type info_date(const std::string &key) const;
|
66
|
+
bool is_encrypted() const;
|
67
|
+
bool is_linearized() const;
|
68
|
+
bool has_permission(permission_enum which) const;
|
69
|
+
ustring metadata() const;
|
70
|
+
bool get_pdf_id(std::string *permanent_id, std::string *update_id) const;
|
71
|
+
|
72
|
+
int pages() const;
|
73
|
+
page* create_page(const ustring &label) const;
|
74
|
+
page* create_page(int index) const;
|
75
|
+
|
76
|
+
std::vector<font_info> fonts() const;
|
77
|
+
font_iterator* create_font_iterator(int start_page = 0) const;
|
78
|
+
|
79
|
+
toc* create_toc() const;
|
80
|
+
|
81
|
+
bool has_embedded_files() const;
|
82
|
+
std::vector<embedded_file *> embedded_files() const;
|
83
|
+
|
84
|
+
static document* load_from_file(const std::string &file_name,
|
85
|
+
const std::string &owner_password = std::string(),
|
86
|
+
const std::string &user_password = std::string());
|
87
|
+
static document* load_from_data(byte_array *file_data,
|
88
|
+
const std::string &owner_password = std::string(),
|
89
|
+
const std::string &user_password = std::string());
|
90
|
+
static document* load_from_raw_data(const char *file_data,
|
91
|
+
int file_data_length,
|
92
|
+
const std::string &owner_password = std::string(),
|
93
|
+
const std::string &user_password = std::string());
|
94
|
+
|
95
|
+
private:
|
96
|
+
document(document_private &dd);
|
97
|
+
|
98
|
+
document_private *d;
|
99
|
+
friend class document_private;
|
100
|
+
};
|
101
|
+
|
102
|
+
}
|
103
|
+
|
104
|
+
#endif
|