Compare commits
954 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5db6a6819d | ||
|
|
f448279b14 | ||
|
|
ded5a504b4 | ||
|
|
c0d0fe86d8 | ||
|
|
a81a8c137b | ||
|
|
02f7bcdbd1 | ||
|
|
5ced1f590b | ||
|
|
b98ee19241 | ||
|
|
ad8330af72 | ||
|
|
b25adabcfa | ||
|
|
875e873f26 | ||
|
|
2a9e3bd743 | ||
|
|
f37b7c1f96 | ||
|
|
509c2680aa | ||
|
|
ec5adb83dd | ||
|
|
c8e52741fd | ||
|
|
6399d0a699 | ||
|
|
aa9db61677 | ||
|
|
2b05d47bc2 | ||
|
|
7bc9fca430 | ||
|
|
bb16b94455 | ||
|
|
33011754e6 | ||
|
|
bce58f487e | ||
|
|
ce067a6cd1 | ||
|
|
d3a3a73f64 | ||
|
|
58a3975e93 | ||
|
|
5857929f95 | ||
|
|
709477274e | ||
|
|
1af712c101 | ||
|
|
ec90cd0f90 | ||
|
|
ce76ffac4c | ||
|
|
500b5ecec3 | ||
|
|
87ab3360d0 | ||
|
|
b46af82cc1 | ||
|
|
a4aa30d9a0 | ||
|
|
0d7818d1b6 | ||
|
|
4b67db4d9b | ||
|
|
f70a7e1ee1 | ||
|
|
6a8421fb44 | ||
|
|
031e16ecff | ||
|
|
75be88cfbd | ||
|
|
e2442e0707 | ||
|
|
1c2d3cfaaf | ||
|
|
2d0b675adf | ||
|
|
90e2d7f3fd | ||
|
|
5308c1a03b | ||
|
|
ce90ab5d44 | ||
|
|
1ee87a9e2e | ||
|
|
479501b07c | ||
|
|
9bc8eb6449 | ||
|
|
0fa5ae6b54 | ||
|
|
1ff90822f1 | ||
|
|
f8cca819a4 | ||
|
|
beefb62a6f | ||
|
|
3d9c64e9f8 | ||
|
|
23e8e0ff83 | ||
|
|
c868e41b22 | ||
|
|
0696b0a451 | ||
|
|
aa829dcf50 | ||
|
|
43ce78e032 | ||
|
|
bb3d325624 | ||
|
|
c701014dce | ||
|
|
950580eb0c | ||
|
|
2b1c9c6887 | ||
|
|
07e304c3bf | ||
|
|
5ea77d8b77 | ||
|
|
504a295cde | ||
|
|
d00d7d8c19 | ||
|
|
aaffc14f65 | ||
|
|
d5f281b734 | ||
|
|
f2729c983a | ||
|
|
c1f07a9fc4 | ||
|
|
4f943644e5 | ||
|
|
3bef88f6ec | ||
|
|
2260b66e16 | ||
|
|
a861cc2f31 | ||
|
|
43c58ff983 | ||
|
|
574f3a772c | ||
|
|
ad6c316146 | ||
|
|
8d95be3afb | ||
|
|
a62895265f | ||
|
|
9ab569e616 | ||
|
|
9c78a04df4 | ||
|
|
0fa7850aeb | ||
|
|
0c8eb5b4dd | ||
|
|
84893085cf | ||
|
|
f4b8a5cf03 | ||
|
|
6d8caa9f88 | ||
|
|
398c1e9acc | ||
|
|
26f109290d | ||
|
|
43e84cff1b | ||
|
|
696e754ecf | ||
|
|
909a8cfc7b | ||
|
|
3041cf67ff | ||
|
|
1a85fc497d | ||
|
|
eb8bba627f | ||
|
|
53bb941845 | ||
|
|
2401e4d10c | ||
|
|
34e9d7e340 | ||
|
|
dc9bdf143a | ||
|
|
b2d000e64b | ||
|
|
bfc3ce3157 | ||
|
|
269e84c971 | ||
|
|
b628d6934f | ||
|
|
450306a84b | ||
|
|
ed3c527386 | ||
|
|
4a275cf080 | ||
|
|
13e4803e6a | ||
|
|
a74655af45 | ||
|
|
58cb10ee5f | ||
|
|
7b3c0f0109 | ||
|
|
72964b8633 | ||
|
|
3270768736 | ||
|
|
51f94caba1 | ||
|
|
9a12cf7ab5 | ||
|
|
c80ddef7a4 | ||
|
|
d3a1f899ee | ||
|
|
d64e8e2905 | ||
|
|
e15a6b4e08 | ||
|
|
ca56642128 | ||
|
|
3fa69b4d61 | ||
|
|
d83c997749 | ||
|
|
d66dc70d7b | ||
|
|
8adf4c0a4f | ||
|
|
1095b822b0 | ||
|
|
c0ca354eb4 | ||
|
|
2e90ccac0b | ||
|
|
5b177b3cab | ||
|
|
16bd984557 | ||
|
|
81baa1b501 | ||
|
|
293263c352 | ||
|
|
09497c1a73 | ||
|
|
84fbd4f1ed | ||
|
|
bd96b30b74 | ||
|
|
25758055ac | ||
|
|
c743009717 | ||
|
|
29e453f7c0 | ||
|
|
a4da0750f0 | ||
|
|
19c791cdac | ||
|
|
d45434fe19 | ||
|
|
4508ab3e51 | ||
|
|
87bc8721b4 | ||
|
|
33ce0b5e71 | ||
|
|
35ed3c97b2 | ||
|
|
3c54642c81 | ||
|
|
367a838626 | ||
|
|
7c2bfdb040 | ||
|
|
0dd9a2c1fd | ||
|
|
32eaeeac9e | ||
|
|
4c4dc6149b | ||
|
|
feaec37d32 | ||
|
|
b6909ab3f7 | ||
|
|
9bef5df776 | ||
|
|
88421563ad | ||
|
|
9cdec16ceb | ||
|
|
845fe8bf80 | ||
|
|
de9e9db6a5 | ||
|
|
715b7c38a8 | ||
|
|
ca387e7fda | ||
|
|
39e9e65c5b | ||
|
|
264dd42a98 | ||
|
|
ff392d81ef | ||
|
|
37bae1a0e9 | ||
|
|
985ef4f9f1 | ||
|
|
700de8aa81 | ||
|
|
4e240795cc | ||
|
|
d4859558da | ||
|
|
289014d470 | ||
|
|
3847f91122 | ||
|
|
bd544e284b | ||
|
|
0e2bca0744 | ||
|
|
0fba3c1993 | ||
|
|
7d3feda796 | ||
|
|
bf6c774305 | ||
|
|
afdd7999e4 | ||
|
|
c308d43416 | ||
|
|
773040f9d9 | ||
|
|
c05d124968 | ||
|
|
a831b5a986 | ||
|
|
9f1f86bf7f | ||
|
|
e817c07779 | ||
|
|
479fa1d870 | ||
|
|
8c40ac8ae6 | ||
|
|
dc4b900223 | ||
|
|
aa7459050d | ||
|
|
087ec126c1 | ||
|
|
cd8a12586a | ||
|
|
4893e5d8b8 | ||
|
|
19b393b624 | ||
|
|
9d9d8fe658 | ||
|
|
78e97e38cb | ||
|
|
468f2fed27 | ||
|
|
5abf2536f6 | ||
|
|
5fce2e9421 | ||
|
|
907dd683a4 | ||
|
|
f008876cc1 | ||
|
|
5bc43c7821 | ||
|
|
f3ad13e3d8 | ||
|
|
94e152b186 | ||
|
|
073b0e88a1 | ||
|
|
616b4e2d1b | ||
|
|
3d72522a68 | ||
|
|
f0dd80f246 | ||
|
|
1b385f37f3 | ||
|
|
fd778bba46 | ||
|
|
8d403aeb6a | ||
|
|
01b74c101e | ||
|
|
db0dec3c5a | ||
|
|
ba6e9d8a11 | ||
|
|
7106ffe5f2 | ||
|
|
5426a4cb16 | ||
|
|
d0bac69a8a | ||
|
|
59322e0973 | ||
|
|
51cc89fa7b | ||
|
|
4ded4dfac6 | ||
|
|
1d93541617 | ||
|
|
c0f3512d5a | ||
|
|
02fa8f244e | ||
|
|
32120054c2 | ||
|
|
1478361204 | ||
|
|
e5c1613ccd | ||
|
|
c94531212f | ||
|
|
9baef107e1 | ||
|
|
dadebcd79a | ||
|
|
dedce66eb5 | ||
|
|
b0971e47d7 | ||
|
|
e248d430e2 | ||
|
|
acb634931a | ||
|
|
1db1ce45da | ||
|
|
aba6ae5950 | ||
|
|
596e3965e7 | ||
|
|
d0c3aa900b | ||
|
|
d4092f6b4d | ||
|
|
42e1e2d886 | ||
|
|
25c912c1b2 | ||
|
|
178796e748 | ||
|
|
b9ab64d8db | ||
|
|
2ac4e9d914 | ||
|
|
6a2b067428 | ||
|
|
11eec4a398 | ||
|
|
301ba4f305 | ||
|
|
70f236ddd7 | ||
|
|
2a4f189444 | ||
|
|
9d64f3c60b | ||
|
|
da2a27ef05 | ||
|
|
c082dc039d | ||
|
|
d4c41fe0da | ||
|
|
44b2399a94 | ||
|
|
d9cb76f636 | ||
|
|
d34d255957 | ||
|
|
a0b7de9a47 | ||
|
|
2252795571 | ||
|
|
eb38b61bfe | ||
|
|
47b29e8cd9 | ||
|
|
e1e816e665 | ||
|
|
2fb4d7e337 | ||
|
|
8a9b042b26 | ||
|
|
6441018150 | ||
|
|
11426a8716 | ||
|
|
67ad535022 | ||
|
|
6c6696e569 | ||
|
|
6530203fdd | ||
|
|
c8358fcbd9 | ||
|
|
b0fcd0ccc5 | ||
|
|
2b29bca2a9 | ||
|
|
d681fa7626 | ||
|
|
ff05b6e0de | ||
|
|
e6426d2420 | ||
|
|
2af2fe42a3 | ||
|
|
fcfc6c5eed | ||
|
|
786b649331 | ||
|
|
f4ba09b33a | ||
|
|
261db7706d | ||
|
|
0f4fcced0a | ||
|
|
952191da79 | ||
|
|
d642da75bd | ||
|
|
059c9a5f2a | ||
|
|
82bf7f5858 | ||
|
|
3582ce90bb | ||
|
|
94686e3c0f | ||
|
|
97205269bc | ||
|
|
27d4c5ea22 | ||
|
|
6abd39160c | ||
|
|
9df7ac2e6a | ||
|
|
0ff7da7191 | ||
|
|
9fdb8f8553 | ||
|
|
d6d7b53968 | ||
|
|
f9f0c75bb8 | ||
|
|
3da94de248 | ||
|
|
ab664e35fc | ||
|
|
ce26e83f47 | ||
|
|
74e4c793cd | ||
|
|
a280fa630c | ||
|
|
6aae007745 | ||
|
|
4ad94b2963 | ||
|
|
a949da48da | ||
|
|
2d4b2f14d0 | ||
|
|
108b1cd9ba | ||
|
|
9366cf0bca | ||
|
|
13e6b151b0 | ||
|
|
1a8c68ac5b | ||
|
|
1ee329d617 | ||
|
|
fa3bdfb7bc | ||
|
|
b47c5e737f | ||
|
|
ce262eb5d7 | ||
|
|
27f817cd11 | ||
|
|
7884e245bc | ||
|
|
0df2e2188b | ||
|
|
be908ac024 | ||
|
|
ed21f4bd03 | ||
|
|
6d22430a3a | ||
|
|
f34f2f5bc6 | ||
|
|
e9e3a2edd7 | ||
|
|
211c69f317 | ||
|
|
1625253d49 | ||
|
|
a0047bdea4 | ||
|
|
7bfb22af12 | ||
|
|
ac4a899511 | ||
|
|
dfefba7752 | ||
|
|
4cf67f2363 | ||
|
|
9407cf7f47 | ||
|
|
6c36568626 | ||
|
|
cb88e5da80 | ||
|
|
e9d9c31fd2 | ||
|
|
077e5bb4e0 | ||
|
|
a1dd35680d | ||
|
|
a09ba29a55 | ||
|
|
8ce2c9119a | ||
|
|
db04435165 | ||
|
|
7723d7f7d0 | ||
|
|
628c168c86 | ||
|
|
3924ebceb5 | ||
|
|
1120ff29a1 | ||
|
|
1945ad961b | ||
|
|
3dcb85ee9a | ||
|
|
1be87b6273 | ||
|
|
b331385e8a | ||
|
|
b2921f1bcc | ||
|
|
eaae2cdb16 | ||
|
|
a7c2f97939 | ||
|
|
e06ccbe3f7 | ||
|
|
67de29b503 | ||
|
|
c22e42e9a2 | ||
|
|
6d765524bc | ||
|
|
421d34fd2f | ||
|
|
c6300ffe4e | ||
|
|
6448a5e584 | ||
|
|
6e9d43e085 | ||
|
|
9055fb408d | ||
|
|
9e6c6a14f8 | ||
|
|
7ee3ce9ada | ||
|
|
b5426c52c0 | ||
|
|
621b29f5b1 | ||
|
|
f1cbc32876 | ||
|
|
72c837da24 | ||
|
|
1c8a475cd4 | ||
|
|
8880e08771 | ||
|
|
426d787c4c | ||
|
|
2cf199cbbd | ||
|
|
16b121890c | ||
|
|
6cb27c31d9 | ||
|
|
ff5685d534 | ||
|
|
3ff13e651b | ||
|
|
1d50a8cd08 | ||
|
|
123f7258a8 | ||
|
|
e5091f2cf3 | ||
|
|
8f1c0a681c | ||
|
|
68cf83db56 | ||
|
|
f06cc1200f | ||
|
|
5c064de10d | ||
|
|
2e480fa2a3 | ||
|
|
5e576386b5 | ||
|
|
0d61e80ab0 | ||
|
|
ee681aa304 | ||
|
|
346837cad3 | ||
|
|
eb7962a02b | ||
|
|
3c67d4f7c0 | ||
|
|
1959e28b49 | ||
|
|
dec79952d6 | ||
|
|
2628c562bc | ||
|
|
28d1a1300c | ||
|
|
1a3aebd88e | ||
|
|
1e81b0c3ea | ||
|
|
b2817f5251 | ||
|
|
6f241d4d42 | ||
|
|
1385f8b281 | ||
|
|
742fb37dde | ||
|
|
a839a7a964 | ||
|
|
3f56bd597c | ||
|
|
e5f280c4c4 | ||
|
|
4f58123130 | ||
|
|
622d6678a8 | ||
|
|
b3247c7d71 | ||
|
|
a572622dd6 | ||
|
|
7cb8de4ae0 | ||
|
|
056536f660 | ||
|
|
7c202f76e7 | ||
|
|
fa722636be | ||
|
|
2354810a43 | ||
|
|
45c1e3a887 | ||
|
|
f57bae0ddd | ||
|
|
025c1f66de | ||
|
|
3ab68cf563 | ||
|
|
5f972324ee | ||
|
|
f76c01d0bd | ||
|
|
d4be42360c | ||
|
|
e621dfc508 | ||
|
|
9100b67a75 | ||
|
|
bd49803f92 | ||
|
|
ae41128845 | ||
|
|
54e6b8e806 | ||
|
|
83aeb7b28c | ||
|
|
a560e4b423 | ||
|
|
fc11193e7a | ||
|
|
e7f88aec23 | ||
|
|
aefd8b7942 | ||
|
|
18dcac4632 | ||
|
|
03841e6e89 | ||
|
|
d123c125c5 | ||
|
|
8632f1b262 | ||
|
|
bba7978981 | ||
|
|
28f00bf235 | ||
|
|
ab80273b61 | ||
|
|
53c635b8e8 | ||
|
|
46ecffa324 | ||
|
|
219470d6ac | ||
|
|
15aaa7f7e2 | ||
|
|
45bbe06ec5 | ||
|
|
2d62325754 | ||
|
|
f9134384b7 | ||
|
|
ce0dd949b2 | ||
|
|
8ff67fdb24 | ||
|
|
55a18d4007 | ||
|
|
2d56acb840 | ||
|
|
c454c595dc | ||
|
|
0463f7c9aa | ||
|
|
04dd34c14e | ||
|
|
3ee3d8799a | ||
|
|
6c8a71efa7 | ||
|
|
271b0bf033 | ||
|
|
6e053525ee | ||
|
|
fe11699d90 | ||
|
|
cf888486d1 | ||
|
|
cb49bb00d9 | ||
|
|
cbfa696fc1 | ||
|
|
f5cd71c5cf | ||
|
|
da047e8b14 | ||
|
|
6c3fc97b1a | ||
|
|
3128061382 | ||
|
|
8af3f8a9cb | ||
|
|
d38b4f21ec | ||
|
|
e8aa5fa934 | ||
|
|
ec6941f7bc | ||
|
|
499c470b63 | ||
|
|
9c8cee8c29 | ||
|
|
4e356a92dc | ||
|
|
93eaa37a3b | ||
|
|
f3a8684cd1 | ||
|
|
eb59b6e72d | ||
|
|
368cd52d38 | ||
|
|
e7f1418525 | ||
|
|
2111c5acda | ||
|
|
5a3b4fed4b | ||
|
|
5f2cbbd039 | ||
|
|
fbe5007fbc | ||
|
|
71e971fb35 | ||
|
|
6fa5ebdc10 | ||
|
|
d70a5c12fc | ||
|
|
aa769febf2 | ||
|
|
d65e768b2e | ||
|
|
1e32fe3113 | ||
|
|
250c887763 | ||
|
|
e42032ba62 | ||
|
|
17de518357 | ||
|
|
7e3acc0e0a | ||
|
|
ac85335cd8 | ||
|
|
bf04316e63 | ||
|
|
d8da49effe | ||
|
|
30ebafda2a | ||
|
|
60efb896e0 | ||
|
|
8e9cef2e6f | ||
|
|
870b4f28b4 | ||
|
|
b961f0bfce | ||
|
|
54792ba340 | ||
|
|
498d9bc92f | ||
|
|
b4922b42e7 | ||
|
|
465a9fe0cb | ||
|
|
00d82c425e | ||
|
|
b5a55e6dd7 | ||
|
|
f62dbccf5f | ||
|
|
b657631953 | ||
|
|
58ae401e50 | ||
|
|
333f3cf756 | ||
|
|
73befdb148 | ||
|
|
6709e4a0cf | ||
|
|
82923eb93a | ||
|
|
a3ef34c626 | ||
|
|
6fa14b37ee | ||
|
|
ce4ff407ff | ||
|
|
b1682fb7c8 | ||
|
|
b2db23c449 | ||
|
|
7222ec2717 | ||
|
|
8fb37b8171 | ||
|
|
b3b3b29e4c | ||
|
|
7170d9e0e5 | ||
|
|
57e206662a | ||
|
|
939e466082 | ||
|
|
7c726a4515 | ||
|
|
a61fd32137 | ||
|
|
944aa8e3c4 | ||
|
|
2a0b4ac337 | ||
|
|
cf0e58de53 | ||
|
|
b6590d67b3 | ||
|
|
22eb6c2bf3 | ||
|
|
9a2a42d8ee | ||
|
|
8c4c6d29e6 | ||
|
|
9993410e44 | ||
|
|
b3b9a213bf | ||
|
|
9bbf2b8551 | ||
|
|
45a2369b44 | ||
|
|
99f0289606 | ||
|
|
03e755bbd3 | ||
|
|
74b9f609a2 | ||
|
|
739edeb8a6 | ||
|
|
a3deac158b | ||
|
|
10dc5cfeff | ||
|
|
b3817dab86 | ||
|
|
1a4778f8f0 | ||
|
|
c23e36e800 | ||
|
|
65c5ec2f0f | ||
|
|
9cc597221e | ||
|
|
6ed4d9d110 | ||
|
|
306e1d2d77 | ||
|
|
162c9985d6 | ||
|
|
7a7da9460a | ||
|
|
ac09954b1d | ||
|
|
6a25894472 | ||
|
|
ecc583682a | ||
|
|
07afe8a50f | ||
|
|
eb32cc1e6d | ||
|
|
691cd93383 | ||
|
|
54014d9c2a | ||
|
|
06bf10d19e | ||
|
|
89b5e06df5 | ||
|
|
eea6424596 | ||
|
|
7a8c53e4bd | ||
|
|
db6d8fca59 | ||
|
|
f15ef33768 | ||
|
|
1f79c7c8c8 | ||
|
|
bec45b162b | ||
|
|
80bbd3908f | ||
|
|
665c96edaa | ||
|
|
3ebcc3206f | ||
|
|
44320a210b | ||
|
|
a8b6ea2f8d | ||
|
|
96869f4b6e | ||
|
|
f64b36fd57 | ||
|
|
89a3f970da | ||
|
|
feccdcf8c8 | ||
|
|
c69a1cd7a0 | ||
|
|
3b7015d5d8 | ||
|
|
cab2a8503e | ||
|
|
771ab19437 | ||
|
|
eb319ed8a4 | ||
|
|
3f7608348d | ||
|
|
2e429094a4 | ||
|
|
dcf9f15d6e | ||
|
|
8b5a0093ee | ||
|
|
0e94025ac7 | ||
|
|
c60d662ee4 | ||
|
|
3af282df3c | ||
|
|
dd7f03be56 | ||
|
|
cbc4b53169 | ||
|
|
ffd9d052f6 | ||
|
|
cbc9970ecb | ||
|
|
2b7a391672 | ||
|
|
2e2ea8e02c | ||
|
|
246b01bb0a | ||
|
|
c4e3c361d7 | ||
|
|
2ab5ea6c48 | ||
|
|
c641cddb80 | ||
|
|
86af36aebc | ||
|
|
11c4010c3c | ||
|
|
2517ef72ed | ||
|
|
9ab2c1071b | ||
|
|
cbcb53617b | ||
|
|
ada430bb3d | ||
|
|
406bb01ca2 | ||
|
|
a6a24c270e | ||
|
|
52a4ec6c8a | ||
|
|
8f7f49a014 | ||
|
|
cf78941db4 | ||
|
|
51eba06011 | ||
|
|
d71a6e0c25 | ||
|
|
f0abd46c3b | ||
|
|
ac4daa7716 | ||
|
|
af69295d3f | ||
|
|
6aed11293d | ||
|
|
a5005751a3 | ||
|
|
25347882ed | ||
|
|
8de75d0f57 | ||
|
|
22048207ea | ||
|
|
2b223a034b | ||
|
|
c4930d8b0d | ||
|
|
577ecd93f1 | ||
|
|
ff30c63934 | ||
|
|
45453085e7 | ||
|
|
b1fec4ff98 | ||
|
|
5976e42550 | ||
|
|
62bae204f4 | ||
|
|
8163aad6cc | ||
|
|
99f125ec07 | ||
|
|
13af139624 | ||
|
|
87fd253bd0 | ||
|
|
bf8a5feb79 | ||
|
|
535674b1b8 | ||
|
|
c9da78525b | ||
|
|
0691162a8b | ||
|
|
9cb418d221 | ||
|
|
935d1d6398 | ||
|
|
86ae5913b1 | ||
|
|
d51e6c2f6b | ||
|
|
6842c7c023 | ||
|
|
6e6b28c3ce | ||
|
|
b9c4b58ab2 | ||
|
|
62999d7708 | ||
|
|
ceb552a9c9 | ||
|
|
e59196dbdf | ||
|
|
6cb7f40a18 | ||
|
|
040435afb9 | ||
|
|
fb0c394037 | ||
|
|
e1ac40104c | ||
|
|
3f764b7253 | ||
|
|
1e2f49619e | ||
|
|
4c773cff16 | ||
|
|
a29d6b4113 | ||
|
|
b329697ded | ||
|
|
2a6b8316fc | ||
|
|
e2dd3e3e5c | ||
|
|
0f4469c52f | ||
|
|
bb383b4175 | ||
|
|
402a715f82 | ||
|
|
306add8b78 | ||
|
|
9665f5e3f9 | ||
|
|
ef263e3e83 | ||
|
|
0426cd3441 | ||
|
|
ea1eea4742 | ||
|
|
3ebcf7cf86 | ||
|
|
803b5d24a8 | ||
|
|
eca0637c81 | ||
|
|
55620c6ef2 | ||
|
|
2240974d5d | ||
|
|
7affbfc241 | ||
|
|
cd2d8e1cc7 | ||
|
|
f72f1f2e94 | ||
|
|
bbd9b71171 | ||
|
|
c0a8256a92 | ||
|
|
1d4c51a0ac | ||
|
|
72a3cc0ecd | ||
|
|
339589f3cd | ||
|
|
eb8d096ba6 | ||
|
|
fe77fa22d9 | ||
|
|
88b6c97568 | ||
|
|
0a9a252654 | ||
|
|
de26249a99 | ||
|
|
a6efae1488 | ||
|
|
e947139c7c | ||
|
|
bdc7650b9e | ||
|
|
d729f4da9c | ||
|
|
eb66974f3a | ||
|
|
f5644c3498 | ||
|
|
55e328ecb8 | ||
|
|
3d5189891b | ||
|
|
bdb36e1a14 | ||
|
|
022a9016df | ||
|
|
e408761dda | ||
|
|
9b012bd026 | ||
|
|
0713c1bb54 | ||
|
|
2e2ce5a1da | ||
|
|
684ace1924 | ||
|
|
d92949b0ac | ||
|
|
43513893f0 | ||
|
|
a1a920cc51 | ||
|
|
88b90bdc07 | ||
|
|
cce13c767e | ||
|
|
fe80ec2275 | ||
|
|
2261e1e408 | ||
|
|
eddc355d18 | ||
|
|
29823fa9a6 | ||
|
|
9c168ad23b | ||
|
|
f6d7b7768b | ||
|
|
bc3c1685a7 | ||
|
|
19224b2252 | ||
|
|
40dd3146cd | ||
|
|
5d87f6ddff | ||
|
|
d2a7495012 | ||
|
|
b7c8c86d6a | ||
|
|
e31e49478c | ||
|
|
80cb26444a | ||
|
|
a4940d1396 | ||
|
|
32760451fe | ||
|
|
fa8bcb825c | ||
|
|
580f391537 | ||
|
|
46a0392cf3 | ||
|
|
26dd86bd89 | ||
|
|
927a10db05 | ||
|
|
cdcac99f6d | ||
|
|
8951cf01fe | ||
|
|
f7c11051de | ||
|
|
9d77dad4c9 | ||
|
|
aecea388c7 | ||
|
|
493be61707 | ||
|
|
779bd68d20 | ||
|
|
d13df21341 | ||
|
|
c71ab2f7c2 | ||
|
|
983503eddf | ||
|
|
aee4f72160 | ||
|
|
8a74848a23 | ||
|
|
a8ab3424c7 | ||
|
|
3728aa01d8 | ||
|
|
821455542c | ||
|
|
d762c19b98 | ||
|
|
2472bc7119 | ||
|
|
a81f542726 | ||
|
|
3da10338c6 | ||
|
|
73821bff78 | ||
|
|
23843313eb | ||
|
|
b7d6e84d6a | ||
|
|
a8fb48b528 | ||
|
|
88c7e30045 | ||
|
|
d7a25595ce | ||
|
|
cf55f0b533 | ||
|
|
fced14c7b4 | ||
|
|
495e43426e | ||
|
|
5ef463056a | ||
|
|
c728cfd8f2 | ||
|
|
5de454b291 | ||
|
|
5033f3e19a | ||
|
|
7f4a81b769 | ||
|
|
da13af6b8d | ||
|
|
d88f7ddfbe | ||
|
|
bc56b754e1 | ||
|
|
52ded87680 | ||
|
|
64086281b3 | ||
|
|
1419852c42 | ||
|
|
1b3fd7eead | ||
|
|
a3c3bbc2f4 | ||
|
|
0bf325b8ba | ||
|
|
6a61c1e6dc | ||
|
|
1e9cbbad8a | ||
|
|
3b489c3af7 | ||
|
|
976fd9687e | ||
|
|
b844eaa360 | ||
|
|
3402a66a22 | ||
|
|
78df2e6115 | ||
|
|
6e8220eddc | ||
|
|
90d6c3824b | ||
|
|
2a9f0cf36c | ||
|
|
333e9187c8 | ||
|
|
e3cb4eb05d | ||
|
|
05524e671e | ||
|
|
715bb41ead | ||
|
|
a758460175 | ||
|
|
8940e6ca86 | ||
|
|
b775351012 | ||
|
|
e47364ac56 | ||
|
|
24e92e9fc0 | ||
|
|
72130be99f | ||
|
|
1a45b81fa2 | ||
|
|
e5eaf37440 | ||
|
|
771886c192 | ||
|
|
a32b3eca99 | ||
|
|
29d30cb855 | ||
|
|
35db75ea3c | ||
|
|
393bac6de4 | ||
|
|
b0a9cca1e3 | ||
|
|
425c5a57cf | ||
|
|
dab6b8a1a3 | ||
|
|
343478622d | ||
|
|
f57b8a6357 | ||
|
|
66129dc660 | ||
|
|
06296e80c9 | ||
|
|
61976bd8a9 | ||
|
|
4dae78f498 | ||
|
|
230d09dbed | ||
|
|
6887f05d19 | ||
|
|
ff6961f3d2 | ||
|
|
714839d402 | ||
|
|
beb0b33764 | ||
|
|
b1398cba43 | ||
|
|
ac9a92ebbd | ||
|
|
06fa20d407 | ||
|
|
0816d086b5 | ||
|
|
fe9c907b45 | ||
|
|
d76ba910e9 | ||
|
|
d0c9f0cffd | ||
|
|
8666f4f94c | ||
|
|
4d2ff7dad7 | ||
|
|
9e5b681195 | ||
|
|
0c989d9e90 | ||
|
|
4186162665 | ||
|
|
c2caad07bc | ||
|
|
72a8ca0d8e | ||
|
|
9fe22dac31 | ||
|
|
ffb2b6e200 | ||
|
|
9a341f803f | ||
|
|
241ad88b7d | ||
|
|
990342cd57 | ||
|
|
fdd625efa5 | ||
|
|
ef9a4e05ba | ||
|
|
0cfc4c17b7 | ||
|
|
51d6bb30cf | ||
|
|
8bad4251a9 | ||
|
|
26c6606772 | ||
|
|
0d0705f445 | ||
|
|
377955e606 | ||
|
|
79241e3415 | ||
|
|
b1068fa2da | ||
|
|
832b1fc5d3 | ||
|
|
6f92ff617a | ||
|
|
f67c04c05e | ||
|
|
de23dd8068 | ||
|
|
79df67debb | ||
|
|
d794360250 | ||
|
|
2b03fe2710 | ||
|
|
17882fd8cc | ||
|
|
b52f3e69cb | ||
|
|
3c8238322f | ||
|
|
7a6ed075ea | ||
|
|
dd5fcdd007 | ||
|
|
6e11d6899c | ||
|
|
4dafea685d | ||
|
|
6ffed933d7 | ||
|
|
ee44371925 | ||
|
|
fc26b6577a | ||
|
|
1909c59bad | ||
|
|
12c29c9a7f | ||
|
|
b14813947e | ||
|
|
d772f9ac45 | ||
|
|
4f7b7b339c | ||
|
|
78b227e251 | ||
|
|
b53f410228 | ||
|
|
823fbed414 | ||
|
|
ce6891f048 | ||
|
|
f9baac9585 | ||
|
|
adf5551ba9 | ||
|
|
e1efc8a0ef | ||
|
|
95e4cb2060 | ||
|
|
0e9bf6442b | ||
|
|
aa367580e8 | ||
|
|
3bf21e05e1 | ||
|
|
7d9f758e52 | ||
|
|
15c0876191 | ||
|
|
c90144950f | ||
|
|
20e158dcb7 | ||
|
|
f27f38b02d | ||
|
|
2bdc0425df | ||
|
|
4d82ddb0c9 | ||
|
|
f9c2dd2684 | ||
|
|
895fd6d0d3 | ||
|
|
34dca05227 | ||
|
|
2bdadb44a7 | ||
|
|
54918b37fc | ||
|
|
006bc58dd6 | ||
|
|
6f75a351a3 | ||
|
|
cccfdcb8ab | ||
|
|
c56cb476f6 | ||
|
|
ad2f618f0b | ||
|
|
38c9970b95 | ||
|
|
68550a7e99 | ||
|
|
d9712ed14b | ||
|
|
e26c687b21 | ||
|
|
9397469012 | ||
|
|
2d07ee519d | ||
|
|
ba55b2cdfe | ||
|
|
edc846f4fe | ||
|
|
cc0733ad78 | ||
|
|
a113506d17 | ||
|
|
a2f06448c8 | ||
|
|
7db5273ea7 | ||
|
|
9f9436ae23 | ||
|
|
b10aafb889 | ||
|
|
62eeefcb3d | ||
|
|
5430aa1863 | ||
|
|
dbbef06227 | ||
|
|
2e8ff4b084 | ||
|
|
c6501f7f5f | ||
|
|
19eeaa7908 | ||
|
|
07e982d9b4 | ||
|
|
1e67274bd7 | ||
|
|
faa868bbb6 | ||
|
|
b51ee895d8 | ||
|
|
fe739656f9 | ||
|
|
910a35725c | ||
|
|
eaa31f52b3 | ||
|
|
e2f8e694d0 | ||
|
|
596b96623f | ||
|
|
490c7f955a | ||
|
|
fff6c23a65 | ||
|
|
3d72728169 | ||
|
|
d64e23e6f8 | ||
|
|
d3131c1b3d | ||
|
|
71e06a7d81 | ||
|
|
a6b7fbd352 | ||
|
|
ecc9560822 | ||
|
|
982e2099a4 | ||
|
|
56e017d71a | ||
|
|
e500591710 | ||
|
|
2ccf4d1a70 | ||
|
|
49eaa7572d | ||
|
|
7308ffee43 | ||
|
|
922b14b8d8 | ||
|
|
8ca34d4b33 | ||
|
|
27df2a4c03 | ||
|
|
216cc641c9 | ||
|
|
3a25f7b1d7 | ||
|
|
ae8d0dc35f | ||
|
|
371b420ecf | ||
|
|
ce84fc8eed | ||
|
|
aba7ceda4f | ||
|
|
b2c4745aa3 | ||
|
|
38cb1ec2a7 | ||
|
|
cd7c3e6672 | ||
|
|
7185b719cc | ||
|
|
a5830628b9 | ||
|
|
f82b9f968b | ||
|
|
1f3635c496 | ||
|
|
7bd24b26e0 | ||
|
|
3b21982b60 | ||
|
|
d081fd728c | ||
|
|
a4a48ed06c | ||
|
|
8cda1c32ec | ||
|
|
96573d05b5 | ||
|
|
16962c1132 | ||
|
|
6f2d3c2c97 | ||
|
|
86fbf35fb6 | ||
|
|
0be9fa5735 | ||
|
|
822c8507bb | ||
|
|
c8843a0b14 | ||
|
|
418fe286c2 | ||
|
|
b7c41932ed | ||
|
|
fca3e72600 | ||
|
|
9495a94490 | ||
|
|
fef9852da3 | ||
|
|
d0ad5a9447 | ||
|
|
24211153fa | ||
|
|
d6c06349ed | ||
|
|
ee20edd645 | ||
|
|
7a2f3a4edf | ||
|
|
fc5c0c645a | ||
|
|
f610d61fcc | ||
|
|
c49694a34a | ||
|
|
17c3755f9a | ||
|
|
17745ddd86 |
5
.gitattributes
vendored
Normal file
5
.gitattributes
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/.travis.yml export-ignore
|
||||
/appveyor.yml export-ignore
|
||||
/ci export-ignore
|
||||
/.gitattributes export-ignore
|
||||
/.github export-ignore
|
||||
95
.github/CONTRIBUTING.md
vendored
Normal file
95
.github/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
Contributing to libjpeg-turbo
|
||||
=============================
|
||||
|
||||
libjpeg-turbo is a stable and mature product with a worldwide reach, it is an
|
||||
ISO/ITU-T reference implementation of the JPEG standard, and its maintainer
|
||||
does not earn a salary for maintaining it. Thus, not every code contribution
|
||||
can or will be accepted into the libjpeg-turbo code base. In order to maximize
|
||||
the chances that a code contribution is acceptable, please adhere to the
|
||||
following guidelines:
|
||||
|
||||
1. If the code contribution is a bug fix, then please ensure that enough
|
||||
information is provided so that the maintainer can readily reproduce and
|
||||
document the bug. That information should include:
|
||||
- A clear and concise description of the bug
|
||||
- The steps and (if applicable) images necessary to reproduce the bug
|
||||
- The compilers, operating systems, and CPUs with which the bug was
|
||||
observed
|
||||
- The versions of libjpeg-turbo with which the bug was observed
|
||||
- If the bug is a regression, the specific commit that introduced the bug
|
||||
(use `git bisect` to determine this)
|
||||
|
||||
2. If the code contribution will implement a major new feature, then please
|
||||
contact the project maintainer (through a
|
||||
[GitHub issue](https://github.com/libjpeg-turbo/libjpeg-turbo/issues/new),
|
||||
[direct e-mail](https://libjpeg-turbo.org/About/Contact), or the
|
||||
[libjpeg-turbo-devel mailing list](https://libjpeg-turbo.org/About/MailingLists))
|
||||
prior to implementing the feature. In general, major new features that are
|
||||
potentially disruptive to the quality of libjpeg-turbo are unlikely to be
|
||||
accepted unless:
|
||||
- The new feature is within the existing scope of libjpeg-turbo.
|
||||
- The new feature has been thoroughly regression tested and benchmarked on
|
||||
all of the supported platforms that are potentially affected by it.
|
||||
- The new feature has been documented clearly and concisely in the change
|
||||
log and (if applicable) the libjpeg and TurboJPEG API documentation and
|
||||
man pages.
|
||||
- The code implementing the new feature is formatted consistently with the
|
||||
rest of the libjpeg-turbo code base (use
|
||||
[checkstyle](https://github.com/libjpeg-turbo/checkstyle) to validate
|
||||
this.)
|
||||
- The new feature does not introduce new members into the exposed libjpeg
|
||||
API structures (doing so would break backward ABI compatibility.)
|
||||
- The new feature does not alter existing libjpeg-turbo usage or
|
||||
development workflows.
|
||||
- The code implementing the new feature is elegant, easily maintainable,
|
||||
and causes the least possible amount of disruption to the libjpeg-turbo
|
||||
code base.
|
||||
- The new feature is based on the dev branch of the libjpeg-turbo
|
||||
repository.
|
||||
|
||||
... OR ...
|
||||
|
||||
- Your organization is prepared to pay for the labor necessary to ensure
|
||||
all of the above. Even the most well-written patches can still require
|
||||
a significant amount of labor to clean up, test, and integrate. (See
|
||||
above RE: the maintainer not earning a salary.)
|
||||
|
||||
Specific types of features that *will not* be accepted:
|
||||
|
||||
- Features that extend the scope of libjpeg-turbo to support image formats
|
||||
other than DCT-based JPEG and JFIF
|
||||
- Features that extend the scope of libjpeg-turbo to support image
|
||||
processing algorithms that are not necessary for JPEG compression or
|
||||
decompression
|
||||
- Extensions to the JPEG format that have not been approved by the
|
||||
appropriate standards bodies
|
||||
- Non-trivial performance enhancements that have less than a 5% overall
|
||||
impact on performance
|
||||
|
||||
3. If the code contribution is a build system enhancement, then please be
|
||||
prepared to justify the enhancement. In general, build system enhancements
|
||||
are unlikely to be accepted unless:
|
||||
- The enhancement is potentially beneficial to a significant number of
|
||||
upstream libjpeg-turbo users/developers. (If the enhancement is only
|
||||
beneficial to a downstream project, then it does not belong here.)
|
||||
- The enhancement has been tested with the following CMake versions:
|
||||
- The earliest version of CMake that libjpeg-turbo currently supports
|
||||
(refer to CMakeLists.txt)
|
||||
- The most recent major version of CMake
|
||||
- (if applicable) The earliest version of CMake with which the
|
||||
enhancement can be used
|
||||
- The enhancement has been tested on all of the major platforms (Mac,
|
||||
Linux, Windows/Visual C++, Windows/MinGW) that are potentially affected
|
||||
by it.
|
||||
- The enhancement does not introduce new build system requirements or CMake
|
||||
variables unless absolutely necessary.
|
||||
- The enhancement does not alter existing libjpeg-turbo development
|
||||
workflows.
|
||||
|
||||
Specific types of build system enhancements that *will not* be accepted:
|
||||
|
||||
- Enhancements that allow libjpeg-turbo to be built from a subdirectory
|
||||
of a downstream repository. These enhancements are not maintainable in
|
||||
the upstream libjpeg-turbo build system. Use the CMake
|
||||
`ExternalProject_Add()` function instead.
|
||||
- Enhancements that introduce new (non-CMake-based) build systems
|
||||
40
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
40
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Inform the libjpeg-turbo maintainer about unexpected, reproducible behavior
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: dcommander
|
||||
|
||||
---
|
||||
|
||||
**Have you searched the existing issues (both open and closed) in the libjpeg-turbo issue tracker to ensure that this bug report is not a duplicate?**
|
||||
|
||||
|
||||
**Does this bug report describe one of the [two known and unsolvable issues with the JPEG format](https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf)?**
|
||||
|
||||
|
||||
**Clear and concise description of the bug:**
|
||||
|
||||
|
||||
**Steps to reproduce the bug (using *only* libjpeg-turbo):**
|
||||
|
||||
|
||||
**Image(s) needed in order to reproduce the bug (if applicable):**
|
||||
|
||||
|
||||
**Expected behavior:**
|
||||
|
||||
|
||||
**Observed behavior:**
|
||||
|
||||
|
||||
**Platform(s) (compiler version, operating system version, CPU) on which the bug was observed:**
|
||||
|
||||
|
||||
**libjpeg-turbo release(s), commit(s), or branch(es) in which the bug was observed (always test the tip of the master branch or the latest [stable pre-release](https://libjpeg-turbo.org/DeveloperInfo/PreReleases) to verify that the bug hasn't already been fixed):**
|
||||
|
||||
|
||||
**If the bug is a regression, the specific commit that introduced the regression (use `git bisect` to determine this):**
|
||||
|
||||
|
||||
**Additional information:**
|
||||
8
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
8
.github/ISSUE_TEMPLATE/feature-request.md
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Suggest new libjpeg-turbo functionality
|
||||
title: ''
|
||||
labels: enhancement
|
||||
assignees: dcommander
|
||||
|
||||
---
|
||||
156
.travis.yml
Normal file
156
.travis.yml
Normal file
@@ -0,0 +1,156 @@
|
||||
language: c
|
||||
|
||||
branches:
|
||||
except:
|
||||
- /^[0-9]+\.[0-9]+\.[0-9]+/
|
||||
- /^jpeg-.*/
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
env: BUILD_OFFICIAL=1
|
||||
sudo: required
|
||||
services:
|
||||
- docker
|
||||
- os: osx
|
||||
env: BUILD_OFFICIAL=1
|
||||
osx_image: xcode8.3
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env:
|
||||
CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
CFLAGS_RELWITHDEBINFO="-O1 -g -fsanitize=address,undefined -fno-omit-frame-pointer"
|
||||
CMAKE_FLAGS="-DENABLE_SHARED=0"
|
||||
ASAN_OPTIONS="detect_leaks=1 symbolize=1"
|
||||
CTEST_OUTPUT_ON_FAILURE=1
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- nasm
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env:
|
||||
CMAKE_FLAGS="-DWITH_12BIT=1"
|
||||
CTEST_OUTPUT_ON_FAILURE=1
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env:
|
||||
CMAKE_FLAGS="-DWITH_JPEG7=1"
|
||||
CTEST_OUTPUT_ON_FAILURE=1
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- nasm
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env:
|
||||
CMAKE_FLAGS="-DWITH_JPEG8=1"
|
||||
CTEST_OUTPUT_ON_FAILURE=1
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- nasm
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env:
|
||||
CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
CFLAGS_RELWITHDEBINFO="-O3 -g -fsanitize=memory -fPIE"
|
||||
CMAKE_FLAGS="-DWITH_SIMD=0"
|
||||
CTEST_OUTPUT_ON_FAILURE=1
|
||||
|
||||
addons:
|
||||
homebrew:
|
||||
brewfile: true
|
||||
update: true
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/Library/Caches/Homebrew
|
||||
|
||||
before_cache:
|
||||
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi
|
||||
|
||||
before_install:
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
git clone --depth=1 https://github.com/libjpeg-turbo/gas-preprocessor.git ~/src/gas-preprocessor &&
|
||||
ln -fs /Applications/Xcode.app /Applications/Xcode72.app;
|
||||
fi
|
||||
- if [ "${BUILD_OFFICIAL:-}" != "" ]; then
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
docker pull dcommander/buildljt;
|
||||
fi &&
|
||||
git clone --depth=1 https://github.com/libjpeg-turbo/buildscripts.git -b $TRAVIS_BRANCH ~/src/buildscripts &&
|
||||
if [ -n "$encrypted_f92e8533f6f1_iv" ]; then
|
||||
openssl aes-256-cbc -K $encrypted_f92e8533f6f1_key -iv $encrypted_f92e8533f6f1_iv -in ci/keys.enc -out ci/keys -d &&
|
||||
tar xf ci/keys &&
|
||||
rm ci/keys &&
|
||||
mv ci/gpgsign ~/src/buildscripts &&
|
||||
gpg --batch --import ci/sign_ljt &&
|
||||
rm ci/sign_ljt;
|
||||
fi
|
||||
fi
|
||||
|
||||
script:
|
||||
- if [ "${BUILD_OFFICIAL:-}" != "" ]; then
|
||||
mkdir -p ~/src/ljt.nightly &&
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
mkdir $HOME/rpmkeys &&
|
||||
wget --no-check-certificate "http://www.libjpeg-turbo.org/key/LJTPR-GPG-KEY" -O $HOME/rpmkeys/LJTPR-GPG-KEY &&
|
||||
docker run -v $HOME/src/ljt.nightly:/root/src/ljt.nightly -v $HOME/src/buildscripts:/root/src/buildscripts -v $TRAVIS_BUILD_DIR:/root/src/libjpeg-turbo -v $HOME/.gnupg:/root/.gnupg -v $HOME/rpmkeys:/rpmkeys -t dcommander/buildljt:latest bash -c "rpm --import /rpmkeys/LJTPR-GPG-KEY && ~/src/buildscripts/buildljt -d /root/src/libjpeg-turbo -v" &&
|
||||
sudo chown -R travis:travis ~/src/ljt.nightly &&
|
||||
mv ~/src/ljt.nightly/latest/log-$TRAVIS_OS_NAME.txt ~/src/ljt.nightly/latest/files/;
|
||||
else
|
||||
PATH=$PATH:~/src/gas-preprocessor ~/src/buildscripts/buildljt -d $TRAVIS_BUILD_DIR -v &&
|
||||
mv ~/src/ljt.nightly/latest/log-$TRAVIS_OS_NAME.txt ~/src/ljt.nightly/latest/files/;
|
||||
fi
|
||||
fi
|
||||
- if [ "${BUILD_OFFICIAL:-}" == "" ]; then
|
||||
mkdir build &&
|
||||
pushd build &&
|
||||
cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE "-DCMAKE_C_FLAGS_RELWITHDEBINFO=$CFLAGS_RELWITHDEBINFO" $CMAKE_FLAGS .. &&
|
||||
export NUMCPUS=`grep -c '^processor' /proc/cpuinfo` &&
|
||||
make -j$NUMCPUS --load-average=$NUMCPUS &&
|
||||
make test &&
|
||||
if [[ ! "${CMAKE_FLAGS[0]}" =~ "WITH_12BIT" &&
|
||||
! "${CMAKE_FLAGS[0]}" =~ "WITH_SIMD" ]]; then
|
||||
JSIMD_FORCESSE2=1 make test &&
|
||||
cmake -DFLOATTEST=32bit .. &&
|
||||
JSIMD_FORCENONE=1 make test;
|
||||
fi &&
|
||||
popd;
|
||||
fi
|
||||
|
||||
after_failure:
|
||||
- if [ "${BUILD_OFFICIAL:-}" == "" ]; then
|
||||
if [ -f $TRAVIS_BUILD_DIR/build/config.log ]; then
|
||||
cat $TRAVIS_BUILD_DIR/build/config.log;
|
||||
fi
|
||||
fi
|
||||
|
||||
deploy:
|
||||
- provider: s3
|
||||
bucket: libjpeg-turbo-pr
|
||||
access_key_id:
|
||||
secure: bmFEt4H90/oR/LiN9XI+G26Pd6hiyrTw3+Vg3lS4ynwAYk33weApaVM8CyzQTgIhGSPzFStqVm9fTrb3RmrYP/PnNS+/surOeWLkH2DMRxvc0qmetBuNx1+vAN7FUkY8MO/u5uE9WXHAdp4e64pXcLXEbKmh+wgDm72b35WmMxErtHsGbpqy+j47rQkY4BJGi7XQzjjafaamfm4PzitsjkYYsgX8KLI16jyJEIirvyDHCPTn9wKR/jSjelDl+xTlgZGuCqmLCBW8f6JgycIspWjcYfO4WpWvkbnnI2sl3rCMPvOYc4wHe8SwzG0l4tM1PblZZDRcU7vjE15PmNf1Xfq9Vx3RpgBJv+UBNL/Vn0rKdpUCeEcfC12hxrske8DWpV6waBiDivjQJreE+YRXqa5YBhV/EdkoKYCqafnJvRASlOko9evje8F9KXTNsIGTT1HPmU9QM9WoJwLs/Xa3t09EmA2IjhcuAvvUmwCTuBBQVAlDjExiTT3Zhc9IYZDD92JgpAYLgridtzR87ElOxKhTkR4PowdI6UiLYArPjMFTjoz5Rivb9qNpbLaQC8HCYgLWxpWtUTzlW/9rM8izHpF8ySFHjO6E2aA9OJFc0tcbEGwAs2jLGD01OduU+DbBfsIkW0EgfXCPbD3FVgHsn3tkuzgO/bg20SM7uuCEYKQ=
|
||||
secret_access_key:
|
||||
secure: mrkOpEtqd2dEmi/qNJyX9vkME+6xgVBnXaRETKF7jT+flcQCQ0ayQkRkMV7lzGqq44XFg+n6Cpfn6oW0gH9RNdcC8YQvFP+kgzPx6nw6V/M31Vz6ySapJf59HBzVevf0NJkr0/1JoWsp1iq4IoN10WPzsCXZB55Io3Cf7DgpR+yiyBlWOctDfNdjJ97Juw3ENE80MHDf0fVqdUOIknQka1p68yAGkjar9kc2Oe7o94RzzmoqEn8tuFumiBQjIcuVRALsKqz+eIxBNgkL3BF9shVyRjOWLAeBhMPVFxZs5Dgd4ECbvU0i33gfmje3d6qqcw78N2lZaLefoVvWol3pOzVO133ewOSY9/lmpqEiRUU2ohEe8T4aSoS7posBW42itUTO4Y5w+eVOnHsm4sRQaI+/AXWTe7GPel+P8Qbe8Ya10A5gnpoag7o3raRDcHx+/qaZw1Af/u4XiAOYz3be3U90Qc+YMc/kS5i8BH0GXBbSfaWQ00CwRFlZQ3n1xUqmjC2CmjZTki3W/p7mEt0DjhcH9ZIXscK603sCC+mF6pEd9019k5fG/8fr2Y4Ptai9kd3BxZJCX9/jSoMfWOBbgkA5bRgHU0xrAj+p49qD6Ej9Xr8GE3+uebz3sEuhSFRnCKwKoOHOemfgevfO2y/jQXP677WPf3xQX7bVDfTFSHU=
|
||||
acl: public_read
|
||||
local-dir: $HOME/src/ljt.nightly/latest/files
|
||||
upload-dir: $TRAVIS_BRANCH/$TRAVIS_OS_NAME
|
||||
on:
|
||||
repo: libjpeg-turbo/libjpeg-turbo
|
||||
branch: master
|
||||
condition: -n "$BUILD_OFFICIAL"
|
||||
- provider: s3
|
||||
bucket: libjpeg-turbo-pr
|
||||
access_key_id:
|
||||
secure: bmFEt4H90/oR/LiN9XI+G26Pd6hiyrTw3+Vg3lS4ynwAYk33weApaVM8CyzQTgIhGSPzFStqVm9fTrb3RmrYP/PnNS+/surOeWLkH2DMRxvc0qmetBuNx1+vAN7FUkY8MO/u5uE9WXHAdp4e64pXcLXEbKmh+wgDm72b35WmMxErtHsGbpqy+j47rQkY4BJGi7XQzjjafaamfm4PzitsjkYYsgX8KLI16jyJEIirvyDHCPTn9wKR/jSjelDl+xTlgZGuCqmLCBW8f6JgycIspWjcYfO4WpWvkbnnI2sl3rCMPvOYc4wHe8SwzG0l4tM1PblZZDRcU7vjE15PmNf1Xfq9Vx3RpgBJv+UBNL/Vn0rKdpUCeEcfC12hxrske8DWpV6waBiDivjQJreE+YRXqa5YBhV/EdkoKYCqafnJvRASlOko9evje8F9KXTNsIGTT1HPmU9QM9WoJwLs/Xa3t09EmA2IjhcuAvvUmwCTuBBQVAlDjExiTT3Zhc9IYZDD92JgpAYLgridtzR87ElOxKhTkR4PowdI6UiLYArPjMFTjoz5Rivb9qNpbLaQC8HCYgLWxpWtUTzlW/9rM8izHpF8ySFHjO6E2aA9OJFc0tcbEGwAs2jLGD01OduU+DbBfsIkW0EgfXCPbD3FVgHsn3tkuzgO/bg20SM7uuCEYKQ=
|
||||
secret_access_key:
|
||||
secure: mrkOpEtqd2dEmi/qNJyX9vkME+6xgVBnXaRETKF7jT+flcQCQ0ayQkRkMV7lzGqq44XFg+n6Cpfn6oW0gH9RNdcC8YQvFP+kgzPx6nw6V/M31Vz6ySapJf59HBzVevf0NJkr0/1JoWsp1iq4IoN10WPzsCXZB55Io3Cf7DgpR+yiyBlWOctDfNdjJ97Juw3ENE80MHDf0fVqdUOIknQka1p68yAGkjar9kc2Oe7o94RzzmoqEn8tuFumiBQjIcuVRALsKqz+eIxBNgkL3BF9shVyRjOWLAeBhMPVFxZs5Dgd4ECbvU0i33gfmje3d6qqcw78N2lZaLefoVvWol3pOzVO133ewOSY9/lmpqEiRUU2ohEe8T4aSoS7posBW42itUTO4Y5w+eVOnHsm4sRQaI+/AXWTe7GPel+P8Qbe8Ya10A5gnpoag7o3raRDcHx+/qaZw1Af/u4XiAOYz3be3U90Qc+YMc/kS5i8BH0GXBbSfaWQ00CwRFlZQ3n1xUqmjC2CmjZTki3W/p7mEt0DjhcH9ZIXscK603sCC+mF6pEd9019k5fG/8fr2Y4Ptai9kd3BxZJCX9/jSoMfWOBbgkA5bRgHU0xrAj+p49qD6Ej9Xr8GE3+uebz3sEuhSFRnCKwKoOHOemfgevfO2y/jQXP677WPf3xQX7bVDfTFSHU=
|
||||
acl: public_read
|
||||
local-dir: $HOME/src/ljt.nightly/latest/files
|
||||
upload-dir: $TRAVIS_BRANCH/$TRAVIS_OS_NAME
|
||||
on:
|
||||
repo: libjpeg-turbo/libjpeg-turbo
|
||||
branch: dev
|
||||
condition: -n "$BUILD_OFFICIAL"
|
||||
823
BUILDING.md
Normal file
823
BUILDING.md
Normal file
@@ -0,0 +1,823 @@
|
||||
Building libjpeg-turbo
|
||||
======================
|
||||
|
||||
|
||||
Build Requirements
|
||||
------------------
|
||||
|
||||
|
||||
### All Systems
|
||||
|
||||
- [CMake](http://www.cmake.org) v2.8.12 or later
|
||||
|
||||
- [NASM](http://www.nasm.us) or [YASM](http://yasm.tortall.net)
|
||||
(if building x86 or x86-64 SIMD extensions)
|
||||
* If using NASM, 2.10 or later is required.
|
||||
* If using NASM, 2.10 or later (except 2.11.08) is required for an x86-64 Mac
|
||||
build (2.11.08 does not work properly with libjpeg-turbo's x86-64 SIMD code
|
||||
when building macho64 objects.) NASM or YASM can be obtained from
|
||||
[MacPorts](http://www.macports.org/) or [Homebrew](http://brew.sh/).
|
||||
* If using YASM, 1.2.0 or later is required.
|
||||
- NOTE: Currently, if it is desirable to hide the SIMD function symbols in
|
||||
Mac executables or shared libraries that statically link with
|
||||
libjpeg-turbo, then YASM must be used when building libjpeg-turbo.
|
||||
* If building on Windows, **nasm.exe**/**yasm.exe** should be in your `PATH`.
|
||||
|
||||
The binary RPMs released by the NASM project do not work on older Linux
|
||||
systems, such as Red Hat Enterprise Linux 5. On such systems, you can easily
|
||||
build and install NASM from a source RPM by downloading one of the SRPMs from
|
||||
|
||||
<http://www.nasm.us/pub/nasm/releasebuilds>
|
||||
|
||||
and executing the following as root:
|
||||
|
||||
ARCH=`uname -m`
|
||||
rpmbuild --rebuild nasm-{version}.src.rpm
|
||||
rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-{version}.$ARCH.rpm
|
||||
|
||||
NOTE: the NASM build will fail if texinfo is not installed.
|
||||
|
||||
|
||||
### Un*x Platforms (including Linux, Mac, FreeBSD, Solaris, and Cygwin)
|
||||
|
||||
- GCC v4.1 (or later) or Clang recommended for best performance
|
||||
|
||||
- If building the TurboJPEG Java wrapper, JDK or OpenJDK 1.5 or later is
|
||||
required. Most modern Linux distributions, as well as Solaris 10 and later,
|
||||
include JDK or OpenJDK. On OS X 10.5 and 10.6, it will be necessary to
|
||||
install the Java Developer Package, which can be downloaded from
|
||||
<http://developer.apple.com/downloads> (Apple ID required.) For other
|
||||
systems, you can obtain the Oracle Java Development Kit from
|
||||
<http://www.oracle.com/technetwork/java/javase/downloads>.
|
||||
|
||||
* If using JDK 11 or later, CMake 3.10.x or later must also be used.
|
||||
|
||||
### Windows
|
||||
|
||||
- Microsoft Visual C++ 2005 or later
|
||||
|
||||
If you don't already have Visual C++, then the easiest way to get it is by
|
||||
installing the
|
||||
[Windows SDK](http://msdn.microsoft.com/en-us/windows/bb980924.aspx).
|
||||
The Windows SDK includes both 32-bit and 64-bit Visual C++ compilers and
|
||||
everything necessary to build libjpeg-turbo.
|
||||
|
||||
* You can also use Microsoft Visual Studio Express/Community Edition, which
|
||||
is a free download. (NOTE: versions prior to 2012 can only be used to
|
||||
build 32-bit code.)
|
||||
* If you intend to build libjpeg-turbo from the command line, then add the
|
||||
appropriate compiler and SDK directories to the `INCLUDE`, `LIB`, and
|
||||
`PATH` environment variables. This is generally accomplished by
|
||||
executing `vcvars32.bat` or `vcvars64.bat` and `SetEnv.cmd`.
|
||||
`vcvars32.bat` and `vcvars64.bat` are part of Visual C++ and are located in
|
||||
the same directory as the compiler. `SetEnv.cmd` is part of the Windows
|
||||
SDK. You can pass optional arguments to `SetEnv.cmd` to specify a 32-bit
|
||||
or 64-bit build environment.
|
||||
|
||||
... OR ...
|
||||
|
||||
- MinGW
|
||||
|
||||
[MSYS2](http://msys2.github.io/) or [tdm-gcc](http://tdm-gcc.tdragon.net/)
|
||||
recommended if building on a Windows machine. Both distributions install a
|
||||
Start Menu link that can be used to launch a command prompt with the
|
||||
appropriate compiler paths automatically set.
|
||||
|
||||
- If building the TurboJPEG Java wrapper, JDK 1.5 or later is required. This
|
||||
can be downloaded from
|
||||
<http://www.oracle.com/technetwork/java/javase/downloads>.
|
||||
|
||||
* If using JDK 11 or later, CMake 3.10.x or later must also be used.
|
||||
|
||||
|
||||
Out-of-Tree Builds
|
||||
------------------
|
||||
|
||||
Binary objects, libraries, and executables are generated in the directory from
|
||||
which CMake is executed (the "binary directory"), and this directory need not
|
||||
necessarily be the same as the libjpeg-turbo source directory. You can create
|
||||
multiple independent binary directories, in which different versions of
|
||||
libjpeg-turbo can be built from the same source tree using different compilers
|
||||
or settings. In the sections below, *{build_directory}* refers to the binary
|
||||
directory, whereas *{source_directory}* refers to the libjpeg-turbo source
|
||||
directory. For in-tree builds, these directories are the same.
|
||||
|
||||
|
||||
Build Procedure
|
||||
---------------
|
||||
|
||||
NOTE: The build procedures below assume that CMake is invoked from the command
|
||||
line, but all of these procedures can be adapted to the CMake GUI as
|
||||
well.
|
||||
|
||||
|
||||
### Un*x
|
||||
|
||||
The following procedure will build libjpeg-turbo on Unix and Unix-like systems.
|
||||
(On Solaris, this generates a 32-bit build. See "Build Recipes" below for
|
||||
64-bit build instructions.)
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G"Unix Makefiles" [additional CMake flags] {source_directory}
|
||||
make
|
||||
|
||||
This will generate the following files under *{build_directory}*:
|
||||
|
||||
**libjpeg.a**<br>
|
||||
Static link library for the libjpeg API
|
||||
|
||||
**libjpeg.so.{version}** (Linux, Unix)<br>
|
||||
**libjpeg.{version}.dylib** (Mac)<br>
|
||||
**cygjpeg-{version}.dll** (Cygwin)<br>
|
||||
Shared library for the libjpeg API
|
||||
|
||||
By default, *{version}* is 62.2.0, 7.2.0, or 8.1.2, depending on whether
|
||||
libjpeg v6b (default), v7, or v8 emulation is enabled. If using Cygwin,
|
||||
*{version}* is 62, 7, or 8.
|
||||
|
||||
**libjpeg.so** (Linux, Unix)<br>
|
||||
**libjpeg.dylib** (Mac)<br>
|
||||
Development symlink for the libjpeg API
|
||||
|
||||
**libjpeg.dll.a** (Cygwin)<br>
|
||||
Import library for the libjpeg API
|
||||
|
||||
**libturbojpeg.a**<br>
|
||||
Static link library for the TurboJPEG API
|
||||
|
||||
**libturbojpeg.so.0.2.0** (Linux, Unix)<br>
|
||||
**libturbojpeg.0.2.0.dylib** (Mac)<br>
|
||||
**cygturbojpeg-0.dll** (Cygwin)<br>
|
||||
Shared library for the TurboJPEG API
|
||||
|
||||
**libturbojpeg.so** (Linux, Unix)<br>
|
||||
**libturbojpeg.dylib** (Mac)<br>
|
||||
Development symlink for the TurboJPEG API
|
||||
|
||||
**libturbojpeg.dll.a** (Cygwin)<br>
|
||||
Import library for the TurboJPEG API
|
||||
|
||||
|
||||
### Visual C++ (Command Line)
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release [additional CMake flags] {source_directory}
|
||||
nmake
|
||||
|
||||
This will build either a 32-bit or a 64-bit version of libjpeg-turbo, depending
|
||||
on which version of **cl.exe** is in the `PATH`.
|
||||
|
||||
The following files will be generated under *{build_directory}*:
|
||||
|
||||
**jpeg-static.lib**<br>
|
||||
Static link library for the libjpeg API
|
||||
|
||||
**jpeg{version}.dll**<br>
|
||||
DLL for the libjpeg API
|
||||
|
||||
**jpeg.lib**<br>
|
||||
Import library for the libjpeg API
|
||||
|
||||
**turbojpeg-static.lib**<br>
|
||||
Static link library for the TurboJPEG API
|
||||
|
||||
**turbojpeg.dll**<br>
|
||||
DLL for the TurboJPEG API
|
||||
|
||||
**turbojpeg.lib**<br>
|
||||
Import library for the TurboJPEG API
|
||||
|
||||
*{version}* is 62, 7, or 8, depending on whether libjpeg v6b (default), v7, or
|
||||
v8 emulation is enabled.
|
||||
|
||||
|
||||
### Visual C++ (IDE)
|
||||
|
||||
Choose the appropriate CMake generator option for your version of Visual Studio
|
||||
(run `cmake` with no arguments for a list of available generators.) For
|
||||
instance:
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G"Visual Studio 10" [additional CMake flags] {source_directory}
|
||||
|
||||
NOTE: Add "Win64" to the generator name (for example, "Visual Studio 10 Win64")
|
||||
to build a 64-bit version of libjpeg-turbo. A separate build directory must be
|
||||
used for 32-bit and 64-bit builds.
|
||||
|
||||
You can then open **ALL_BUILD.vcproj** in Visual Studio and build one of the
|
||||
configurations in that project ("Debug", "Release", etc.) to generate a full
|
||||
build of libjpeg-turbo.
|
||||
|
||||
This will generate the following files under *{build_directory}*:
|
||||
|
||||
**{configuration}/jpeg-static.lib**<br>
|
||||
Static link library for the libjpeg API
|
||||
|
||||
**{configuration}/jpeg{version}.dll**<br>
|
||||
DLL for the libjpeg API
|
||||
|
||||
**{configuration}/jpeg.lib**<br>
|
||||
Import library for the libjpeg API
|
||||
|
||||
**{configuration}/turbojpeg-static.lib**<br>
|
||||
Static link library for the TurboJPEG API
|
||||
|
||||
**{configuration}/turbojpeg.dll**<br>
|
||||
DLL for the TurboJPEG API
|
||||
|
||||
**{configuration}/turbojpeg.lib**<br>
|
||||
Import library for the TurboJPEG API
|
||||
|
||||
*{configuration}* is Debug, Release, RelWithDebInfo, or MinSizeRel, depending
|
||||
on the configuration you built in the IDE, and *{version}* is 62, 7, or 8,
|
||||
depending on whether libjpeg v6b (default), v7, or v8 emulation is enabled.
|
||||
|
||||
|
||||
### MinGW
|
||||
|
||||
NOTE: This assumes that you are building on a Windows machine using the MSYS
|
||||
environment. If you are cross-compiling on a Un*x platform (including Mac and
|
||||
Cygwin), then see "Build Recipes" below.
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G"MSYS Makefiles" [additional CMake flags] {source_directory}
|
||||
make
|
||||
|
||||
This will generate the following files under *{build_directory}*:
|
||||
|
||||
**libjpeg.a**<br>
|
||||
Static link library for the libjpeg API
|
||||
|
||||
**libjpeg-{version}.dll**<br>
|
||||
DLL for the libjpeg API
|
||||
|
||||
**libjpeg.dll.a**<br>
|
||||
Import library for the libjpeg API
|
||||
|
||||
**libturbojpeg.a**<br>
|
||||
Static link library for the TurboJPEG API
|
||||
|
||||
**libturbojpeg.dll**<br>
|
||||
DLL for the TurboJPEG API
|
||||
|
||||
**libturbojpeg.dll.a**<br>
|
||||
Import library for the TurboJPEG API
|
||||
|
||||
*{version}* is 62, 7, or 8, depending on whether libjpeg v6b (default), v7, or
|
||||
v8 emulation is enabled.
|
||||
|
||||
|
||||
### Debug Build
|
||||
|
||||
Add `-DCMAKE_BUILD_TYPE=Debug` to the CMake command line. Or, if building
|
||||
with NMake, remove `-DCMAKE_BUILD_TYPE=Release` (Debug builds are the default
|
||||
with NMake.)
|
||||
|
||||
|
||||
### libjpeg v7 or v8 API/ABI Emulation
|
||||
|
||||
Add `-DWITH_JPEG7=1` to the CMake command line to build a version of
|
||||
libjpeg-turbo that is API/ABI-compatible with libjpeg v7. Add `-DWITH_JPEG8=1`
|
||||
to the CMake command line to build a version of libjpeg-turbo that is
|
||||
API/ABI-compatible with libjpeg v8. See [README.md](README.md) for more
|
||||
information about libjpeg v7 and v8 emulation.
|
||||
|
||||
|
||||
### In-Memory Source/Destination Managers
|
||||
|
||||
When using libjpeg v6b or v7 API/ABI emulation, add `-DWITH_MEM_SRCDST=0` to
|
||||
the CMake command line to build a version of libjpeg-turbo that lacks the
|
||||
`jpeg_mem_src()` and `jpeg_mem_dest()` functions. These functions were not
|
||||
part of the original libjpeg v6b and v7 APIs, so removing them ensures strict
|
||||
conformance with those APIs. See [README.md](README.md) for more information.
|
||||
|
||||
|
||||
### Arithmetic Coding Support
|
||||
|
||||
Since the patent on arithmetic coding has expired, this functionality has been
|
||||
included in this release of libjpeg-turbo. libjpeg-turbo's implementation is
|
||||
based on the implementation in libjpeg v8, but it works when emulating libjpeg
|
||||
v7 or v6b as well. The default is to enable both arithmetic encoding and
|
||||
decoding, but those who have philosophical objections to arithmetic coding can
|
||||
add `-DWITH_ARITH_ENC=0` or `-DWITH_ARITH_DEC=0` to the CMake command line to
|
||||
disable encoding or decoding (respectively.)
|
||||
|
||||
|
||||
### TurboJPEG Java Wrapper
|
||||
|
||||
Add `-DWITH_JAVA=1` to the CMake command line to incorporate an optional Java
|
||||
Native Interface (JNI) wrapper into the TurboJPEG shared library and build the
|
||||
Java front-end classes to support it. This allows the TurboJPEG shared library
|
||||
to be used directly from Java applications. See [java/README](java/README) for
|
||||
more details.
|
||||
|
||||
If Java is not in your `PATH`, or if you wish to use an alternate JDK to
|
||||
build/test libjpeg-turbo, then (prior to running CMake) set the `JAVA_HOME`
|
||||
environment variable to the location of the JDK that you wish to use. The
|
||||
`Java_JAVAC_EXECUTABLE`, `Java_JAVA_EXECUTABLE`, and `Java_JAR_EXECUTABLE`
|
||||
CMake variables can also be used to specify alternate commands or locations for
|
||||
javac, jar, and java (respectively.) You can also set the
|
||||
`CMAKE_JAVA_COMPILE_FLAGS` CMake variable or the `JAVAFLAGS` environment
|
||||
variable to specify arguments that should be passed to the Java compiler when
|
||||
building the TurboJPEG classes, and the `JAVAARGS` CMake variable to specify
|
||||
arguments that should be passed to the JRE when running the TurboJPEG Java unit
|
||||
tests.
|
||||
|
||||
|
||||
Build Recipes
|
||||
-------------
|
||||
|
||||
|
||||
### 32-bit Build on 64-bit Linux/Unix/Mac
|
||||
|
||||
Use export/setenv to set the following environment variables before running
|
||||
CMake:
|
||||
|
||||
CFLAGS=-m32
|
||||
LDFLAGS=-m32
|
||||
|
||||
|
||||
### 64-bit Build on Solaris
|
||||
|
||||
Use export/setenv to set the following environment variables before running
|
||||
CMake:
|
||||
|
||||
CFLAGS=-m64
|
||||
LDFLAGS=-m64
|
||||
|
||||
|
||||
### Other Compilers
|
||||
|
||||
On Un*x systems, prior to running CMake, you can set the `CC` environment
|
||||
variable to the command used to invoke the C compiler.
|
||||
|
||||
|
||||
### 32-bit MinGW Build on Un*x (including Mac and Cygwin)
|
||||
|
||||
Create a file called **toolchain.cmake** under *{build_directory}*, with the
|
||||
following contents:
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR X86)
|
||||
set(CMAKE_C_COMPILER {mingw_binary_path}/i686-w64-mingw32-gcc)
|
||||
set(CMAKE_RC_COMPILER {mingw_binary_path}/i686-w64-mingw32-windres)
|
||||
|
||||
*{mingw\_binary\_path}* is the directory under which the MinGW binaries are
|
||||
located (usually **/usr/bin**.) Next, execute the following commands:
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
|
||||
[additional CMake flags] {source_directory}
|
||||
make
|
||||
|
||||
|
||||
### 64-bit MinGW Build on Un*x (including Mac and Cygwin)
|
||||
|
||||
Create a file called **toolchain.cmake** under *{build_directory}*, with the
|
||||
following contents:
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR AMD64)
|
||||
set(CMAKE_C_COMPILER {mingw_binary_path}/x86_64-w64-mingw32-gcc)
|
||||
set(CMAKE_RC_COMPILER {mingw_binary_path}/x86_64-w64-mingw32-windres)
|
||||
|
||||
*{mingw\_binary\_path}* is the directory under which the MinGW binaries are
|
||||
located (usually **/usr/bin**.) Next, execute the following commands:
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
|
||||
[additional CMake flags] {source_directory}
|
||||
make
|
||||
|
||||
|
||||
Building libjpeg-turbo for iOS
|
||||
------------------------------
|
||||
|
||||
iOS platforms, such as the iPhone and iPad, use ARM processors, and all
|
||||
currently supported models include NEON instructions. Thus, they can take
|
||||
advantage of libjpeg-turbo's SIMD extensions to significantly accelerate JPEG
|
||||
compression/decompression. This section describes how to build libjpeg-turbo
|
||||
for these platforms.
|
||||
|
||||
|
||||
### Additional build requirements
|
||||
|
||||
- For configurations that require [gas-preprocessor.pl]
|
||||
(https://raw.githubusercontent.com/libjpeg-turbo/gas-preprocessor/master/gas-preprocessor.pl),
|
||||
it should be installed in your `PATH`.
|
||||
|
||||
|
||||
### ARMv7 (32-bit)
|
||||
|
||||
**gas-preprocessor.pl required**
|
||||
|
||||
The following scripts demonstrate how to build libjpeg-turbo to run on the
|
||||
iPhone 3GS-4S/iPad 1st-3rd Generation and newer:
|
||||
|
||||
#### Xcode 4.2 and earlier (LLVM-GCC)
|
||||
|
||||
IOS_PLATFORMDIR=/Developer/Platforms/iPhoneOS.platform
|
||||
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
|
||||
export CFLAGS="-mfloat-abi=softfp -march=armv7 -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -miphoneos-version-min=3.0"
|
||||
|
||||
cd {build_directory}
|
||||
|
||||
cat <<EOF >toolchain.cmake
|
||||
set(CMAKE_SYSTEM_NAME Darwin)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
set(CMAKE_C_COMPILER ${IOS_PLATFORMDIR}/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2)
|
||||
EOF
|
||||
|
||||
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
|
||||
-DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
|
||||
[additional CMake flags] {source_directory}
|
||||
make
|
||||
|
||||
#### Xcode 4.3-4.6 (LLVM-GCC)
|
||||
|
||||
Same as above, but replace the first line with:
|
||||
|
||||
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||
|
||||
#### Xcode 5 and later (Clang)
|
||||
|
||||
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
|
||||
export CFLAGS="-mfloat-abi=softfp -arch armv7 -miphoneos-version-min=3.0"
|
||||
export ASMFLAGS="-no-integrated-as"
|
||||
|
||||
cd {build_directory}
|
||||
|
||||
cat <<EOF >toolchain.cmake
|
||||
set(CMAKE_SYSTEM_NAME Darwin)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
set(CMAKE_C_COMPILER /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang)
|
||||
EOF
|
||||
|
||||
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
|
||||
-DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
|
||||
[additional CMake flags] {source_directory}
|
||||
make
|
||||
|
||||
|
||||
### ARMv7s (32-bit)
|
||||
|
||||
**gas-preprocessor.pl required**
|
||||
|
||||
The following scripts demonstrate how to build libjpeg-turbo to run on the
|
||||
iPhone 5/iPad 4th Generation and newer:
|
||||
|
||||
#### Xcode 4.5-4.6 (LLVM-GCC)
|
||||
|
||||
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
|
||||
export CFLAGS="-Wall -mfloat-abi=softfp -march=armv7s -mcpu=swift -mtune=swift -mfpu=neon -miphoneos-version-min=6.0"
|
||||
|
||||
cd {build_directory}
|
||||
|
||||
cat <<EOF >toolchain.cmake
|
||||
set(CMAKE_SYSTEM_NAME Darwin)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||
set(CMAKE_C_COMPILER ${IOS_PLATFORMDIR}/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2)
|
||||
EOF
|
||||
|
||||
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
|
||||
-DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
|
||||
[additional CMake flags] {source_directory}
|
||||
make
|
||||
|
||||
#### Xcode 5 and later (Clang)
|
||||
|
||||
Same as the ARMv7 build procedure for Xcode 5 and later, except replace the
|
||||
compiler flags as follows:
|
||||
|
||||
export CFLAGS="-Wall -mfloat-abi=softfp -arch armv7s -miphoneos-version-min=6.0"
|
||||
|
||||
|
||||
### ARMv8 (64-bit)
|
||||
|
||||
**gas-preprocessor.pl required if using Xcode < 6**
|
||||
|
||||
The following script demonstrates how to build libjpeg-turbo to run on the
|
||||
iPhone 5S/iPad Mini 2/iPad Air and newer.
|
||||
|
||||
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||
IOS_SYSROOT=($IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS*.sdk)
|
||||
export CFLAGS="-Wall -arch arm64 -miphoneos-version-min=7.0 -funwind-tables"
|
||||
|
||||
cd {build_directory}
|
||||
|
||||
cat <<EOF >toolchain.cmake
|
||||
set(CMAKE_SYSTEM_NAME Darwin)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
set(CMAKE_C_COMPILER /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang)
|
||||
EOF
|
||||
|
||||
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake \
|
||||
-DCMAKE_OSX_SYSROOT=${IOS_SYSROOT[0]} \
|
||||
[additional CMake flags] {source_directory}
|
||||
make
|
||||
|
||||
Once built, lipo can be used to combine the ARMv7, v7s, and/or v8 variants into
|
||||
a universal library.
|
||||
|
||||
|
||||
Building libjpeg-turbo for Android
|
||||
----------------------------------
|
||||
|
||||
Building libjpeg-turbo for Android platforms requires v13b or later of the
|
||||
[Android NDK](https://developer.android.com/tools/sdk/ndk).
|
||||
|
||||
|
||||
### ARMv7 (32-bit)
|
||||
|
||||
The following is a general recipe script that can be modified for your specific
|
||||
needs.
|
||||
|
||||
# Set these variables to suit your needs
|
||||
NDK_PATH={full path to the NDK directory-- for example,
|
||||
/opt/android/android-ndk-r16b}
|
||||
TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r16b and earlier,
|
||||
and "clang" must be used with NDK r17c and later}
|
||||
ANDROID_VERSION={the minimum version of Android to support-- for example,
|
||||
"16", "19", etc.}
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G"Unix Makefiles" \
|
||||
-DANDROID_ABI=armeabi-v7a \
|
||||
-DANDROID_ARM_MODE=arm \
|
||||
-DANDROID_PLATFORM=android-${ANDROID_VERSION} \
|
||||
-DANDROID_TOOLCHAIN=${TOOLCHAIN} \
|
||||
-DCMAKE_ASM_FLAGS="--target=arm-linux-androideabi${ANDROID_VERSION}" \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
|
||||
[additional CMake flags] {source_directory}
|
||||
make
|
||||
|
||||
|
||||
### ARMv8 (64-bit)
|
||||
|
||||
The following is a general recipe script that can be modified for your specific
|
||||
needs.
|
||||
|
||||
# Set these variables to suit your needs
|
||||
NDK_PATH={full path to the NDK directory-- for example,
|
||||
/opt/android/android-ndk-r16b}
|
||||
TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r14b and earlier,
|
||||
and "clang" must be used with NDK r17c and later}
|
||||
ANDROID_VERSION={the minimum version of Android to support. "21" or later
|
||||
is required for a 64-bit build.}
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G"Unix Makefiles" \
|
||||
-DANDROID_ABI=arm64-v8a \
|
||||
-DANDROID_ARM_MODE=arm \
|
||||
-DANDROID_PLATFORM=android-${ANDROID_VERSION} \
|
||||
-DANDROID_TOOLCHAIN=${TOOLCHAIN} \
|
||||
-DCMAKE_ASM_FLAGS="--target=aarch64-linux-android${ANDROID_VERSION}" \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
|
||||
[additional CMake flags] {source_directory}
|
||||
make
|
||||
|
||||
|
||||
### x86 (32-bit)
|
||||
|
||||
The following is a general recipe script that can be modified for your specific
|
||||
needs.
|
||||
|
||||
# Set these variables to suit your needs
|
||||
NDK_PATH={full path to the NDK directory-- for example,
|
||||
/opt/android/android-ndk-r16b}
|
||||
TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r14b and earlier,
|
||||
and "clang" must be used with NDK r17c and later}
|
||||
ANDROID_VERSION={The minimum version of Android to support-- for example,
|
||||
"16", "19", etc.}
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G"Unix Makefiles" \
|
||||
-DANDROID_ABI=x86 \
|
||||
-DANDROID_PLATFORM=android-${ANDROID_VERSION} \
|
||||
-DANDROID_TOOLCHAIN=${TOOLCHAIN} \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
|
||||
[additional CMake flags] {source_directory}
|
||||
make
|
||||
|
||||
|
||||
### x86-64 (64-bit)
|
||||
|
||||
The following is a general recipe script that can be modified for your specific
|
||||
needs.
|
||||
|
||||
# Set these variables to suit your needs
|
||||
NDK_PATH={full path to the NDK directory-- for example,
|
||||
/opt/android/android-ndk-r16b}
|
||||
TOOLCHAIN={"gcc" or "clang"-- "gcc" must be used with NDK r14b and earlier,
|
||||
and "clang" must be used with NDK r17c and later}
|
||||
ANDROID_VERSION={the minimum version of Android to support. "21" or later
|
||||
is required for a 64-bit build.}
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G"Unix Makefiles" \
|
||||
-DANDROID_ABI=x86_64 \
|
||||
-DANDROID_PLATFORM=android-${ANDROID_VERSION} \
|
||||
-DANDROID_TOOLCHAIN=${TOOLCHAIN} \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${NDK_PATH}/build/cmake/android.toolchain.cmake \
|
||||
[additional CMake flags] {source_directory}
|
||||
make
|
||||
|
||||
|
||||
Advanced CMake Options
|
||||
----------------------
|
||||
|
||||
To list and configure other CMake options not specifically mentioned in this
|
||||
guide, run
|
||||
|
||||
ccmake {source_directory}
|
||||
|
||||
or
|
||||
|
||||
cmake-gui {source_directory}
|
||||
|
||||
from the build directory after initially configuring the build. CCMake is a
|
||||
text-based interactive version of CMake, and CMake-GUI is a GUI version. Both
|
||||
will display all variables that are relevant to the libjpeg-turbo build, their
|
||||
current values, and a help string describing what they do.
|
||||
|
||||
|
||||
Installing libjpeg-turbo
|
||||
========================
|
||||
|
||||
You can use the build system to install libjpeg-turbo (as opposed to creating
|
||||
an installer package.) To do this, run `make install` or `nmake install`
|
||||
(or build the "install" target in the Visual Studio IDE.) Running
|
||||
`make uninstall` or `nmake uninstall` (or building the "uninstall" target in
|
||||
the Visual Studio IDE) will uninstall libjpeg-turbo.
|
||||
|
||||
The `CMAKE_INSTALL_PREFIX` CMake variable can be modified in order to install
|
||||
libjpeg-turbo into a directory of your choosing. If you don't specify
|
||||
`CMAKE_INSTALL_PREFIX`, then the default is:
|
||||
|
||||
**c:\libjpeg-turbo**<br>
|
||||
Visual Studio 32-bit build
|
||||
|
||||
**c:\libjpeg-turbo64**<br>
|
||||
Visual Studio 64-bit build
|
||||
|
||||
**c:\libjpeg-turbo-gcc**<br>
|
||||
MinGW 32-bit build
|
||||
|
||||
**c:\libjpeg-turbo-gcc64**<br>
|
||||
MinGW 64-bit build
|
||||
|
||||
**/opt/libjpeg-turbo**<br>
|
||||
Un*x
|
||||
|
||||
The default value of `CMAKE_INSTALL_PREFIX` causes the libjpeg-turbo files to
|
||||
be installed with a directory structure resembling that of the official
|
||||
libjpeg-turbo binary packages. Changing the value of `CMAKE_INSTALL_PREFIX`
|
||||
(for instance, to **/usr/local**) causes the libjpeg-turbo files to be
|
||||
installed with a directory structure that conforms to GNU standards.
|
||||
|
||||
The `CMAKE_INSTALL_BINDIR`, `CMAKE_INSTALL_DATAROOTDIR`,
|
||||
`CMAKE_INSTALL_DOCDIR`, `CMAKE_INSTALL_INCLUDEDIR`, `CMAKE_INSTALL_JAVADIR`,
|
||||
`CMAKE_INSTALL_LIBDIR`, and `CMAKE_INSTALL_MANDIR` CMake variables allow a
|
||||
finer degree of control over where specific files in the libjpeg-turbo
|
||||
distribution should be installed. These directory variables can either be
|
||||
specified as absolute paths or as paths relative to `CMAKE_INSTALL_PREFIX` (for
|
||||
instance, setting `CMAKE_INSTALL_DOCDIR` to **doc** would cause the
|
||||
documentation to be installed in **${CMAKE\_INSTALL\_PREFIX}/doc**.) If a
|
||||
directory variable contains the name of another directory variable in angle
|
||||
brackets, then its final value will depend on the final value of that other
|
||||
variable. For instance, the default value of `CMAKE_INSTALL_MANDIR` is
|
||||
**\<CMAKE\_INSTALL\_DATAROOTDIR\>/man**.
|
||||
|
||||
NOTE: If setting one of these directory variables to a relative path using the
|
||||
CMake command line, you must specify that the variable is of type `PATH`.
|
||||
For example:
|
||||
|
||||
cmake -G"{generator type}" -DCMAKE_INSTALL_LIBDIR:PATH=lib {source_directory}
|
||||
|
||||
Otherwise, CMake will assume that the path is relative to the build directory
|
||||
rather than the install directory.
|
||||
|
||||
|
||||
Creating Distribution Packages
|
||||
==============================
|
||||
|
||||
The following commands can be used to create various types of distribution
|
||||
packages:
|
||||
|
||||
|
||||
Linux
|
||||
-----
|
||||
|
||||
make rpm
|
||||
|
||||
Create Red Hat-style binary RPM package. Requires RPM v4 or later.
|
||||
|
||||
make srpm
|
||||
|
||||
This runs `make dist` to create a pristine source tarball, then creates a
|
||||
Red Hat-style source RPM package from the tarball. Requires RPM v4 or later.
|
||||
|
||||
make deb
|
||||
|
||||
Create Debian-style binary package. Requires dpkg.
|
||||
|
||||
|
||||
Mac
|
||||
---
|
||||
|
||||
make dmg
|
||||
|
||||
Create Mac package/disk image. This requires pkgbuild and productbuild, which
|
||||
are installed by default on OS X 10.7 and later and which can be obtained by
|
||||
installing Xcode 3.2.6 (with the "Unix Development" option) on OS X 10.6.
|
||||
Packages built in this manner can be installed on OS X 10.5 and later, but they
|
||||
must be built on OS X 10.6 or later.
|
||||
|
||||
make udmg
|
||||
|
||||
This creates a Mac package/disk image that contains universal x86-64/i386/ARM
|
||||
binaries. The following CMake variables control which architectures are
|
||||
included in the universal binaries. Setting any of these variables to an empty
|
||||
string excludes that architecture from the package.
|
||||
|
||||
* `OSX_32BIT_BUILD`: Directory containing an i386 (32-bit) Mac build of
|
||||
libjpeg-turbo (default: *{source_directory}*/osxx86)
|
||||
* `IOS_ARMV7_BUILD`: Directory containing an ARMv7 (32-bit) iOS build of
|
||||
libjpeg-turbo (default: *{source_directory}*/iosarmv7)
|
||||
* `IOS_ARMV7S_BUILD`: Directory containing an ARMv7s (32-bit) iOS build of
|
||||
libjpeg-turbo (default: *{source_directory}*/iosarmv7s)
|
||||
* `IOS_ARMV8_BUILD`: Directory containing an ARMv8 (64-bit) iOS build of
|
||||
libjpeg-turbo (default: *{source_directory}*/iosarmv8)
|
||||
|
||||
You should first use CMake to configure i386, ARMv7, ARMv7s, and/or ARMv8
|
||||
sub-builds of libjpeg-turbo (see "Build Recipes" and "Building libjpeg-turbo
|
||||
for iOS" above) in build directories that match those specified in the
|
||||
aforementioned CMake variables. Next, configure the primary build of
|
||||
libjpeg-turbo as an out-of-tree build, and build it. Once the primary build
|
||||
has been built, run `make udmg` from the build directory. The packaging system
|
||||
will build the sub-builds, use lipo to combine them into a single set of
|
||||
universal binaries, then package the universal binaries in the same manner as
|
||||
`make dmg`.
|
||||
|
||||
|
||||
Cygwin
|
||||
------
|
||||
|
||||
make cygwinpkg
|
||||
|
||||
Build a Cygwin binary package.
|
||||
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
If using NMake:
|
||||
|
||||
cd {build_directory}
|
||||
nmake installer
|
||||
|
||||
If using MinGW:
|
||||
|
||||
cd {build_directory}
|
||||
make installer
|
||||
|
||||
If using the Visual Studio IDE, build the "installer" target.
|
||||
|
||||
The installer package (libjpeg-turbo-*{version}*[-gcc|-vc][64].exe) will be
|
||||
located under *{build_directory}*. If building using the Visual Studio IDE,
|
||||
then the installer package will be located in a subdirectory with the same name
|
||||
as the configuration you built (such as *{build_directory}*\Debug\ or
|
||||
*{build_directory}*\Release\).
|
||||
|
||||
Building a Windows installer requires the
|
||||
[Nullsoft Install System](http://nsis.sourceforge.net/). makensis.exe should
|
||||
be in your `PATH`.
|
||||
|
||||
|
||||
Regression testing
|
||||
==================
|
||||
|
||||
The most common way to test libjpeg-turbo is by invoking `make test` (Un*x) or
|
||||
`nmake test` (Windows command line) or by building the "RUN_TESTS" target
|
||||
(Visual Studio IDE), once the build has completed. This runs a series of tests
|
||||
to ensure that mathematical compatibility has been maintained between
|
||||
libjpeg-turbo and libjpeg v6b. This also invokes the TurboJPEG unit tests,
|
||||
which ensure that the colorspace extensions, YUV encoding, decompression
|
||||
scaling, and other features of the TurboJPEG C and Java APIs are working
|
||||
properly (and, by extension, that the equivalent features of the underlying
|
||||
libjpeg API are also working.)
|
||||
|
||||
Invoking `make testclean` (Un*x) or `nmake testclean` (Windows command line) or
|
||||
building the "testclean" target (Visual Studio IDE) will clean up the output
|
||||
images generated by the tests.
|
||||
|
||||
On Un*x platforms, more extensive tests of the TurboJPEG C and Java wrappers
|
||||
can be run by invoking `make tjtest`. These extended TurboJPEG tests
|
||||
essentially iterate through all of the available features of the TurboJPEG APIs
|
||||
that are not covered by the TurboJPEG unit tests (including the lossless
|
||||
transform options) and compare the images generated by each feature to images
|
||||
generated using the equivalent feature in the libjpeg API. The extended
|
||||
TurboJPEG tests are meant to test for regressions in the TurboJPEG wrappers,
|
||||
not in the underlying libjpeg API library.
|
||||
807
BUILDING.txt
807
BUILDING.txt
@@ -1,807 +0,0 @@
|
||||
*******************************************************************************
|
||||
** Building on Un*x Platforms (including Cygwin and OS X)
|
||||
*******************************************************************************
|
||||
|
||||
|
||||
==================
|
||||
Build Requirements
|
||||
==================
|
||||
|
||||
-- autoconf 2.56 or later
|
||||
-- automake 1.7 or later
|
||||
-- libtool 1.4 or later
|
||||
* If using Xcode 4.3 or later on OS X, autoconf and automake are no longer
|
||||
provided. The easiest way to obtain them is from MacPorts
|
||||
(http://www.macports.org/).
|
||||
|
||||
-- NASM (if building x86 or x86-64 SIMD extensions)
|
||||
* 0.98, or 2.01 or later is required for a 32-bit build
|
||||
* NASM 2.00 or later is required for a 64-bit build
|
||||
* NASM 2.07 or later is required for a 64-bit build on OS X. This can be
|
||||
obtained from MacPorts (http://www.macports.org/).
|
||||
|
||||
The binary RPMs released by the NASM project do not work on older Linux
|
||||
systems, such as Red Hat Enterprise Linux 4. On such systems, you can
|
||||
easily build and install NASM from a source RPM by downloading one of the
|
||||
SRPMs from
|
||||
|
||||
http://www.nasm.us/pub/nasm/releasebuilds
|
||||
|
||||
and executing the following as root:
|
||||
|
||||
ARCH=`uname -m`
|
||||
rpmbuild --rebuild nasm-{version}.src.rpm
|
||||
rpm -Uvh /usr/src/redhat/RPMS/$ARCH/nasm-{version}.$ARCH.rpm
|
||||
|
||||
NOTE: the NASM build will fail if texinfo is not installed.
|
||||
|
||||
-- GCC v4.1 or later recommended for best performance
|
||||
* Beginning with Xcode 4, Apple stopped distributing GCC and switched to
|
||||
the LLVM compiler. Xcode v4.0 through v4.6 provides a GCC front end
|
||||
called LLVM-GCC. Unfortunately, as of this writing, neither LLVM-GCC nor
|
||||
the LLVM (clang) compiler produces optimal performance with libjpeg-turbo.
|
||||
Building libjpeg-turbo with LLVM-GCC v4.2 results in a 10% performance
|
||||
degradation when compressing using 64-bit code, relative to building
|
||||
libjpeg-turbo with GCC v4.2. Building libjpeg-turbo with LLVM (clang)
|
||||
results in a 20% performance degradation when compressing using 64-bit
|
||||
code, relative to building libjpeg-turbo with GCC v4.2. If you are
|
||||
running Snow Leopard or earlier, it is suggested that you continue to use
|
||||
Xcode v3.2.6, which provides GCC v4.2. If you are using Lion or later, it
|
||||
is suggested that you install Apple GCC v4.2 through MacPorts.
|
||||
|
||||
-- If building the TurboJPEG Java wrapper, JDK or OpenJDK 1.5 or later is
|
||||
required. Some systems, such as OS X 10.4, Solaris 10 and later, and Red
|
||||
Hat Enterprise Linux 5 and later, have this pre-installed. On OS X 10.5 and
|
||||
later, it will be necessary to install the Java Developer Package, which can
|
||||
be downloaded from http://developer.apple.com/downloads (Apple ID required.)
|
||||
For systems that do not have a JDK installed, you can obtain the Oracle Java
|
||||
Development Kit from http://www.java.com.
|
||||
|
||||
|
||||
==================
|
||||
Out-of-Tree Builds
|
||||
==================
|
||||
|
||||
Binary objects, libraries, and executables are generated in the same directory
|
||||
from which configure was executed (the "binary directory"), and this directory
|
||||
need not necessarily be the same as the libjpeg-turbo source directory. You
|
||||
can create multiple independent binary directories, in which different versions
|
||||
of libjpeg-turbo can be built from the same source tree using different
|
||||
compilers or settings. In the sections below, {build_directory} refers to the
|
||||
binary directory, whereas {source_directory} refers to the libjpeg-turbo source
|
||||
directory. For in-tree builds, these directories are the same.
|
||||
|
||||
|
||||
======================
|
||||
Building libjpeg-turbo
|
||||
======================
|
||||
|
||||
The following procedure will build libjpeg-turbo on Linux, FreeBSD, Cygwin, and
|
||||
Solaris/x86 systems (on Solaris, this generates a 32-bit library. See below
|
||||
for 64-bit build instructions.)
|
||||
|
||||
cd {source_directory}
|
||||
autoreconf -fiv
|
||||
cd {build_directory}
|
||||
sh {source_directory}/configure [additional configure flags]
|
||||
make
|
||||
|
||||
NOTE: Running autoreconf in the source directory is usually only necessary if
|
||||
building libjpeg-turbo from the SVN repository.
|
||||
|
||||
This will generate the following files under .libs/
|
||||
|
||||
libjpeg.a
|
||||
Static link library for the libjpeg API
|
||||
|
||||
libjpeg.so.{version} (Linux, Unix)
|
||||
libjpeg.{version}.dylib (OS X)
|
||||
cygjpeg-{version}.dll (Cygwin)
|
||||
Shared library for the libjpeg API
|
||||
|
||||
By default, {version} is 62.1.0, 7.1.0, or 8.0.2, depending on whether
|
||||
libjpeg v6b (default), v7, or v8 emulation is enabled. If using Cygwin,
|
||||
{version} is 62, 7, or 8.
|
||||
|
||||
libjpeg.so (Linux, Unix)
|
||||
libjpeg.dylib (OS X)
|
||||
Development symlink for the libjpeg API
|
||||
|
||||
libjpeg.dll.a (Cygwin)
|
||||
Import library for the libjpeg API
|
||||
|
||||
libturbojpeg.a
|
||||
Static link library for the TurboJPEG API
|
||||
|
||||
libturbojpeg.so.0.0.0 (Linux, Unix)
|
||||
libturbojpeg.0.0.0.dylib (OS X)
|
||||
cygturbojpeg-0.dll (Cygwin)
|
||||
Shared library for the TurboJPEG API
|
||||
|
||||
libturbojpeg.so (Linux, Unix)
|
||||
libturbojpeg.dylib (OS X)
|
||||
Development symlink for the TurboJPEG API
|
||||
|
||||
libturbojpeg.dll.a (Cygwin)
|
||||
Import library for the TurboJPEG API
|
||||
|
||||
|
||||
libjpeg v7 or v8 API/ABI Emulation
|
||||
----------------------------------
|
||||
|
||||
Add --with-jpeg7 to the configure command line to build a version of
|
||||
libjpeg-turbo that is API/ABI-compatible with libjpeg v7. Add --with-jpeg8 to
|
||||
the configure command to build a version of libjpeg-turbo that is
|
||||
API/ABI-compatible with libjpeg v8. See README-turbo.txt for more information
|
||||
on libjpeg v7 and v8 emulation.
|
||||
|
||||
|
||||
In-Memory Source/Destination Managers
|
||||
-------------------------------------
|
||||
|
||||
When using libjpeg v6b or v7 API/ABI emulation, add --without-mem-srcdst to the
|
||||
configure command line to build a version of libjpeg-turbo that lacks the
|
||||
jpeg_mem_src() and jpeg_mem_dest() functions. These functions were not part of
|
||||
the original libjpeg v6b and v7 APIs, so removing them ensures strict
|
||||
conformance with those APIs. See README-turbo.txt for more information.
|
||||
|
||||
|
||||
Arithmetic Coding Support
|
||||
-------------------------
|
||||
|
||||
Since the patent on arithmetic coding has expired, this functionality has been
|
||||
included in this release of libjpeg-turbo. libjpeg-turbo's implementation is
|
||||
based on the implementation in libjpeg v8, but it works when emulating libjpeg
|
||||
v7 or v6b as well. The default is to enable both arithmetic encoding and
|
||||
decoding, but those who have philosophical objections to arithmetic coding can
|
||||
add --without-arith-enc or --without-arith-dec to the configure command line to
|
||||
disable encoding or decoding (respectively.)
|
||||
|
||||
|
||||
TurboJPEG Java Wrapper
|
||||
----------------------
|
||||
Add --with-java to the configure command line to incorporate an optional Java
|
||||
Native Interface wrapper into the TurboJPEG shared library and build the Java
|
||||
front-end classes to support it. This allows the TurboJPEG shared library to
|
||||
be used directly from Java applications. See java/README for more details.
|
||||
|
||||
You can set the JAVAC, JAR, and JAVA configure variables to specify
|
||||
alternate commands for javac, jar, and java (respectively.) You can also
|
||||
set the JAVACFLAGS configure variable to specify arguments that should be
|
||||
passed to the Java compiler when building the front-end classes, and JNI_CFLAGS
|
||||
to specify arguments that should be passed to the C compiler when building the
|
||||
JNI wrapper. Run 'configure --help' for more details.
|
||||
|
||||
|
||||
========================
|
||||
Installing libjpeg-turbo
|
||||
========================
|
||||
|
||||
If you intend to install these libraries and the associated header files, then
|
||||
replace 'make' in the instructions above with
|
||||
|
||||
make install prefix={base dir} libdir={library directory}
|
||||
|
||||
For example,
|
||||
|
||||
make install prefix=/usr/local libdir=/usr/local/lib64
|
||||
|
||||
will install the header files in /usr/local/include and the library files in
|
||||
/usr/local/lib64. If 'prefix' and 'libdir' are not specified, then the default
|
||||
is to install the header files in /opt/libjpeg-turbo/include and the library
|
||||
files in /opt/libjpeg-turbo/lib32 (32-bit) or /opt/libjpeg-turbo/lib64
|
||||
(64-bit.)
|
||||
|
||||
NOTE: You can specify a prefix of /usr and a libdir of, for instance,
|
||||
/usr/lib64 to overwrite the system's version of libjpeg. If you do this,
|
||||
however, then be sure to BACK UP YOUR SYSTEM'S INSTALLATION OF LIBJPEG before
|
||||
overwriting it. It is recommended that you instead install libjpeg-turbo into
|
||||
a non-system directory and manipulate the LD_LIBRARY_PATH or create symlinks
|
||||
to force applications to use libjpeg-turbo instead of libjpeg. See
|
||||
README-turbo.txt for more information.
|
||||
|
||||
|
||||
=============
|
||||
Build Recipes
|
||||
=============
|
||||
|
||||
|
||||
32-bit Build on 64-bit Linux
|
||||
----------------------------
|
||||
|
||||
Add
|
||||
|
||||
--host i686-pc-linux-gnu CFLAGS='-O3 -m32' LDFLAGS=-m32
|
||||
|
||||
to the configure command line.
|
||||
|
||||
|
||||
64-bit Build on 64-bit OS X
|
||||
---------------------------
|
||||
|
||||
Add
|
||||
|
||||
--host x86_64-apple-darwin NASM=/opt/local/bin/nasm
|
||||
|
||||
to the configure command line. NASM 2.07 or later from MacPorts must be
|
||||
installed.
|
||||
|
||||
|
||||
32-bit Build on 64-bit OS X
|
||||
---------------------------
|
||||
|
||||
Add
|
||||
|
||||
--host i686-apple-darwin CFLAGS='-O3 -m32' LDFLAGS=-m32
|
||||
|
||||
to the configure command line.
|
||||
|
||||
|
||||
64-bit Backward-Compatible Build on 64-bit OS X
|
||||
-----------------------------------------------
|
||||
|
||||
Add
|
||||
|
||||
--host x86_64-apple-darwin NASM=/opt/local/bin/nasm \
|
||||
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-mmacosx-version-min=10.4 -O3' \
|
||||
LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-mmacosx-version-min=10.4'
|
||||
|
||||
to the configure command line. The OS X 10.4 SDK, and NASM 2.07 or later from
|
||||
MacPorts, must be installed.
|
||||
|
||||
|
||||
32-bit Backward-Compatible Build on OS X
|
||||
----------------------------------------
|
||||
|
||||
Add
|
||||
|
||||
--host i686-apple-darwin \
|
||||
CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-mmacosx-version-min=10.4 -O3 -m32' \
|
||||
LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-mmacosx-version-min=10.4 -m32'
|
||||
|
||||
to the configure command line. The OS X 10.4 SDK must be installed.
|
||||
|
||||
|
||||
64-bit Library Build on 64-bit Solaris
|
||||
--------------------------------------
|
||||
|
||||
Add
|
||||
|
||||
--host x86_64-pc-solaris CFLAGS='-O3 -m64' LDFLAGS=-m64
|
||||
|
||||
to the configure command line.
|
||||
|
||||
|
||||
32-bit Build on 64-bit FreeBSD
|
||||
------------------------------
|
||||
|
||||
Add
|
||||
|
||||
--host i386-unknown-freebsd CC='gcc -B /usr/lib32' CFLAGS='-O3 -m32' \
|
||||
LDFLAGS='-B/usr/lib32'
|
||||
|
||||
to the configure command line. NASM 2.07 or later from FreeBSD ports must be
|
||||
installed.
|
||||
|
||||
|
||||
Oracle Solaris Studio
|
||||
---------------------
|
||||
|
||||
Add
|
||||
|
||||
CC=cc
|
||||
|
||||
to the configure command line. libjpeg-turbo will automatically be built with
|
||||
the maximum optimization level (-xO5) unless you override CFLAGS.
|
||||
|
||||
To build a 64-bit version of libjpeg-turbo using Oracle Solaris Studio, add
|
||||
|
||||
--host x86_64-pc-solaris CC=cc CFLAGS='-xO5 -m64' LDFLAGS=-m64
|
||||
|
||||
to the configure command line.
|
||||
|
||||
|
||||
MinGW Build on Cygwin
|
||||
---------------------
|
||||
|
||||
Use CMake (see recipes below)
|
||||
|
||||
|
||||
===========
|
||||
ARM Support
|
||||
===========
|
||||
|
||||
This release of libjpeg-turbo can use ARM NEON SIMD instructions to accelerate
|
||||
JPEG compression/decompression by approximately 2-4x on ARMv7 and later
|
||||
platforms. If libjpeg-turbo is configured on an ARM Linux platform, then the
|
||||
build system will automatically include the NEON SIMD routines, if they are
|
||||
supported.
|
||||
|
||||
|
||||
Building libjpeg-turbo for iOS
|
||||
------------------------------
|
||||
|
||||
iOS platforms, such as the iPhone and iPad, also use ARM processors, some of
|
||||
which support NEON instructions. Additional steps are required to build
|
||||
libjpeg-turbo for these platforms. The steps below assume iOS SDK v4.3. If
|
||||
you are using a different SDK version, then you will need to modify the
|
||||
examples accordingly.
|
||||
|
||||
Additional build requirements:
|
||||
|
||||
gas-preprocessor.pl
|
||||
(https://sourceforge.net/p/libjpeg-turbo/code/HEAD/tree/gas-preprocessor)
|
||||
should be installed in your PATH.
|
||||
|
||||
Set the following shell variables for simplicity:
|
||||
|
||||
Xcode 3.2.x / iOS 4.3 SDK:
|
||||
IOS_PLATFORMDIR=/Developer/Platforms/iPhoneOS.platform
|
||||
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS4.3.sdk
|
||||
IOS_GCC=$IOS_PLATFORMDIR/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
|
||||
|
||||
Xcode 4.5.x / iOS 6.0 SDK:
|
||||
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS6.0.sdk
|
||||
IOS_GCC=$IOS_PLATFORMDIR/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
|
||||
|
||||
Xcode 4.6.x / iOS 6.1 SDK:
|
||||
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS6.1.sdk
|
||||
IOS_GCC=$IOS_PLATFORMDIR/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2
|
||||
|
||||
Xcode 5.0.x / iOS 7.0 SDK:
|
||||
IOS_PLATFORMDIR=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform
|
||||
IOS_SYSROOT=$IOS_PLATFORMDIR/Developer/SDKs/iPhoneOS7.0.sdk
|
||||
IOS_GCC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
|
||||
|
||||
ARM v6 only (up to and including iPhone 3G):
|
||||
[NOTE: Requires Xcode 4.4.x or earlier]
|
||||
IOS_CFLAGS="-march=armv6 -mcpu=arm1176jzf-s -mfpu=vfp"
|
||||
|
||||
ARM v7 only (iPhone 3GS-4S, iPad 1st-3rd Generation):
|
||||
GCC:
|
||||
IOS_CFLAGS="-march=armv7 -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon"
|
||||
Clang:
|
||||
IOS_CFLAGS="-arch armv7 -no-integrated-as"
|
||||
|
||||
ARM v7s only (iPhone 5, iPad 4th Generation):
|
||||
[NOTE: Requires Xcode 4.5 or later]
|
||||
GCC
|
||||
IOS_CFLAGS="-march=armv7s -mcpu=swift -mtune=swift -mfpu=neon"
|
||||
Clang:
|
||||
IOS_CFLAGS="-arch armv7s -no-integrated-as"
|
||||
|
||||
Follow the procedure under "Building libjpeg-turbo" above, adding
|
||||
|
||||
--host arm-apple-darwin10 --enable-static --disable-shared \
|
||||
CC="$IOS_GCC" LD="$IOS_GCC" \
|
||||
CFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT -O3 $IOS_CFLAGS" \
|
||||
LDFLAGS="-mfloat-abi=softfp -isysroot $IOS_SYSROOT $IOS_CFLAGS"
|
||||
|
||||
to the configure command line.
|
||||
|
||||
Once built, lipo can be used to combine the ARM v6, v7, and/or v7s variants
|
||||
into a universal library.
|
||||
|
||||
NOTE: If you are building libjpeg-turbo from the "official" project tarball,
|
||||
then it is highly likely that you will need to run 'autoreconf -fiv' in the
|
||||
source tree prior to building ARM v7 or v7s iOS binaries using the techniques
|
||||
described above. Otherwise, you may get a libtool error such as "unable to
|
||||
infer tagged configuration."
|
||||
|
||||
|
||||
*******************************************************************************
|
||||
** Building on Windows (Visual C++ or MinGW)
|
||||
*******************************************************************************
|
||||
|
||||
|
||||
==================
|
||||
Build Requirements
|
||||
==================
|
||||
|
||||
-- CMake (http://www.cmake.org) v2.6 or later
|
||||
|
||||
-- Microsoft Visual C++ 2005 or later
|
||||
|
||||
If you don't already have Visual C++, then the easiest way to get it is by
|
||||
installing the Windows SDK:
|
||||
|
||||
http://msdn.microsoft.com/en-us/windows/bb980924.aspx
|
||||
|
||||
The Windows SDK includes both 32-bit and 64-bit Visual C++ compilers and
|
||||
everything necessary to build libjpeg-turbo.
|
||||
|
||||
* For 32-bit builds, you can also use Microsoft Visual C++ Express
|
||||
Edition. Visual C++ Express Edition is a free download.
|
||||
* If you intend to build libjpeg-turbo from the command line, then add the
|
||||
appropriate compiler and SDK directories to the INCLUDE, LIB, and PATH
|
||||
environment variables. This is generally accomplished by executing
|
||||
vcvars32.bat or vcvars64.bat and SetEnv.cmd. vcvars32.bat and
|
||||
vcvars64.bat are part of Visual C++ and are located in the same directory
|
||||
as the compiler. SetEnv.cmd is part of the Windows SDK. You can pass
|
||||
optional arguments to SetEnv.cmd to specify a 32-bit or 64-bit build
|
||||
environment.
|
||||
|
||||
... OR ...
|
||||
|
||||
-- MinGW
|
||||
|
||||
GCC v4.1 or later recommended for best performance
|
||||
|
||||
-- NASM (http://www.nasm.us/) 0.98 or later (NASM 2.05 or later is required for
|
||||
a 64-bit build)
|
||||
|
||||
-- If building the TurboJPEG Java wrapper, JDK 1.5 or later is required. This
|
||||
can be downloaded from http://www.java.com.
|
||||
|
||||
|
||||
==================
|
||||
Out-of-Tree Builds
|
||||
==================
|
||||
|
||||
Binary objects, libraries, and executables are generated in the same directory
|
||||
from which cmake was executed (the "binary directory"), and this directory need
|
||||
not necessarily be the same as the libjpeg-turbo source directory. You can
|
||||
create multiple independent binary directories, in which different versions of
|
||||
libjpeg-turbo can be built from the same source tree using different compilers
|
||||
or settings. In the sections below, {build_directory} refers to the binary
|
||||
directory, whereas {source_directory} refers to the libjpeg-turbo source
|
||||
directory. For in-tree builds, these directories are the same.
|
||||
|
||||
|
||||
======================
|
||||
Building libjpeg-turbo
|
||||
======================
|
||||
|
||||
|
||||
Visual C++ (Command Line)
|
||||
-------------------------
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release {source_directory}
|
||||
nmake
|
||||
|
||||
This will build either a 32-bit or a 64-bit version of libjpeg-turbo, depending
|
||||
on which version of cl.exe is in the PATH.
|
||||
|
||||
The following files will be generated under {build_directory}:
|
||||
|
||||
jpeg-static.lib
|
||||
Static link library for the libjpeg API
|
||||
sharedlib/jpeg{version}.dll
|
||||
DLL for the libjpeg API
|
||||
sharedlib/jpeg.lib
|
||||
Import library for the libjpeg API
|
||||
turbojpeg-static.lib
|
||||
Static link library for the TurboJPEG API
|
||||
turbojpeg.dll
|
||||
DLL for the TurboJPEG API
|
||||
turbojpeg.lib
|
||||
Import library for the TurboJPEG API
|
||||
|
||||
{version} is 62, 7, or 8, depending on whether libjpeg v6b (default), v7, or
|
||||
v8 emulation is enabled.
|
||||
|
||||
|
||||
Visual C++ (IDE)
|
||||
----------------
|
||||
|
||||
Choose the appropriate CMake generator option for your version of Visual Studio
|
||||
(run "cmake" with no arguments for a list of available generators.) For
|
||||
instance:
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G "Visual Studio 9 2008" {source_directory}
|
||||
|
||||
You can then open ALL_BUILD.vcproj in Visual Studio and build one of the
|
||||
configurations in that project ("Debug", "Release", etc.) to generate a full
|
||||
build of libjpeg-turbo.
|
||||
|
||||
This will generate the following files under {build_directory}:
|
||||
|
||||
{configuration}/jpeg-static.lib
|
||||
Static link library for the libjpeg API
|
||||
sharedlib/{configuration}/jpeg{version}.dll
|
||||
DLL for the libjpeg API
|
||||
sharedlib/{configuration}/jpeg.lib
|
||||
Import library for the libjpeg API
|
||||
{configuration}/turbojpeg-static.lib
|
||||
Static link library for the TurboJPEG API
|
||||
{configuration}/turbojpeg.dll
|
||||
DLL for the TurboJPEG API
|
||||
{configuration}/turbojpeg.lib
|
||||
Import library for the TurboJPEG API
|
||||
|
||||
{configuration} is Debug, Release, RelWithDebInfo, or MinSizeRel, depending on
|
||||
the configuration you built in the IDE, and {version} is 62, 7, or 8,
|
||||
depending on whether libjpeg v6b (default), v7, or v8 emulation is enabled.
|
||||
|
||||
|
||||
MinGW
|
||||
-----
|
||||
|
||||
cd {build_directory}
|
||||
cmake -G "MSYS Makefiles" {source_directory}
|
||||
make
|
||||
|
||||
This will generate the following files under {build_directory}
|
||||
|
||||
libjpeg.a
|
||||
Static link library for the libjpeg API
|
||||
sharedlib/libjpeg-{version}.dll
|
||||
DLL for the libjpeg API
|
||||
sharedlib/libjpeg.dll.a
|
||||
Import library for the libjpeg API
|
||||
libturbojpeg.a
|
||||
Static link library for the TurboJPEG API
|
||||
libturbojpeg.dll
|
||||
DLL for the TurboJPEG API
|
||||
libturbojpeg.dll.a
|
||||
Import library for the TurboJPEG API
|
||||
|
||||
{version} is 62, 7, or 8, depending on whether libjpeg v6b (default), v7, or
|
||||
v8 emulation is enabled.
|
||||
|
||||
|
||||
Debug Build
|
||||
-----------
|
||||
|
||||
Add "-DCMAKE_BUILD_TYPE=Debug" to the cmake command line. Or, if building with
|
||||
NMake, remove "-DCMAKE_BUILD_TYPE=Release" (Debug builds are the default with
|
||||
NMake.)
|
||||
|
||||
|
||||
libjpeg v7 or v8 API/ABI Emulation
|
||||
-----------------------------------
|
||||
|
||||
Add "-DWITH_JPEG7=1" to the cmake command line to build a version of
|
||||
libjpeg-turbo that is API/ABI-compatible with libjpeg v7. Add "-DWITH_JPEG8=1"
|
||||
to the cmake command to build a version of libjpeg-turbo that is
|
||||
API/ABI-compatible with libjpeg v8. See README-turbo.txt for more information
|
||||
on libjpeg v7 and v8 emulation.
|
||||
|
||||
|
||||
In-Memory Source/Destination Managers
|
||||
-------------------------------------
|
||||
|
||||
When using libjpeg v6b or v7 API/ABI emulation, add -DWITH_MEM_SRCDST=0 to the
|
||||
CMake command line to build a version of libjpeg-turbo that lacks the
|
||||
jpeg_mem_src() and jpeg_mem_dest() functions. These functions were not part of
|
||||
the original libjpeg v6b and v7 APIs, so removing them ensures strict
|
||||
conformance with those APIs. See README-turbo.txt for more information.
|
||||
|
||||
|
||||
Arithmetic Coding Support
|
||||
-------------------------
|
||||
|
||||
Since the patent on arithmetic coding has expired, this functionality has been
|
||||
included in this release of libjpeg-turbo. libjpeg-turbo's implementation is
|
||||
based on the implementation in libjpeg v8, but it works when emulating libjpeg
|
||||
v7 or v6b as well. The default is to enable both arithmetic encoding and
|
||||
decoding, but those who have philosophical objections to arithmetic coding can
|
||||
add "-DWITH_ARITH_ENC=0" or "-DWITH_ARITH_DEC=0" to the cmake command line to
|
||||
disable encoding or decoding (respectively.)
|
||||
|
||||
|
||||
TurboJPEG Java Wrapper
|
||||
----------------------
|
||||
Add "-DWITH_JAVA=1" to the cmake command line to incorporate an optional Java
|
||||
Native Interface wrapper into the TurboJPEG shared library and build the Java
|
||||
front-end classes to support it. This allows the TurboJPEG shared library to
|
||||
be used directly from Java applications. See java/README for more details.
|
||||
|
||||
If you are using CMake 2.8, you can set the Java_JAVAC_EXECUTABLE,
|
||||
Java_JAVA_EXECUTABLE, and Java_JAR_EXECUTABLE CMake variables to specify
|
||||
alternate commands or locations for javac, jar, and java (respectively.) If
|
||||
you are using CMake 2.6, set JAVA_COMPILE, JAVA_RUNTIME, and JAVA_ARCHIVE
|
||||
instead. You can also set the JAVACFLAGS CMake variable to specify arguments
|
||||
that should be passed to the Java compiler when building the front-end classes.
|
||||
|
||||
|
||||
========================
|
||||
Installing libjpeg-turbo
|
||||
========================
|
||||
|
||||
You can use the build system to install libjpeg-turbo into a directory of your
|
||||
choosing (as opposed to creating an installer.) To do this, add:
|
||||
|
||||
-DCMAKE_INSTALL_PREFIX={install_directory}
|
||||
|
||||
to the cmake command line.
|
||||
|
||||
For example,
|
||||
|
||||
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=c:\libjpeg-turbo {source_directory}
|
||||
nmake install
|
||||
|
||||
will install the header files in c:\libjpeg-turbo\include, the library files
|
||||
in c:\libjpeg-turbo\lib, the DLL's in c:\libjpeg-turbo\bin, and the
|
||||
documentation in c:\libjpeg-turbo\doc.
|
||||
|
||||
|
||||
=============
|
||||
Build Recipes
|
||||
=============
|
||||
|
||||
|
||||
64-bit MinGW Build on Cygwin
|
||||
----------------------------
|
||||
|
||||
cd {build_directory}
|
||||
CC=/usr/bin/x86_64-w64-mingw32-gcc \
|
||||
cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
|
||||
-DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar \
|
||||
-DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib {source_directory}
|
||||
make
|
||||
|
||||
This produces a 64-bit build of libjpeg-turbo that does not depend on
|
||||
cygwin1.dll or other Cygwin DLL's. The mingw64-x86_64-gcc-core and
|
||||
mingw64-x86_64-gcc-g++ packages (and their dependencies) must be installed.
|
||||
|
||||
|
||||
32-bit MinGW Build on Cygwin
|
||||
----------------------------
|
||||
|
||||
cd {build_directory}
|
||||
CC=/usr/bin/i686-w64-mingw32-gcc \
|
||||
cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
|
||||
-DDCMAKE_AR=/usr/bin/i686-w64-mingw32-ar \
|
||||
-DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib {source_directory}
|
||||
make
|
||||
|
||||
This produces a 32-bit build of libjpeg-turbo that does not depend on
|
||||
cygwin1.dll or other Cygwin DLL's. The mingw64-i686-gcc-core and
|
||||
mingw64-i686-gcc-g++ packages (and their dependencies) must be installed.
|
||||
|
||||
|
||||
MinGW-w64 Build on Windows
|
||||
--------------------------
|
||||
|
||||
This produces a 64-bit build of libjpeg-turbo using the "native" MinGW-w64
|
||||
toolchain (which is faster than the Cygwin version):
|
||||
|
||||
cd {build_directory}
|
||||
CC={mingw-w64_binary_path}/x86_64-w64-mingw32-gcc \
|
||||
cmake -G "MSYS Makefiles" \
|
||||
-DCMAKE_AR={mingw-w64_binary_path}/x86_64-w64-mingw32-ar \
|
||||
-DCMAKE_RANLIB={mingw-w64_binary_path}/x86_64-w64-mingw32-ranlib \
|
||||
{source_directory}
|
||||
make
|
||||
|
||||
|
||||
MinGW Build on Linux
|
||||
--------------------
|
||||
|
||||
cd {build_directory}
|
||||
CC={mingw_binary_path}/i386-mingw32-gcc \
|
||||
cmake -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=Windows \
|
||||
-DCMAKE_AR={mingw_binary_path}/i386-mingw32-ar \
|
||||
-DCMAKE_RANLIB={mingw_binary_path}/i386-mingw32-ranlib \
|
||||
{source_directory}
|
||||
make
|
||||
|
||||
|
||||
*******************************************************************************
|
||||
** Creating Release Packages
|
||||
*******************************************************************************
|
||||
|
||||
The following commands can be used to create various types of release packages:
|
||||
|
||||
|
||||
Unix/Linux
|
||||
----------
|
||||
|
||||
make rpm
|
||||
|
||||
Create Red Hat-style binary RPM package. Requires RPM v4 or later.
|
||||
|
||||
make srpm
|
||||
|
||||
This runs 'make dist' to create a pristine source tarball, then creates a
|
||||
Red Hat-style source RPM package from the tarball. Requires RPM v4 or later.
|
||||
|
||||
make deb
|
||||
|
||||
Create Debian-style binary package. Requires dpkg.
|
||||
|
||||
make dmg
|
||||
|
||||
Create Macintosh package/disk image. This requires the PackageMaker
|
||||
application, which must be installed in /Developer/Applications/Utilities.
|
||||
Note that PackageMaker is not included in recent releases of Xcode, but it
|
||||
can be obtained by downloading the "Auxiliary Tools for Xcode" package from
|
||||
http://developer.apple.com/downloads.
|
||||
|
||||
make udmg [BUILDDIR32={32-bit build directory}]
|
||||
|
||||
On 64-bit OS X systems, this creates a Macintosh package and disk image that
|
||||
contains universal i386/x86-64 binaries. You should first configure a 32-bit
|
||||
out-of-tree build of libjpeg-turbo, then configure a 64-bit out-of-tree
|
||||
build, then run 'make udmg' from the 64-bit build directory. The build
|
||||
system will look for the 32-bit build under {source_directory}/osxx86 by
|
||||
default, but you can override this by setting the BUILDDIR32 variable on the
|
||||
make command line as shown above.
|
||||
|
||||
make iosdmg [BUILDDIR32={32-bit build directory}] \
|
||||
[BUILDDIRARMV6={ARM v6 build directory}] \
|
||||
[BUILDDIRARMV7={ARM v7 build directory}] \
|
||||
[BUILDDIRARMV7S={ARM v7s build directory}]
|
||||
|
||||
On OS X systems, this creates a Macintosh package and disk image in which the
|
||||
libjpeg-turbo static libraries contain ARM architectures necessary to build
|
||||
iOS applications. If building on an x86-64 system, the binaries will also
|
||||
contain the i386 architecture, as with 'make udmg' above. You should first
|
||||
configure ARM v6, ARM v7, and/or ARM v7s out-of-tree builds of libjpeg-turbo
|
||||
(see "Building libjpeg-turbo for iOS" above.) If you are building an x86-64
|
||||
version of libjpeg-turbo, you should configure a 32-bit out-of-tree build as
|
||||
well. Next, build libjpeg-turbo as you would normally, using an out-of-tree
|
||||
build. When it is built, run 'make iosdmg' from the build directory. The
|
||||
build system will look for the ARM v6 build under {source_directory}/iosarmv6
|
||||
by default, the ARM v7 build under {source_directory}/iosarmv7 by default,
|
||||
the ARM v7s build under {source_directory}/iosarmv7s by default, and (if
|
||||
applicable) the 32-bit build under {source_directory}/osxx86 by default, but
|
||||
you can override this by setting the BUILDDIR32, BUILDDIRARMV6,
|
||||
BUILDDIRARMV7, and/or BUILDDIRARMV7S variables on the make command line as
|
||||
shown above.
|
||||
|
||||
make cygwinpkg
|
||||
|
||||
Build a Cygwin binary package.
|
||||
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
If using NMake:
|
||||
|
||||
cd {build_directory}
|
||||
nmake installer
|
||||
|
||||
If using MinGW:
|
||||
|
||||
cd {build_directory}
|
||||
make installer
|
||||
|
||||
If using the Visual Studio IDE, build the "installer" project.
|
||||
|
||||
The installer package (libjpeg-turbo[-gcc][64].exe) will be located under
|
||||
{build_directory}. If building using the Visual Studio IDE, then the installer
|
||||
package will be located in a subdirectory with the same name as the
|
||||
configuration you built (such as {build_directory}\Debug\ or
|
||||
{build_directory}\Release\).
|
||||
|
||||
Building a Windows installer requires the Nullsoft Install System
|
||||
(http://nsis.sourceforge.net/.) makensis.exe should be in your PATH.
|
||||
|
||||
|
||||
*******************************************************************************
|
||||
** Regression testing
|
||||
*******************************************************************************
|
||||
|
||||
The most common way to test libjpeg-turbo is by invoking 'make test' on
|
||||
Unix/Linux platforms or 'ctest' on Windows platforms, once the build has
|
||||
completed. This runs a series of tests to ensure that mathematical
|
||||
compatibility has been maintained between libjpeg-turbo and libjpeg v6b. This
|
||||
also invokes the TurboJPEG unit tests, which ensure that the colorspace
|
||||
extensions, YUV encoding, decompression scaling, and other features of the
|
||||
TurboJPEG C and Java APIs are working properly (and, by extension, that the
|
||||
equivalent features of the underlying libjpeg API are also working.)
|
||||
|
||||
Invoking 'make testclean' or 'nmake testclean' (if using NMake) or building
|
||||
the 'testclean' target (if using the Visual Studio IDE) will clean up the
|
||||
output images generated by 'make test'.
|
||||
|
||||
On Unix/Linux platforms, more extensive tests of the TurboJPEG C and Java
|
||||
wrappers can be run by invoking 'make tjtest'. These extended TurboJPEG tests
|
||||
essentially iterate through all of the available features of the TurboJPEG APIs
|
||||
that are not covered by the TurboJPEG unit tests (this includes the lossless
|
||||
transform options) and compare the images generated by each feature to images
|
||||
generated using the equivalent feature in the libjpeg API. The extended
|
||||
TurboJPEG tests are meant to test for regressions in the TurboJPEG wrappers,
|
||||
not in the underlying libjpeg API library.
|
||||
4
Brewfile
Normal file
4
Brewfile
Normal file
@@ -0,0 +1,4 @@
|
||||
brew 'yasm'
|
||||
brew 'gcc@5'
|
||||
brew 'md5sha1sum'
|
||||
cask 'Caskroom/versions/java6'
|
||||
1676
CMakeLists.txt
1676
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
1451
ChangeLog.md
Normal file
1451
ChangeLog.md
Normal file
File diff suppressed because it is too large
Load Diff
457
ChangeLog.txt
457
ChangeLog.txt
@@ -1,457 +0,0 @@
|
||||
1.3.1
|
||||
=====
|
||||
|
||||
[1] On Un*x systems, 'make install' now installs the libjpeg-turbo libraries
|
||||
into /opt/libjpeg-turbo/lib32 by default on any 32-bit system, not just x86,
|
||||
and into /opt/libjpeg-turbo/lib64 by default on any 64-bit system, not just
|
||||
x86-64. You can override this by overriding either the 'prefix' or 'libdir'
|
||||
configure variables.
|
||||
|
||||
[2] The Windows installer now places a copy of the TurboJPEG DLLs in the same
|
||||
directory as the rest of the libjpeg-turbo binaries. This was mainly done
|
||||
to support TurboVNC 1.3, which bundles the DLLs in its Windows installation.
|
||||
When using a 32-bit version of CMake on 64-bit Windows, it is impossible to
|
||||
access the c:\WINDOWS\system32 directory, which made it impossible for the
|
||||
TurboVNC build scripts to bundle the 64-bit TurboJPEG DLL.
|
||||
|
||||
[3] Fixed a bug whereby attempting to encode a progressive JPEG with arithmetic
|
||||
entropy coding (by passing arguments of -progressive -arithmetic to cjpeg or
|
||||
jpegtran, for instance) would result in an error, "Requested feature was
|
||||
omitted at compile time".
|
||||
|
||||
[4] Fixed a couple of issues whereby malformed JPEG images would cause
|
||||
libjpeg-turbo to use uninitialized memory during decompression.
|
||||
|
||||
[5] Fixed an error ("Buffer passed to JPEG library is too small") that occurred
|
||||
when calling the TurboJPEG YUV encoding function with a very small (< 5x5)
|
||||
source image, and added a unit test to check for this error.
|
||||
|
||||
[6] The Java classes should now build properly under Visual Studio 2010 and
|
||||
later.
|
||||
|
||||
[7] Fixed an issue that prevented SRPMs generated using the in-tree packaging
|
||||
tools from being rebuilt on certain newer Linux distributions.
|
||||
|
||||
[8] Numerous minor fixes to eliminate compilation and build/packaging system
|
||||
warnings, fix cosmetic issues, improve documentation clarity, and other general
|
||||
source cleanup.
|
||||
|
||||
|
||||
1.3.0
|
||||
=====
|
||||
|
||||
[1] 'make test' now works properly on FreeBSD, and it no longer requires the
|
||||
md5sum executable to be present on other Un*x platforms.
|
||||
|
||||
[2] Overhauled the packaging system:
|
||||
-- To avoid conflict with vendor-supplied libjpeg-turbo packages, the
|
||||
official RPMs and DEBs for libjpeg-turbo have been renamed to
|
||||
"libjpeg-turbo-official".
|
||||
-- The TurboJPEG libraries are now located under /opt/libjpeg-turbo in the
|
||||
official Linux and Mac packages, to avoid conflict with vendor-supplied
|
||||
packages and also to streamline the packaging system.
|
||||
-- Release packages are now created with the directory structure defined
|
||||
by the configure variables "prefix", "bindir", "libdir", etc. (Un*x) or by the
|
||||
CMAKE_INSTALL_PREFIX variable (Windows.) The exception is that the docs are
|
||||
always located under the system default documentation directory on Un*x and Mac
|
||||
systems, and on Windows, the TurboJPEG DLL is always located in the Windows
|
||||
system directory.
|
||||
-- To avoid confusion, official libjpeg-turbo packages on Linux/Unix platforms
|
||||
(except for Mac) will always install the 32-bit libraries in
|
||||
/opt/libjpeg-turbo/lib32 and the 64-bit libraries in /opt/libjpeg-turbo/lib64.
|
||||
-- Fixed an issue whereby, in some cases, the libjpeg-turbo executables on Un*x
|
||||
systems were not properly linking with the shared libraries installed by the
|
||||
same package.
|
||||
-- Fixed an issue whereby building the "installer" target on Windows when
|
||||
WITH_JAVA=1 would fail if the TurboJPEG JAR had not been previously built.
|
||||
-- Building the "install" target on Windows now installs files into the same
|
||||
places that the installer does.
|
||||
|
||||
[3] Fixed a Huffman encoder bug that prevented I/O suspension from working
|
||||
properly.
|
||||
|
||||
|
||||
1.2.90 (1.3 beta1)
|
||||
==================
|
||||
|
||||
[1] Added support for additional scaling factors (3/8, 5/8, 3/4, 7/8, 9/8, 5/4,
|
||||
11/8, 3/2, 13/8, 7/4, 15/8, and 2) when decompressing. Note that the IDCT will
|
||||
not be SIMD-accelerated when using any of these new scaling factors.
|
||||
|
||||
[2] The TurboJPEG dynamic library is now versioned. It was not strictly
|
||||
necessary to do so, because TurboJPEG uses versioned symbols, and if a function
|
||||
changes in an ABI-incompatible way, that function is renamed and a legacy
|
||||
function is provided to maintain backward compatibility. However, certain
|
||||
Linux distro maintainers have a policy against accepting any library that isn't
|
||||
versioned.
|
||||
|
||||
[3] Extended the TurboJPEG Java API so that it can be used to compress a JPEG
|
||||
image from and decompress a JPEG image to an arbitrary position in a large
|
||||
image buffer.
|
||||
|
||||
[4] The tjDecompressToYUV() function now supports the TJFLAG_FASTDCT flag.
|
||||
|
||||
[5] The 32-bit supplementary package for amd64 Debian systems now provides
|
||||
symlinks in /usr/lib/i386-linux-gnu for the TurboJPEG libraries in /usr/lib32.
|
||||
This allows those libraries to be used on MultiArch-compatible systems (such as
|
||||
Ubuntu 11 and later) without setting the linker path.
|
||||
|
||||
[6] The TurboJPEG Java wrapper should now find the JNI library on Mac systems
|
||||
without having to pass -Djava.library.path=/usr/lib to java.
|
||||
|
||||
[7] TJBench has been ported to Java to provide a convenient way of validating
|
||||
the performance of the TurboJPEG Java API. It can be run with
|
||||
'java -cp turbojpeg.jar TJBench'.
|
||||
|
||||
[8] cjpeg can now be used to generate JPEG files with the RGB colorspace
|
||||
(feature ported from jpeg-8d.)
|
||||
|
||||
[9] The width and height in the -crop argument passed to jpegtran can now be
|
||||
suffixed with "f" to indicate that, when the upper left corner of the cropping
|
||||
region is automatically moved to the nearest iMCU boundary, the bottom right
|
||||
corner should be moved by the same amount. In other words, this feature causes
|
||||
jpegtran to strictly honor the specified width/height rather than the specified
|
||||
bottom right corner (feature ported from jpeg-8d.)
|
||||
|
||||
[10] JPEG files using the RGB colorspace can now be decompressed into grayscale
|
||||
images (feature ported from jpeg-8d.)
|
||||
|
||||
[11] Fixed a regression caused by 1.2.1[7] whereby the build would fail with
|
||||
multiple "Mismatch in operand sizes" errors when attempting to build the x86
|
||||
SIMD code with NASM 0.98.
|
||||
|
||||
[12] The in-memory source/destination managers (jpeg_mem_src() and
|
||||
jpeg_mem_dest()) are now included by default when building libjpeg-turbo with
|
||||
libjpeg v6b or v7 emulation, so that programs can take advantage of these
|
||||
functions without requiring the use of the backward-incompatible libjpeg v8
|
||||
ABI. The "age number" of the libjpeg-turbo library on Un*x systems has been
|
||||
incremented by 1 to reflect this. You can disable this feature with a
|
||||
configure/CMake switch in order to retain strict API/ABI compatibility with the
|
||||
libjpeg v6b or v7 API/ABI (or with previous versions of libjpeg-turbo.) See
|
||||
README-turbo.txt for more details.
|
||||
|
||||
[13] Added ARM v7s architecture to libjpeg.a and libturbojpeg.a in the official
|
||||
libjpeg-turbo binary package for OS X, so that those libraries can be used to
|
||||
build applications that leverage the faster CPUs in the iPhone 5 and iPad 4.
|
||||
|
||||
|
||||
1.2.1
|
||||
=====
|
||||
|
||||
[1] Creating or decoding a JPEG file that uses the RGB colorspace should now
|
||||
properly work when the input or output colorspace is one of the libjpeg-turbo
|
||||
colorspace extensions.
|
||||
|
||||
[2] When libjpeg-turbo was built without SIMD support and merged (non-fancy)
|
||||
upsampling was used along with an alpha-enabled colorspace during
|
||||
decompression, the unused byte of the decompressed pixels was not being set to
|
||||
0xFF. This has been fixed. TJUnitTest has also been extended to test for the
|
||||
correct behavior of the colorspace extensions when merged upsampling is used.
|
||||
|
||||
[3] Fixed a bug whereby the libjpeg-turbo SSE2 SIMD code would not preserve the
|
||||
upper 64 bits of xmm6 and xmm7 on Win64 platforms, which violated the Win64
|
||||
calling conventions.
|
||||
|
||||
[4] Fixed a regression caused by 1.2.0[6] whereby decompressing corrupt JPEG
|
||||
images (specifically, images in which the component count was erroneously set
|
||||
to a large value) would cause libjpeg-turbo to segfault.
|
||||
|
||||
[5] Worked around a severe performance issue with "Bobcat" (AMD Embedded APU)
|
||||
processors. The MASKMOVDQU instruction, which was used by the libjpeg-turbo
|
||||
SSE2 SIMD code, is apparently implemented in microcode on AMD processors, and
|
||||
it is painfully slow on Bobcat processors in particular. Eliminating the use
|
||||
of this instruction improved performance by an order of magnitude on Bobcat
|
||||
processors and by a small amount (typically 5%) on AMD desktop processors.
|
||||
|
||||
[6] Added SIMD acceleration for performing 4:2:2 upsampling on NEON-capable ARM
|
||||
platforms. This speeds up the decompression of 4:2:2 JPEGs by 20-25% on such
|
||||
platforms.
|
||||
|
||||
[7] Fixed a regression caused by 1.2.0[2] whereby, on Linux/x86 platforms
|
||||
running the 32-bit SSE2 SIMD code in libjpeg-turbo, decompressing a 4:2:0 or
|
||||
4:2:2 JPEG image into a 32-bit (RGBX, BGRX, etc.) buffer without using fancy
|
||||
upsampling would produce several incorrect columns of pixels at the right-hand
|
||||
side of the output image if each row in the output image was not evenly
|
||||
divisible by 16 bytes.
|
||||
|
||||
[8] Fixed an issue whereby attempting to build the SIMD extensions with Xcode
|
||||
4.3 on OS X platforms would cause NASM to return numerous errors of the form
|
||||
"'%define' expects a macro identifier".
|
||||
|
||||
[9] Added flags to the TurboJPEG API that allow the caller to force the use of
|
||||
either the fast or the accurate DCT/IDCT algorithms in the underlying codec.
|
||||
|
||||
|
||||
1.2.0
|
||||
=====
|
||||
|
||||
[1] Fixed build issue with YASM on Unix systems (the libjpeg-turbo build system
|
||||
was not adding the current directory to the assembler include path, so YASM
|
||||
was not able to find jsimdcfg.inc.)
|
||||
|
||||
[2] Fixed out-of-bounds read in SSE2 SIMD code that occurred when decompressing
|
||||
a JPEG image to a bitmap buffer whose size was not a multiple of 16 bytes.
|
||||
This was more of an annoyance than an actual bug, since it did not cause any
|
||||
actual run-time problems, but the issue showed up when running libjpeg-turbo in
|
||||
valgrind. See http://crbug.com/72399 for more information.
|
||||
|
||||
[3] Added a compile-time macro (LIBJPEG_TURBO_VERSION) that can be used to
|
||||
check the version of libjpeg-turbo against which an application was compiled.
|
||||
|
||||
[4] Added new RGBA/BGRA/ABGR/ARGB colorspace extension constants (libjpeg API)
|
||||
and pixel formats (TurboJPEG API), which allow applications to specify that,
|
||||
when decompressing to a 4-component RGB buffer, the unused byte should be set
|
||||
to 0xFF so that it can be interpreted as an opaque alpha channel.
|
||||
|
||||
[5] Fixed regression issue whereby DevIL failed to build against libjpeg-turbo
|
||||
because libjpeg-turbo's distributed version of jconfig.h contained an INLINE
|
||||
macro, which conflicted with a similar macro in DevIL. This macro is used only
|
||||
internally when building libjpeg-turbo, so it was moved into config.h.
|
||||
|
||||
[6] libjpeg-turbo will now correctly decompress erroneous CMYK/YCCK JPEGs whose
|
||||
K component is assigned a component ID of 1 instead of 4. Although these files
|
||||
are in violation of the spec, other JPEG implementations handle them
|
||||
correctly.
|
||||
|
||||
[7] Added ARM v6 and ARM v7 architectures to libjpeg.a and libturbojpeg.a in
|
||||
the official libjpeg-turbo binary package for OS X, so that those libraries can
|
||||
be used to build both OS X and iOS applications.
|
||||
|
||||
|
||||
1.1.90 (1.2 beta1)
|
||||
==================
|
||||
|
||||
[1] Added a Java wrapper for the TurboJPEG API. See java/README for more
|
||||
details.
|
||||
|
||||
[2] The TurboJPEG API can now be used to scale down images during
|
||||
decompression.
|
||||
|
||||
[3] Added SIMD routines for RGB-to-grayscale color conversion, which
|
||||
significantly improves the performance of grayscale JPEG compression from an
|
||||
RGB source image.
|
||||
|
||||
[4] Improved the performance of the C color conversion routines, which are used
|
||||
on platforms for which SIMD acceleration is not available.
|
||||
|
||||
[5] Added a function to the TurboJPEG API that performs lossless transforms.
|
||||
This function is implemented using the same back end as jpegtran, but it
|
||||
performs transcoding entirely in memory and allows multiple transforms and/or
|
||||
crop operations to be batched together, so the source coefficients only need to
|
||||
be read once. This is useful when generating image tiles from a single source
|
||||
JPEG.
|
||||
|
||||
[6] Added tests for the new TurboJPEG scaled decompression and lossless
|
||||
transform features to tjbench (the TurboJPEG benchmark, formerly called
|
||||
"jpgtest".)
|
||||
|
||||
[7] Added support for 4:4:0 (transposed 4:2:2) subsampling in TurboJPEG, which
|
||||
was necessary in order for it to read 4:2:2 JPEG files that had been losslessly
|
||||
transposed or rotated 90 degrees.
|
||||
|
||||
[8] All legacy VirtualGL code has been re-factored, and this has allowed
|
||||
libjpeg-turbo, in its entirety, to be re-licensed under a BSD-style license.
|
||||
|
||||
[9] libjpeg-turbo can now be built with YASM.
|
||||
|
||||
[10] Added SIMD acceleration for ARM Linux and iOS platforms that support
|
||||
NEON instructions.
|
||||
|
||||
[11] Refactored the TurboJPEG C API and documented it using Doxygen. The
|
||||
TurboJPEG 1.2 API uses pixel formats to define the size and component order of
|
||||
the uncompressed source/destination images, and it includes a more efficient
|
||||
version of TJBUFSIZE() that computes a worst-case JPEG size based on the level
|
||||
of chrominance subsampling. The refactored implementation of the TurboJPEG API
|
||||
now uses the libjpeg memory source and destination managers, which allows the
|
||||
TurboJPEG compressor to grow the JPEG buffer as necessary.
|
||||
|
||||
[12] Eliminated errors in the output of jpegtran on Windows that occurred when
|
||||
the application was invoked using I/O redirection
|
||||
(jpegtran <input.jpg >output.jpg).
|
||||
|
||||
[13] The inclusion of libjpeg v7 and v8 emulation as well as arithmetic coding
|
||||
support in libjpeg-turbo v1.1.0 introduced several new error constants in
|
||||
jerror.h, and these were mistakenly enabled for all emulation modes, causing
|
||||
the error enum in libjpeg-turbo to sometimes have different values than the
|
||||
same enum in libjpeg. This represents an ABI incompatibility, and it caused
|
||||
problems with rare applications that took specific action based on a particular
|
||||
error value. The fix was to include the new error constants conditionally
|
||||
based on whether libjpeg v7 or v8 emulation was enabled.
|
||||
|
||||
[14] Fixed an issue whereby Windows applications that used libjpeg-turbo would
|
||||
fail to compile if the Windows system headers were included before jpeglib.h.
|
||||
This issue was caused by a conflict in the definition of the INT32 type.
|
||||
|
||||
[15] Fixed 32-bit supplementary package for amd64 Debian systems, which was
|
||||
broken by enhancements to the packaging system in 1.1.
|
||||
|
||||
[16] When decompressing a JPEG image using an output colorspace of
|
||||
JCS_EXT_RGBX, JCS_EXT_BGRX, JCS_EXT_XBGR, or JCS_EXT_XRGB, libjpeg-turbo will
|
||||
now set the unused byte to 0xFF, which allows applications to interpret that
|
||||
byte as an alpha channel (0xFF = opaque).
|
||||
|
||||
|
||||
1.1.1
|
||||
=====
|
||||
|
||||
[1] Fixed a 1-pixel error in row 0, column 21 of the luminance plane generated
|
||||
by tjEncodeYUV().
|
||||
|
||||
[2] libjpeg-turbo's accelerated Huffman decoder previously ignored unexpected
|
||||
markers found in the middle of the JPEG data stream during decompression. It
|
||||
will now hand off decoding of a particular block to the unaccelerated Huffman
|
||||
decoder if an unexpected marker is found, so that the unaccelerated Huffman
|
||||
decoder can generate an appropriate warning.
|
||||
|
||||
[3] Older versions of MinGW64 prefixed symbol names with underscores by
|
||||
default, which differed from the behavior of 64-bit Visual C++. MinGW64 1.0
|
||||
has adopted the behavior of 64-bit Visual C++ as the default, so to accommodate
|
||||
this, the libjpeg-turbo SIMD function names are no longer prefixed with an
|
||||
underscore when building with MinGW64. This means that, when building
|
||||
libjpeg-turbo with older versions of MinGW64, you will now have to add
|
||||
-fno-leading-underscore to the CFLAGS.
|
||||
|
||||
[4] Fixed a regression bug in the NSIS script that caused the Windows installer
|
||||
build to fail when using the Visual Studio IDE.
|
||||
|
||||
[5] Fixed a bug in jpeg_read_coefficients() whereby it would not initialize
|
||||
cinfo->image_width and cinfo->image_height if libjpeg v7 or v8 emulation was
|
||||
enabled. This specifically caused the jpegoptim program to fail if it was
|
||||
linked against a version of libjpeg-turbo that was built with libjpeg v7 or v8
|
||||
emulation.
|
||||
|
||||
[6] Eliminated excessive I/O overhead that occurred when reading BMP files in
|
||||
cjpeg.
|
||||
|
||||
[7] Eliminated errors in the output of cjpeg on Windows that occurred when the
|
||||
application was invoked using I/O redirection (cjpeg <inputfile >output.jpg).
|
||||
|
||||
|
||||
1.1.0
|
||||
=====
|
||||
|
||||
[1] The algorithm used by the SIMD quantization function cannot produce correct
|
||||
results when the JPEG quality is >= 98 and the fast integer forward DCT is
|
||||
used. Thus, the non-SIMD quantization function is now used for those cases,
|
||||
and libjpeg-turbo should now produce identical output to libjpeg v6b in all
|
||||
cases.
|
||||
|
||||
[2] Despite the above, the fast integer forward DCT still degrades somewhat for
|
||||
JPEG qualities greater than 95, so the TurboJPEG wrapper will now automatically
|
||||
use the slow integer forward DCT when generating JPEG images of quality 96 or
|
||||
greater. This reduces compression performance by as much as 15% for these
|
||||
high-quality images but is necessary to ensure that the images are perceptually
|
||||
lossless. It also ensures that the library can avoid the performance pitfall
|
||||
created by [1].
|
||||
|
||||
[3] Ported jpgtest.cxx to pure C to avoid the need for a C++ compiler.
|
||||
|
||||
[4] Fixed visual artifacts in grayscale JPEG compression caused by a typo in
|
||||
the RGB-to-luminance lookup tables.
|
||||
|
||||
[5] The Windows distribution packages now include the libjpeg run-time programs
|
||||
(cjpeg, etc.)
|
||||
|
||||
[6] All packages now include jpgtest.
|
||||
|
||||
[7] The TurboJPEG dynamic library now uses versioned symbols.
|
||||
|
||||
[8] Added two new TurboJPEG API functions, tjEncodeYUV() and
|
||||
tjDecompressToYUV(), to replace the somewhat hackish TJ_YUV flag.
|
||||
|
||||
|
||||
1.0.90 (1.1 beta1)
|
||||
==================
|
||||
|
||||
[1] Added emulation of the libjpeg v7 and v8 APIs and ABIs. See
|
||||
README-turbo.txt for more details. This feature was sponsored by CamTrace SAS.
|
||||
|
||||
[2] Created a new CMake-based build system for the Visual C++ and MinGW builds.
|
||||
|
||||
[3] Grayscale bitmaps can now be compressed from/decompressed to using the
|
||||
TurboJPEG API.
|
||||
|
||||
[4] jpgtest can now be used to test decompression performance with existing
|
||||
JPEG images.
|
||||
|
||||
[5] If the default install prefix (/opt/libjpeg-turbo) is used, then
|
||||
'make install' now creates /opt/libjpeg-turbo/lib32 and
|
||||
/opt/libjpeg-turbo/lib64 sym links to duplicate the behavior of the binary
|
||||
packages.
|
||||
|
||||
[6] All symbols in the libjpeg-turbo dynamic library are now versioned, even
|
||||
when the library is built with libjpeg v6b emulation.
|
||||
|
||||
[7] Added arithmetic encoding and decoding support (can be disabled with
|
||||
configure or CMake options)
|
||||
|
||||
[8] Added a TJ_YUV flag to the TurboJPEG API, which causes both the compressor
|
||||
and decompressor to output planar YUV images.
|
||||
|
||||
[9] Added an extended version of tjDecompressHeader() to the TurboJPEG API,
|
||||
which allows the caller to determine the type of subsampling used in a JPEG
|
||||
image.
|
||||
|
||||
[10] Added further protections against invalid Huffman codes.
|
||||
|
||||
|
||||
1.0.1
|
||||
=====
|
||||
|
||||
[1] The Huffman decoder will now handle erroneous Huffman codes (for instance,
|
||||
from a corrupt JPEG image.) Previously, these would cause libjpeg-turbo to
|
||||
crash under certain circumstances.
|
||||
|
||||
[2] Fixed typo in SIMD dispatch routines that was causing 4:2:2 upsampling to
|
||||
be used instead of 4:2:0 when decompressing JPEG images using SSE2 code.
|
||||
|
||||
[3] configure script will now automatically determine whether the
|
||||
INCOMPLETE_TYPES_BROKEN macro should be defined.
|
||||
|
||||
|
||||
1.0.0
|
||||
=====
|
||||
|
||||
[1] 2983700: Further FreeBSD build tweaks (no longer necessary to specify
|
||||
--host when configuring on a 64-bit system)
|
||||
|
||||
[2] Created symlinks in the Unix/Linux packages so that the TurboJPEG
|
||||
include file can always be found in /opt/libjpeg-turbo/include, the 32-bit
|
||||
static libraries can always be found in /opt/libjpeg-turbo/lib32, and the
|
||||
64-bit static libraries can always be found in /opt/libjpeg-turbo/lib64.
|
||||
|
||||
[3] The Unix/Linux distribution packages now include the libjpeg run-time
|
||||
programs (cjpeg, etc.) and man pages.
|
||||
|
||||
[4] Created a 32-bit supplementary package for amd64 Debian systems, which
|
||||
contains just the 32-bit libjpeg-turbo libraries.
|
||||
|
||||
[5] Moved the libraries from */lib32 to */lib in the i386 Debian package.
|
||||
|
||||
[6] Include distribution package for Cygwin
|
||||
|
||||
[7] No longer necessary to specify --without-simd on non-x86 architectures, and
|
||||
unit tests now work on those architectures.
|
||||
|
||||
|
||||
0.0.93
|
||||
======
|
||||
|
||||
[1] 2982659, Fixed x86-64 build on FreeBSD systems
|
||||
|
||||
[2] 2988188: Added support for Windows 64-bit systems
|
||||
|
||||
|
||||
0.0.91
|
||||
======
|
||||
|
||||
[1] Added documentation to .deb packages
|
||||
|
||||
[2] 2968313: Fixed data corruption issues when decompressing large JPEG images
|
||||
and/or using buffered I/O with the libjpeg-turbo decompressor
|
||||
|
||||
|
||||
0.0.90
|
||||
======
|
||||
|
||||
Initial release
|
||||
132
LICENSE.md
Normal file
132
LICENSE.md
Normal file
@@ -0,0 +1,132 @@
|
||||
libjpeg-turbo Licenses
|
||||
======================
|
||||
|
||||
libjpeg-turbo is covered by three compatible BSD-style open source licenses:
|
||||
|
||||
- The IJG (Independent JPEG Group) License, which is listed in
|
||||
[README.ijg](README.ijg)
|
||||
|
||||
This license applies to the libjpeg API library and associated programs
|
||||
(any code inherited from libjpeg, and any modifications to that code.)
|
||||
|
||||
- The Modified (3-clause) BSD License, which is listed below
|
||||
|
||||
This license covers the TurboJPEG API library and associated programs, as
|
||||
well as the build system.
|
||||
|
||||
- The [zlib License](https://opensource.org/licenses/Zlib)
|
||||
|
||||
This license is a subset of the other two, and it covers the libjpeg-turbo
|
||||
SIMD extensions.
|
||||
|
||||
|
||||
Complying with the libjpeg-turbo Licenses
|
||||
=========================================
|
||||
|
||||
This section provides a roll-up of the libjpeg-turbo licensing terms, to the
|
||||
best of our understanding.
|
||||
|
||||
1. If you are distributing a modified version of the libjpeg-turbo source,
|
||||
then:
|
||||
|
||||
1. You cannot alter or remove any existing copyright or license notices
|
||||
from the source.
|
||||
|
||||
**Origin**
|
||||
- Clause 1 of the IJG License
|
||||
- Clause 1 of the Modified BSD License
|
||||
- Clauses 1 and 3 of the zlib License
|
||||
|
||||
2. You must add your own copyright notice to the header of each source
|
||||
file you modified, so others can tell that you modified that file (if
|
||||
there is not an existing copyright header in that file, then you can
|
||||
simply add a notice stating that you modified the file.)
|
||||
|
||||
**Origin**
|
||||
- Clause 1 of the IJG License
|
||||
- Clause 2 of the zlib License
|
||||
|
||||
3. You must include the IJG README file, and you must not alter any of the
|
||||
copyright or license text in that file.
|
||||
|
||||
**Origin**
|
||||
- Clause 1 of the IJG License
|
||||
|
||||
2. If you are distributing only libjpeg-turbo binaries without the source, or
|
||||
if you are distributing an application that statically links with
|
||||
libjpeg-turbo, then:
|
||||
|
||||
1. Your product documentation must include a message stating:
|
||||
|
||||
This software is based in part on the work of the Independent JPEG
|
||||
Group.
|
||||
|
||||
**Origin**
|
||||
- Clause 2 of the IJG license
|
||||
|
||||
2. If your binary distribution includes or uses the TurboJPEG API, then
|
||||
your product documentation must include the text of the Modified BSD
|
||||
License (see below.)
|
||||
|
||||
**Origin**
|
||||
- Clause 2 of the Modified BSD License
|
||||
|
||||
3. You cannot use the name of the IJG or The libjpeg-turbo Project or the
|
||||
contributors thereof in advertising, publicity, etc.
|
||||
|
||||
**Origin**
|
||||
- IJG License
|
||||
- Clause 3 of the Modified BSD License
|
||||
|
||||
4. The IJG and The libjpeg-turbo Project do not warrant libjpeg-turbo to be
|
||||
free of defects, nor do we accept any liability for undesirable
|
||||
consequences resulting from your use of the software.
|
||||
|
||||
**Origin**
|
||||
- IJG License
|
||||
- Modified BSD License
|
||||
- zlib License
|
||||
|
||||
|
||||
The Modified (3-clause) BSD License
|
||||
===================================
|
||||
|
||||
Copyright (C)2009-2019 D. R. Commander. All Rights Reserved.
|
||||
Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
- Neither the name of the libjpeg-turbo Project nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
Why Three Licenses?
|
||||
===================
|
||||
|
||||
The zlib License could have been used instead of the Modified (3-clause) BSD
|
||||
License, and since the IJG License effectively subsumes the distribution
|
||||
conditions of the zlib License, this would have effectively placed
|
||||
libjpeg-turbo binary distributions under the IJG License. However, the IJG
|
||||
License specifically refers to the Independent JPEG Group and does not extend
|
||||
attribution and endorsement protections to other entities. Thus, it was
|
||||
desirable to choose a license that granted us the same protections for new code
|
||||
that were granted to the IJG for code derived from their software.
|
||||
405
Makefile.am
405
Makefile.am
@@ -1,405 +0,0 @@
|
||||
lib_LTLIBRARIES = libjpeg.la
|
||||
libjpeg_la_LDFLAGS = -version-info ${LIBTOOL_CURRENT}:${SO_MINOR_VERSION}:${SO_AGE} -no-undefined
|
||||
include_HEADERS = jerror.h jmorecfg.h jpeglib.h
|
||||
|
||||
if WITH_TURBOJPEG
|
||||
lib_LTLIBRARIES += libturbojpeg.la
|
||||
libturbojpeg_la_LDFLAGS = -version-info 0:0 -no-undefined
|
||||
include_HEADERS += turbojpeg.h
|
||||
endif
|
||||
|
||||
nodist_include_HEADERS = jconfig.h
|
||||
|
||||
|
||||
HDRS = jchuff.h jdct.h jdhuff.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
|
||||
jpegint.h jpeglib.h jversion.h jsimd.h jsimddct.h jpegcomp.h
|
||||
|
||||
libjpeg_la_SOURCES = $(HDRS) jcapimin.c jcapistd.c jccoefct.c jccolor.c \
|
||||
jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
|
||||
jcomapi.c jcparam.c jcphuff.c jcprepct.c jcsample.c jctrans.c \
|
||||
jdapimin.c jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
|
||||
jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
|
||||
jdmerge.c jdphuff.c jdpostct.c jdsample.c jdtrans.c jerror.c \
|
||||
jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c \
|
||||
jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c
|
||||
|
||||
if WITH_ARITH
|
||||
libjpeg_la_SOURCES += jaricom.c
|
||||
endif
|
||||
|
||||
if WITH_ARITH_ENC
|
||||
libjpeg_la_SOURCES += jcarith.c
|
||||
endif
|
||||
|
||||
if WITH_ARITH_DEC
|
||||
libjpeg_la_SOURCES += jdarith.c
|
||||
endif
|
||||
|
||||
|
||||
SUBDIRS = java
|
||||
|
||||
|
||||
if WITH_TURBOJPEG
|
||||
|
||||
libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) turbojpeg.c turbojpeg.h \
|
||||
transupp.c transupp.h jdatadst-tj.c jdatasrc-tj.c
|
||||
|
||||
if WITH_JAVA
|
||||
|
||||
libturbojpeg_la_SOURCES += turbojpeg-jni.c
|
||||
libturbojpeg_la_CFLAGS = ${JNI_CFLAGS}
|
||||
TJMAPFILE = turbojpeg-mapfile.jni
|
||||
|
||||
else
|
||||
|
||||
TJMAPFILE = turbojpeg-mapfile
|
||||
|
||||
endif
|
||||
|
||||
libturbojpeg_la_SOURCES += $(TJMAPFILE)
|
||||
|
||||
if VERSION_SCRIPT
|
||||
libturbojpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)$(srcdir)/$(TJMAPFILE)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
|
||||
if VERSION_SCRIPT
|
||||
libjpeg_la_LDFLAGS += $(VERSION_SCRIPT_FLAG)libjpeg.map
|
||||
endif
|
||||
|
||||
|
||||
if WITH_SIMD
|
||||
|
||||
SUBDIRS += simd
|
||||
libjpeg_la_LIBADD = simd/libsimd.la
|
||||
libturbojpeg_la_LIBADD = simd/libsimd.la
|
||||
|
||||
else
|
||||
|
||||
libjpeg_la_SOURCES += jsimd_none.c
|
||||
|
||||
endif
|
||||
|
||||
|
||||
bin_PROGRAMS = cjpeg djpeg jpegtran rdjpgcom wrjpgcom
|
||||
noinst_PROGRAMS = jcstest
|
||||
|
||||
|
||||
if WITH_TURBOJPEG
|
||||
|
||||
bin_PROGRAMS += tjbench
|
||||
|
||||
noinst_PROGRAMS += tjunittest
|
||||
|
||||
tjbench_SOURCES = tjbench.c bmp.h bmp.c tjutil.h tjutil.c rdbmp.c rdppm.c \
|
||||
wrbmp.c wrppm.c
|
||||
|
||||
tjbench_LDADD = libturbojpeg.la libjpeg.la -lm
|
||||
|
||||
tjbench_CFLAGS = -DBMP_SUPPORTED -DPPM_SUPPORTED
|
||||
|
||||
tjunittest_SOURCES = tjunittest.c tjutil.h tjutil.c
|
||||
|
||||
tjunittest_LDADD = libturbojpeg.la
|
||||
|
||||
endif
|
||||
|
||||
|
||||
cjpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c cjpeg.c rdbmp.c rdgif.c \
|
||||
rdppm.c rdswitch.c rdtarga.c
|
||||
|
||||
cjpeg_LDADD = libjpeg.la
|
||||
|
||||
cjpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \
|
||||
-DTARGA_SUPPORTED
|
||||
|
||||
djpeg_SOURCES = cdjpeg.h cderror.h cdjpeg.c djpeg.c rdcolmap.c rdswitch.c \
|
||||
wrbmp.c wrgif.c wrppm.c wrtarga.c
|
||||
|
||||
djpeg_LDADD = libjpeg.la
|
||||
|
||||
djpeg_CFLAGS = -DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED \
|
||||
-DTARGA_SUPPORTED
|
||||
|
||||
jpegtran_SOURCES = jpegtran.c rdswitch.c cdjpeg.c transupp.c transupp.h
|
||||
|
||||
jpegtran_LDADD = libjpeg.la
|
||||
|
||||
rdjpgcom_SOURCES = rdjpgcom.c
|
||||
|
||||
rdjpgcom_LDADD = libjpeg.la
|
||||
|
||||
wrjpgcom_SOURCES = wrjpgcom.c
|
||||
|
||||
wrjpgcom_LDADD = libjpeg.la
|
||||
|
||||
jcstest_SOURCES = jcstest.c
|
||||
|
||||
jcstest_LDADD = libjpeg.la
|
||||
|
||||
dist_man1_MANS = cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 wrjpgcom.1
|
||||
|
||||
DOCS= coderules.txt jconfig.txt change.log rdrle.c wrrle.c BUILDING.txt \
|
||||
ChangeLog.txt
|
||||
|
||||
docdir = $(datadir)/doc
|
||||
dist_doc_DATA = README README-turbo.txt libjpeg.txt structure.txt usage.txt \
|
||||
wizard.txt
|
||||
|
||||
exampledir = $(datadir)/doc
|
||||
dist_example_DATA = example.c
|
||||
|
||||
|
||||
EXTRA_DIST = win release $(DOCS) testimages CMakeLists.txt \
|
||||
sharedlib/CMakeLists.txt cmakescripts libjpeg.map.in doc doxygen.config \
|
||||
jccolext.c jdcolext.c jdmrgext.c
|
||||
|
||||
dist-hook:
|
||||
rm -rf `find $(distdir) -name .svn`
|
||||
|
||||
|
||||
SUBDIRS += md5
|
||||
|
||||
MD5_JPEG_INT = 9a68f56bc76e466aa7e52f415d0f4a5f
|
||||
MD5_JPEG_FAST = 0e1502e7fa421835e376a314fac2a39f
|
||||
MD5_JPEG_FAST_100 = 7bf72a8e741d64eecb960c97323af77c
|
||||
MD5_JPEG_FLOAT = d1623885ffafcd40c684af09e3d65cd5
|
||||
MD5_JPEG_FLOAT_NOSIMD = fb4884c35f8273f498cb32879de5c455
|
||||
MD5_JPEG_INT_GRAY = 72b51f894b8f4a10b3ee3066770aa38d
|
||||
MD5_PPM_INT = d1ed0d11f076b842525271647716aeb8
|
||||
MD5_PPM_FAST = 048298a2d2410261c0533cb97bcfef23
|
||||
MD5_PPM_FLOAT = 7f5b446ee36b2630e06785b8d42af15f
|
||||
MD5_PPM_FLOAT_NOSIMD = 64072f1dbdc5b3a187777788604971a5
|
||||
MD5_PPM_INT_2_1 = 9f9de8c0612f8d06869b960b05abf9c9
|
||||
MD5_PPM_INT_15_8 = b6875bc070720b899566cc06459b63b7
|
||||
MD5_PPM_INT_7_4 = 06a177eae05f164fac57f7a2c346ee87
|
||||
MD5_PPM_INT_13_8 = bc3452573c8152f6ae552939ee19f82f
|
||||
MD5_PPM_INT_3_2 = f5a8b88a8a7f96016f04d259cf82ed67
|
||||
MD5_PPM_INT_11_8 = d8cc73c0aaacd4556569b59437ba00a5
|
||||
MD5_PPM_INT_5_4 = 32775dd9ad2ab90f4c5b219b53e0c86c
|
||||
MD5_PPM_INT_9_8 = d25e61bc7eac0002f5b393aa223747b6
|
||||
MD5_PPM_INT_7_8 = ddb564b7c74a09494016d6cd7502a946
|
||||
MD5_PPM_INT_3_4 = 8ed8e68808c3fbc4ea764fc9d2968646
|
||||
MD5_PPM_INT_5_8 = a3363274999da2366a024efae6d16c9b
|
||||
MD5_PPM_INT_1_2 = e692a315cea26b988c8e8b29a5dbcd81
|
||||
MD5_PPM_INT_3_8 = 79eca9175652ced755155c90e785a996
|
||||
MD5_PPM_INT_1_4 = 79cd778f8bf1a117690052cacdd54eca
|
||||
MD5_PPM_INT_1_8 = 391b3d4aca640c8567d6f8745eb2142f
|
||||
MD5_PPM_FAST_1_2 = f30bcf6d32ccd44cbdd9aeaacbd9454f
|
||||
MD5_BMP_256 = 4980185e3776e89bd931736e1cddeee6
|
||||
MD5_JPEG_ARI = e986fb0a637a8d833d96e8a6d6d84ea1
|
||||
MD5_PPM_ARI = 72b59a99bcf1de24c5b27d151bde2437
|
||||
MD5_JPEG_PROG = 1c4afddc05c0a43489ee54438a482d92
|
||||
MD5_JPEG_PROG_ARI = 0a8f1c8f66e113c3cf635df0a475a617
|
||||
MD5_JPEG_CROP = b4197f377e621c4e9b1d20471432610d
|
||||
|
||||
test: testclean all
|
||||
if WITH_TURBOJPEG
|
||||
if WITH_JAVA
|
||||
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest
|
||||
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -bi
|
||||
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv
|
||||
$(JAVA) -cp java/turbojpeg.jar -Djava.library.path=.libs TJUnitTest -yuv -bi
|
||||
endif
|
||||
./tjunittest
|
||||
./tjunittest -alloc
|
||||
./tjunittest -yuv
|
||||
endif
|
||||
./cjpeg -dct int -outfile testoutint.jpg $(srcdir)/testimages/testorig.ppm
|
||||
md5/md5cmp $(MD5_JPEG_INT) testoutint.jpg
|
||||
./cjpeg -dct fast -opt -outfile testoutfst.jpg $(srcdir)/testimages/testorig.ppm
|
||||
md5/md5cmp $(MD5_JPEG_FAST) testoutfst.jpg
|
||||
./cjpeg -dct fast -quality 100 -opt -outfile testoutfst100.jpg $(srcdir)/testimages/testorig.ppm
|
||||
md5/md5cmp $(MD5_JPEG_FAST_100) testoutfst100.jpg
|
||||
./cjpeg -dct float -outfile testoutflt.jpg $(srcdir)/testimages/testorig.ppm
|
||||
if WITH_SSE_FLOAT_DCT
|
||||
md5/md5cmp $(MD5_JPEG_FLOAT) testoutflt.jpg
|
||||
else
|
||||
md5/md5cmp $(MD5_JPEG_FLOAT_NOSIMD) testoutflt.jpg
|
||||
endif
|
||||
./cjpeg -dct int -grayscale -outfile testoutgray.jpg $(srcdir)/testimages/testorig.ppm
|
||||
md5/md5cmp $(MD5_JPEG_INT_GRAY) testoutgray.jpg
|
||||
./djpeg -dct int -fast -ppm -outfile testoutint.ppm $(srcdir)/testimages/testorig.jpg
|
||||
md5/md5cmp $(MD5_PPM_INT) testoutint.ppm
|
||||
./djpeg -dct fast -ppm -outfile testoutfst.ppm $(srcdir)/testimages/testorig.jpg
|
||||
md5/md5cmp $(MD5_PPM_FAST) testoutfst.ppm
|
||||
./djpeg -dct float -ppm -outfile testoutflt.ppm $(srcdir)/testimages/testorig.jpg
|
||||
if WITH_SSE_FLOAT_DCT
|
||||
md5/md5cmp $(MD5_PPM_FLOAT) testoutflt.ppm
|
||||
else
|
||||
md5/md5cmp $(MD5_PPM_FLOAT_NOSIMD) testoutflt.ppm
|
||||
endif
|
||||
./djpeg -dct int -nosmooth -scale 2/1 -ppm -outfile testoutint2_1.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_2_1) testoutint2_1.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 15/8 -ppm -outfile testoutint15_8.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_15_8) testoutint15_8.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 7/4 -ppm -outfile testoutint7_4.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_7_4) testoutint7_4.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 13/8 -ppm -outfile testoutint13_8.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_13_8) testoutint13_8.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 3/2 -ppm -outfile testoutint3_2.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_3_2) testoutint3_2.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 11/8 -ppm -outfile testoutint11_8.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_11_8) testoutint11_8.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 5/4 -ppm -outfile testoutint5_4.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_5_4) testoutint5_4.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 9/8 -ppm -outfile testoutint9_8.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_9_8) testoutint9_8.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 7/8 -ppm -outfile testoutint7_8.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_7_8) testoutint7_8.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 3/4 -ppm -outfile testoutint3_4.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_3_4) testoutint3_4.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 5/8 -ppm -outfile testoutint5_8.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_5_8) testoutint5_8.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 1/2 -ppm -outfile testoutint1_2.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_1_2) testoutint1_2.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 3/8 -ppm -outfile testoutint3_8.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_3_8) testoutint3_8.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 1/4 -ppm -outfile testoutint1_4.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_1_4) testoutint1_4.ppm;
|
||||
./djpeg -dct int -nosmooth -scale 1/8 -ppm -outfile testoutint1_8.ppm $(srcdir)/testimages/testorig.jpg;
|
||||
md5/md5cmp $(MD5_PPM_INT_1_8) testoutint1_8.ppm;
|
||||
./djpeg -dct fast -scale 1/2 -ppm -outfile testoutfst1_2.ppm $(srcdir)/testimages/testorig.jpg
|
||||
md5/md5cmp $(MD5_PPM_FAST_1_2) testoutfst1_2.ppm
|
||||
./djpeg -dct int -bmp -colors 256 -outfile testout.bmp $(srcdir)/testimages/testorig.jpg
|
||||
md5/md5cmp $(MD5_BMP_256) testout.bmp
|
||||
if WITH_ARITH_ENC
|
||||
./cjpeg -dct int -arithmetic -outfile testoutari.jpg $(srcdir)/testimages/testorig.ppm
|
||||
md5/md5cmp $(MD5_JPEG_ARI) testoutari.jpg
|
||||
./jpegtran -arithmetic -outfile testouta.jpg $(srcdir)/testimages/testimgint.jpg
|
||||
md5/md5cmp $(MD5_JPEG_ARI) testouta.jpg
|
||||
./cjpeg -dct int -progressive -arithmetic -sample 1x1 -outfile testoutpa.jpg $(srcdir)/testimages/testorig.ppm
|
||||
md5/md5cmp $(MD5_JPEG_PROG_ARI) testoutpa.jpg
|
||||
endif
|
||||
if WITH_ARITH_DEC
|
||||
./djpeg -dct int -fast -ppm -outfile testoutari.ppm $(srcdir)/testimages/testimgari.jpg
|
||||
md5/md5cmp $(MD5_PPM_ARI) testoutari.ppm
|
||||
./jpegtran -outfile testouta.jpg $(srcdir)/testimages/testimgari.jpg
|
||||
md5/md5cmp $(MD5_JPEG_INT) testouta.jpg
|
||||
endif
|
||||
./cjpeg -dct int -progressive -outfile testoutp.jpg $(srcdir)/testimages/testorig.ppm
|
||||
md5/md5cmp $(MD5_JPEG_PROG) testoutp.jpg
|
||||
./jpegtran -outfile testoutt.jpg testoutp.jpg
|
||||
md5/md5cmp $(MD5_JPEG_INT) testoutt.jpg
|
||||
./jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg $(srcdir)/testimages/testorig.jpg
|
||||
md5/md5cmp $(MD5_JPEG_CROP) testoutcrop.jpg
|
||||
|
||||
|
||||
testclean:
|
||||
rm -f testout*
|
||||
rm -f *_GRAY_*.bmp
|
||||
rm -f *_GRAY_*.png
|
||||
rm -f *_GRAY_*.ppm
|
||||
rm -f *_GRAY_*.jpg
|
||||
rm -f *_GRAY.yuv
|
||||
rm -f *_420_*.bmp
|
||||
rm -f *_420_*.png
|
||||
rm -f *_420_*.ppm
|
||||
rm -f *_420_*.jpg
|
||||
rm -f *_420.yuv
|
||||
rm -f *_422_*.bmp
|
||||
rm -f *_422_*.png
|
||||
rm -f *_422_*.ppm
|
||||
rm -f *_422_*.jpg
|
||||
rm -f *_422.yuv
|
||||
rm -f *_444_*.bmp
|
||||
rm -f *_444_*.png
|
||||
rm -f *_444_*.ppm
|
||||
rm -f *_444_*.jpg
|
||||
rm -f *_444.yuv
|
||||
rm -f *_440_*.bmp
|
||||
rm -f *_440_*.png
|
||||
rm -f *_440_*.ppm
|
||||
rm -f *_440_*.jpg
|
||||
rm -f *_440.yuv
|
||||
|
||||
|
||||
tjtest:
|
||||
sh ./tjbenchtest
|
||||
if WITH_JAVA
|
||||
sh ./tjbenchtest.java
|
||||
endif
|
||||
|
||||
|
||||
pkgscripts/libjpeg-turbo.spec: pkgscripts/libjpeg-turbo.spec.tmpl
|
||||
cat pkgscripts/libjpeg-turbo.spec.tmpl | sed s@%{__prefix}@$(prefix)@g | \
|
||||
sed s@%{__bindir}@$(bindir)@g | sed s@%{__datadir}@$(datadir)@g | \
|
||||
sed s@%{__docdir}@$(docdir)@g | sed s@%{__includedir}@$(includedir)@g | \
|
||||
sed s@%{__libdir}@$(libdir)@g | sed s@%{__mandir}@$(mandir)@g \
|
||||
> pkgscripts/libjpeg-turbo.spec
|
||||
|
||||
rpm: all pkgscripts/libjpeg-turbo.spec
|
||||
TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
|
||||
mkdir -p $$TMPDIR/RPMS; \
|
||||
ln -fs `pwd` $$TMPDIR/BUILD; \
|
||||
rm -f ${PKGNAME}-${VERSION}.${RPMARCH}.rpm; \
|
||||
rpmbuild -bb --define "_blddir $$TMPDIR/buildroot" \
|
||||
--define "_topdir $$TMPDIR" \
|
||||
--target ${RPMARCH} pkgscripts/libjpeg-turbo.spec; \
|
||||
cp $$TMPDIR/RPMS/${RPMARCH}/${PKGNAME}-${VERSION}-${BUILD}.${RPMARCH}.rpm \
|
||||
${PKGNAME}-${VERSION}.${RPMARCH}.rpm; \
|
||||
rm -rf $$TMPDIR
|
||||
|
||||
srpm: dist-gzip pkgscripts/libjpeg-turbo.spec
|
||||
TMPDIR=`mktemp -d /tmp/${PACKAGE_NAME}-build.XXXXXX`; \
|
||||
mkdir -p $$TMPDIR/RPMS; \
|
||||
mkdir -p $$TMPDIR/SRPMS; \
|
||||
mkdir -p $$TMPDIR/BUILD; \
|
||||
mkdir -p $$TMPDIR/SOURCES; \
|
||||
mkdir -p $$TMPDIR/SPECS; \
|
||||
rm -f ${PKGNAME}-${VERSION}.src.rpm; \
|
||||
cp ${PACKAGE_NAME}-${VERSION}.tar.gz $$TMPDIR/SOURCES; \
|
||||
cat pkgscripts/libjpeg-turbo.spec | sed s/%{_blddir}/%{_tmppath}/g \
|
||||
| sed s/#--\>//g \
|
||||
> $$TMPDIR/SPECS/libjpeg-turbo.spec; \
|
||||
rpmbuild -bs --define "_topdir $$TMPDIR" $$TMPDIR/SPECS/libjpeg-turbo.spec; \
|
||||
cp $$TMPDIR/SRPMS/${PKGNAME}-${VERSION}-${BUILD}.src.rpm \
|
||||
${PKGNAME}-${VERSION}.src.rpm; \
|
||||
rm -rf $$TMPDIR
|
||||
|
||||
pkgscripts/makedpkg: pkgscripts/makedpkg.tmpl
|
||||
cat pkgscripts/makedpkg.tmpl | sed s@%{__prefix}@$(prefix)@g | \
|
||||
sed s@%{__docdir}@$(docdir)@g | sed s@%{__libdir}@$(libdir)@g \
|
||||
> pkgscripts/makedpkg
|
||||
|
||||
deb: all pkgscripts/makedpkg
|
||||
sh pkgscripts/makedpkg
|
||||
|
||||
pkgscripts/uninstall: pkgscripts/uninstall.tmpl
|
||||
cat pkgscripts/uninstall.tmpl | sed s@%{__prefix}@$(prefix)@g | \
|
||||
sed s@%{__bindir}@$(bindir)@g | sed s@%{__datadir}@$(datadir)@g | \
|
||||
sed s@%{__includedir}@$(includedir)@g | sed s@%{__libdir}@$(libdir)@g | \
|
||||
sed s@%{__mandir}@$(mandir)@g > pkgscripts/uninstall
|
||||
|
||||
pkgscripts/makemacpkg: pkgscripts/makemacpkg.tmpl
|
||||
cat pkgscripts/makemacpkg.tmpl | sed s@%{__prefix}@$(prefix)@g | \
|
||||
sed s@%{__bindir}@$(bindir)@g | sed s@%{__docdir}@$(docdir)@g | \
|
||||
sed s@%{__libdir}@$(libdir)@g > pkgscripts/makemacpkg
|
||||
|
||||
if X86_64
|
||||
|
||||
udmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
||||
sh pkgscripts/makemacpkg -build32 ${BUILDDIR32}
|
||||
|
||||
iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
||||
sh pkgscripts/makemacpkg -build32 ${BUILDDIR32} -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S}
|
||||
|
||||
else
|
||||
|
||||
iosdmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
||||
sh pkgscripts/makemacpkg -buildarmv6 ${BUILDDIRARMV6} -buildarmv7 ${BUILDDIRARMV7} -buildarmv7s ${BUILDDIRARMV7S}
|
||||
|
||||
endif
|
||||
|
||||
dmg: all pkgscripts/makemacpkg pkgscripts/uninstall
|
||||
sh pkgscripts/makemacpkg
|
||||
|
||||
pkgscripts/makecygwinpkg: pkgscripts/makecygwinpkg.tmpl
|
||||
cat pkgscripts/makecygwinpkg.tmpl | sed s@%{__prefix}@$(prefix)@g | \
|
||||
sed s@%{__docdir}@$(docdir)@g | sed s@%{__libdir}@$(libdir)@g \
|
||||
> pkgscripts/makecygwinpkg
|
||||
|
||||
cygwinpkg: all pkgscripts/makecygwinpkg
|
||||
sh pkgscripts/makecygwinpkg
|
||||
475
README-turbo.txt
475
README-turbo.txt
@@ -1,475 +0,0 @@
|
||||
*******************************************************************************
|
||||
** Background
|
||||
*******************************************************************************
|
||||
|
||||
libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2,
|
||||
NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64,
|
||||
and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as
|
||||
libjpeg, all else being equal. On other types of systems, libjpeg-turbo can
|
||||
still outperform libjpeg by a significant amount, by virtue of its
|
||||
highly-optimized Huffman coding routines. In many cases, the performance of
|
||||
libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.
|
||||
|
||||
libjpeg-turbo implements both the traditional libjpeg API as well as the less
|
||||
powerful but more straightforward TurboJPEG API. libjpeg-turbo also features
|
||||
colorspace extensions that allow it to compress from/decompress to 32-bit and
|
||||
big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java
|
||||
interface.
|
||||
|
||||
libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated
|
||||
derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and
|
||||
VirtualGL projects made numerous enhancements to the codec in 2009, and in
|
||||
early 2010, libjpeg-turbo spun off into an independent project, with the goal
|
||||
of making high-speed JPEG compression/decompression technology available to a
|
||||
broader range of users and developers.
|
||||
|
||||
|
||||
*******************************************************************************
|
||||
** License
|
||||
*******************************************************************************
|
||||
|
||||
Most of libjpeg-turbo inherits the non-restrictive, BSD-style license used by
|
||||
libjpeg (see README.) The TurboJPEG wrapper (both C and Java versions) and
|
||||
associated test programs bear a similar license, which is reproduced below:
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
- Neither the name of the libjpeg-turbo Project nor the names of its
|
||||
contributors may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
*******************************************************************************
|
||||
** Using libjpeg-turbo
|
||||
*******************************************************************************
|
||||
|
||||
libjpeg-turbo includes two APIs that can be used to compress and decompress
|
||||
JPEG images:
|
||||
|
||||
TurboJPEG API: This API provides an easy-to-use interface for compressing
|
||||
and decompressing JPEG images in memory. It also provides some functionality
|
||||
that would not be straightforward to achieve using the underlying libjpeg
|
||||
API, such as generating planar YUV images and performing multiple
|
||||
simultaneous lossless transforms on an image. The Java interface for
|
||||
libjpeg-turbo is written on top of the TurboJPEG API.
|
||||
|
||||
libjpeg API: This is the de facto industry-standard API for compressing and
|
||||
decompressing JPEG images. It is more difficult to use than the TurboJPEG
|
||||
API but also more powerful. The libjpeg API implementation in libjpeg-turbo
|
||||
is both API/ABI-compatible and mathematically compatible with libjpeg v6b.
|
||||
It can also optionally be configured to be API/ABI-compatible with libjpeg v7
|
||||
and v8 (see below.)
|
||||
|
||||
There is no significant performance advantage to either API when both are used
|
||||
to perform similar operations.
|
||||
|
||||
======================
|
||||
Installation Directory
|
||||
======================
|
||||
|
||||
This document assumes that libjpeg-turbo will be installed in the default
|
||||
directory (/opt/libjpeg-turbo on Un*x and Mac systems and
|
||||
c:\libjpeg-turbo[-gcc][64] on Windows systems. If your installation of
|
||||
libjpeg-turbo resides in a different directory, then adjust the instructions
|
||||
accordingly.
|
||||
|
||||
=============================
|
||||
Replacing libjpeg at Run Time
|
||||
=============================
|
||||
|
||||
Un*x
|
||||
----
|
||||
|
||||
If a Un*x application is dynamically linked with libjpeg, then you can replace
|
||||
libjpeg with libjpeg-turbo at run time by manipulating LD_LIBRARY_PATH.
|
||||
For instance:
|
||||
|
||||
[Using libjpeg]
|
||||
> time cjpeg <vgl_5674_0098.ppm >vgl_5674_0098.jpg
|
||||
real 0m0.392s
|
||||
user 0m0.074s
|
||||
sys 0m0.020s
|
||||
|
||||
[Using libjpeg-turbo]
|
||||
> export LD_LIBRARY_PATH=/opt/libjpeg-turbo/{lib}:$LD_LIBRARY_PATH
|
||||
> time cjpeg <vgl_5674_0098.ppm >vgl_5674_0098.jpg
|
||||
real 0m0.109s
|
||||
user 0m0.029s
|
||||
sys 0m0.010s
|
||||
|
||||
({lib} = lib32 or lib64, depending on whether you wish to use the 32-bit or the
|
||||
64-bit version of libjpeg-turbo.)
|
||||
|
||||
System administrators can also replace the libjpeg symlinks in /usr/lib* with
|
||||
links to the libjpeg-turbo dynamic library located in /opt/libjpeg-turbo/{lib}.
|
||||
This will effectively accelerate every application that uses the libjpeg
|
||||
dynamic library on the system.
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
If a Windows application is dynamically linked with libjpeg, then you can
|
||||
replace libjpeg with libjpeg-turbo at run time by backing up the application's
|
||||
copy of jpeg62.dll, jpeg7.dll, or jpeg8.dll (assuming the application has its
|
||||
own local copy of this library) and copying the corresponding DLL from
|
||||
libjpeg-turbo into the application's install directory. The official
|
||||
libjpeg-turbo binary packages only provide jpeg62.dll. If the application uses
|
||||
jpeg7.dll or jpeg8.dll instead, then it will be necessary to build
|
||||
libjpeg-turbo from source (see "libjpeg v7 and v8 API/ABI Emulation" below.)
|
||||
|
||||
The following information is specific to the official libjpeg-turbo binary
|
||||
packages for Visual C++:
|
||||
|
||||
-- jpeg62.dll requires the Visual C++ 2008 C run-time DLL (msvcr90.dll).
|
||||
msvcr90.dll ships with more recent versions of Windows, but users of older
|
||||
Windows releases can obtain it from the Visual C++ 2008 Redistributable
|
||||
Package, which is available as a free download from Microsoft's web site.
|
||||
|
||||
-- Features of the libjpeg API that require passing a C run-time structure,
|
||||
such as a file handle, from an application to the library will probably not
|
||||
work with jpeg62.dll, unless the application is also built to use the Visual
|
||||
C++ 2008 C run-time DLL. In particular, this affects jpeg_stdio_dest() and
|
||||
jpeg_stdio_src().
|
||||
|
||||
Mac
|
||||
---
|
||||
|
||||
Mac applications typically embed their own copies of the libjpeg dylib inside
|
||||
the (hidden) application bundle, so it is not possible to globally replace
|
||||
libjpeg on OS X systems. Replacing the application's version of the libjpeg
|
||||
dylib would generally involve copying libjpeg.*.dylib from libjpeg-turbo into
|
||||
the appropriate place in the application bundle and using install_name_tool to
|
||||
repoint the libjpeg-turbo dylib to its new directory. This requires an
|
||||
advanced knowledge of OS X and would not survive an upgrade or a re-install of
|
||||
the application. Thus, it is not recommended for most users.
|
||||
|
||||
========================================
|
||||
Using libjpeg-turbo in Your Own Programs
|
||||
========================================
|
||||
|
||||
For the most part, libjpeg-turbo should work identically to libjpeg, so in
|
||||
most cases, an application can be built against libjpeg and then run against
|
||||
libjpeg-turbo. On Un*x systems and Cygwin, you can build against libjpeg-turbo
|
||||
instead of libjpeg by setting
|
||||
|
||||
CPATH=/opt/libjpeg-turbo/include
|
||||
and
|
||||
LIBRARY_PATH=/opt/libjpeg-turbo/{lib}
|
||||
|
||||
({lib} = lib32 or lib64, depending on whether you are building a 32-bit or a
|
||||
64-bit application.)
|
||||
|
||||
If using MinGW, then set
|
||||
|
||||
CPATH=/c/libjpeg-turbo-gcc[64]/include
|
||||
and
|
||||
LIBRARY_PATH=/c/libjpeg-turbo-gcc[64]/lib
|
||||
|
||||
Building against libjpeg-turbo is useful, for instance, if you want to build an
|
||||
application that leverages the libjpeg-turbo colorspace extensions (see below.)
|
||||
On Un*x systems, you would still need to manipulate LD_LIBRARY_PATH or create
|
||||
appropriate symlinks to use libjpeg-turbo at run time. On such systems, you
|
||||
can pass -R /opt/libjpeg-turbo/{lib} to the linker to force the use of
|
||||
libjpeg-turbo at run time rather than libjpeg (also useful if you want to
|
||||
leverage the colorspace extensions), or you can link against the libjpeg-turbo
|
||||
static library.
|
||||
|
||||
To force a Un*x or MinGW application to link against the static version of
|
||||
libjpeg-turbo, you can use the following linker options:
|
||||
|
||||
-Wl,-Bstatic -ljpeg -Wl,-Bdynamic
|
||||
|
||||
On OS X, simply add /opt/libjpeg-turbo/lib/libjpeg.a to the linker command
|
||||
line.
|
||||
|
||||
To build Visual C++ applications using libjpeg-turbo, add
|
||||
c:\libjpeg-turbo[64]\include to the system or user INCLUDE environment
|
||||
variable and c:\libjpeg-turbo[64]\lib to the system or user LIB environment
|
||||
variable, and then link against either jpeg.lib (to use the DLL version of
|
||||
libjpeg-turbo) or jpeg-static.lib (to use the static version of libjpeg-turbo.)
|
||||
|
||||
=====================
|
||||
Colorspace Extensions
|
||||
=====================
|
||||
|
||||
libjpeg-turbo includes extensions that allow JPEG images to be compressed
|
||||
directly from (and decompressed directly to) buffers that use BGR, BGRX,
|
||||
RGBX, XBGR, and XRGB pixel ordering. This is implemented with ten new
|
||||
colorspace constants:
|
||||
|
||||
JCS_EXT_RGB /* red/green/blue */
|
||||
JCS_EXT_RGBX /* red/green/blue/x */
|
||||
JCS_EXT_BGR /* blue/green/red */
|
||||
JCS_EXT_BGRX /* blue/green/red/x */
|
||||
JCS_EXT_XBGR /* x/blue/green/red */
|
||||
JCS_EXT_XRGB /* x/red/green/blue */
|
||||
JCS_EXT_RGBA /* red/green/blue/alpha */
|
||||
JCS_EXT_BGRA /* blue/green/red/alpha */
|
||||
JCS_EXT_ABGR /* alpha/blue/green/red */
|
||||
JCS_EXT_ARGB /* alpha/red/green/blue */
|
||||
|
||||
Setting cinfo.in_color_space (compression) or cinfo.out_color_space
|
||||
(decompression) to one of these values will cause libjpeg-turbo to read the
|
||||
red, green, and blue values from (or write them to) the appropriate position in
|
||||
the pixel when compressing from/decompressing to an RGB buffer.
|
||||
|
||||
Your application can check for the existence of these extensions at compile
|
||||
time with:
|
||||
|
||||
#ifdef JCS_EXTENSIONS
|
||||
|
||||
At run time, attempting to use these extensions with a libjpeg implementation
|
||||
that does not support them will result in a "Bogus input colorspace" error.
|
||||
Applications can trap this error in order to test whether run-time support is
|
||||
available for the colorspace extensions.
|
||||
|
||||
When using the RGBX, BGRX, XBGR, and XRGB colorspaces during decompression, the
|
||||
X byte is undefined, and in order to ensure the best performance, libjpeg-turbo
|
||||
can set that byte to whatever value it wishes. If an application expects the X
|
||||
byte to be used as an alpha channel, then it should specify JCS_EXT_RGBA,
|
||||
JCS_EXT_BGRA, JCS_EXT_ABGR, or JCS_EXT_ARGB. When these colorspace constants
|
||||
are used, the X byte is guaranteed to be 0xFF, which is interpreted as opaque.
|
||||
|
||||
Your application can check for the existence of the alpha channel colorspace
|
||||
extensions at compile time with:
|
||||
|
||||
#ifdef JCS_ALPHA_EXTENSIONS
|
||||
|
||||
jcstest.c, located in the libjpeg-turbo source tree, demonstrates how to check
|
||||
for the existence of the colorspace extensions at compile time and run time.
|
||||
|
||||
===================================
|
||||
libjpeg v7 and v8 API/ABI Emulation
|
||||
===================================
|
||||
|
||||
With libjpeg v7 and v8, new features were added that necessitated extending the
|
||||
compression and decompression structures. Unfortunately, due to the exposed
|
||||
nature of those structures, extending them also necessitated breaking backward
|
||||
ABI compatibility with previous libjpeg releases. Thus, programs that were
|
||||
built to use libjpeg v7 or v8 did not work with libjpeg-turbo, since it is
|
||||
based on the libjpeg v6b code base. Although libjpeg v7 and v8 are still not
|
||||
as widely used as v6b, enough programs (including a few Linux distros) made
|
||||
the switch that there was a demand to emulate the libjpeg v7 and v8 ABIs
|
||||
in libjpeg-turbo. It should be noted, however, that this feature was added
|
||||
primarily so that applications that had already been compiled to use libjpeg
|
||||
v7+ could take advantage of accelerated baseline JPEG encoding/decoding
|
||||
without recompiling. libjpeg-turbo does not claim to support all of the
|
||||
libjpeg v7+ features, nor to produce identical output to libjpeg v7+ in all
|
||||
cases (see below.)
|
||||
|
||||
By passing an argument of --with-jpeg7 or --with-jpeg8 to configure, or an
|
||||
argument of -DWITH_JPEG7=1 or -DWITH_JPEG8=1 to cmake, you can build a version
|
||||
of libjpeg-turbo that emulates the libjpeg v7 or v8 ABI, so that programs
|
||||
that are built against libjpeg v7 or v8 can be run with libjpeg-turbo. The
|
||||
following section describes which libjpeg v7+ features are supported and which
|
||||
aren't.
|
||||
|
||||
Support for libjpeg v7 and v8 Features:
|
||||
---------------------------------------
|
||||
|
||||
Fully supported:
|
||||
|
||||
-- libjpeg: IDCT scaling extensions in decompressor
|
||||
libjpeg-turbo supports IDCT scaling with scaling factors of 1/8, 1/4, 3/8,
|
||||
1/2, 5/8, 3/4, 7/8, 9/8, 5/4, 11/8, 3/2, 13/8, 7/4, 15/8, and 2/1 (only 1/4
|
||||
and 1/2 are SIMD-accelerated.)
|
||||
|
||||
-- libjpeg: arithmetic coding
|
||||
|
||||
-- libjpeg: In-memory source and destination managers
|
||||
See notes below.
|
||||
|
||||
-- cjpeg: Separate quality settings for luminance and chrominance
|
||||
Note that the libpjeg v7+ API was extended to accommodate this feature only
|
||||
for convenience purposes. It has always been possible to implement this
|
||||
feature with libjpeg v6b (see rdswitch.c for an example.)
|
||||
|
||||
-- cjpeg: 32-bit BMP support
|
||||
|
||||
-- cjpeg: -rgb option
|
||||
|
||||
-- jpegtran: lossless cropping
|
||||
|
||||
-- jpegtran: -perfect option
|
||||
|
||||
-- jpegtran: forcing width/height when performing lossless crop
|
||||
|
||||
-- rdjpgcom: -raw option
|
||||
|
||||
-- rdjpgcom: locale awareness
|
||||
|
||||
|
||||
Not supported:
|
||||
|
||||
NOTE: As of this writing, extensive research has been conducted into the
|
||||
usefulness of DCT scaling as a means of data reduction and SmartScale as a
|
||||
means of quality improvement. The reader is invited to peruse the research at
|
||||
http://www.libjpeg-turbo.org/About/SmartScale and draw his/her own conclusions,
|
||||
but it is the general belief of our project that these features have not
|
||||
demonstrated sufficient usefulness to justify inclusion in libjpeg-turbo.
|
||||
|
||||
-- libjpeg: DCT scaling in compressor
|
||||
cinfo.scale_num and cinfo.scale_denom are silently ignored.
|
||||
There is no technical reason why DCT scaling could not be supported when
|
||||
emulating the libjpeg v7+ API/ABI, but without the SmartScale extension (see
|
||||
below), only scaling factors of 1/2, 8/15, 4/7, 8/13, 2/3, 8/11, 4/5, and
|
||||
8/9 would be available, which is of limited usefulness.
|
||||
|
||||
-- libjpeg: SmartScale
|
||||
cinfo.block_size is silently ignored.
|
||||
SmartScale is an extension to the JPEG format that allows for DCT block
|
||||
sizes other than 8x8. Providing support for this new format would be
|
||||
feasible (particularly without full acceleration.) However, until/unless
|
||||
the format becomes either an official industry standard or, at minimum, an
|
||||
accepted solution in the community, we are hesitant to implement it, as
|
||||
there is no sense of whether or how it might change in the future. It is
|
||||
our belief that SmartScale has not demonstrated sufficient usefulness as a
|
||||
lossless format nor as a means of quality enhancement, and thus, our primary
|
||||
interest in providing this feature would be as a means of supporting
|
||||
additional DCT scaling factors.
|
||||
|
||||
-- libjpeg: Fancy downsampling in compressor
|
||||
cinfo.do_fancy_downsampling is silently ignored.
|
||||
This requires the DCT scaling feature, which is not supported.
|
||||
|
||||
-- jpegtran: Scaling
|
||||
This requires both the DCT scaling and SmartScale features, which are not
|
||||
supported.
|
||||
|
||||
-- Lossless RGB JPEG files
|
||||
This requires the SmartScale feature, which is not supported.
|
||||
|
||||
What About libjpeg v9?
|
||||
----------------------
|
||||
|
||||
libjpeg v9 introduced yet another field to the JPEG compression structure
|
||||
(color_transform), thus making the ABI backward incompatible with that of
|
||||
libjpeg v8. This new field was introduced solely for the purpose of supporting
|
||||
lossless SmartScale encoding. Further, there was actually no reason to extend
|
||||
the API in this manner, as the color transform could have just as easily been
|
||||
activated by way of a new JPEG colorspace constant, thus preserving backward
|
||||
ABI compatibility.
|
||||
|
||||
Our research (see link above) has shown that lossless SmartScale does not
|
||||
generally accomplish anything that can't already be accomplished better with
|
||||
existing, standard lossless formats. Thus, at this time, it is our belief that
|
||||
there is not sufficient technical justification for software to upgrade from
|
||||
libjpeg v8 to libjpeg v9, and therefore, not sufficient technical justification
|
||||
for us to emulate the libjpeg v9 ABI.
|
||||
|
||||
=====================================
|
||||
In-Memory Source/Destination Managers
|
||||
=====================================
|
||||
|
||||
By default, libjpeg-turbo 1.3 and later includes the jpeg_mem_src() and
|
||||
jpeg_mem_dest() functions, even when not emulating the libjpeg v8 API/ABI.
|
||||
Previously, it was necessary to build libjpeg-turbo from source with libjpeg v8
|
||||
API/ABI emulation in order to use the in-memory source/destination managers,
|
||||
but several projects requested that those functions be included when emulating
|
||||
the libjpeg v6b API/ABI as well. This allows the use of those functions by
|
||||
programs that need them without breaking ABI compatibility for programs that
|
||||
don't, and it allows those functions to be provided in the "official"
|
||||
libjpeg-turbo binaries.
|
||||
|
||||
Those who are concerned about maintaining strict conformance with the libjpeg
|
||||
v6b or v7 API can pass an argument of --without-mem-srcdst to configure or
|
||||
an argument of -DWITH_MEM_SRCDST=0 to CMake prior to building libjpeg-turbo.
|
||||
This will restore the pre-1.3 behavior, in which jpeg_mem_src() and
|
||||
jpeg_mem_dest() are only included when emulating the libjpeg v8 API/ABI.
|
||||
|
||||
On Un*x systems, including the in-memory source/destination managers changes
|
||||
the dynamic library version from 62.0.0 to 62.1.0 if using libjpeg v6b API/ABI
|
||||
emulation and from 7.0.0 to 7.1.0 if using libjpeg v7 API/ABI emulation.
|
||||
|
||||
Note that, on most Un*x systems, the dynamic linker will not look for a
|
||||
function in a library until that function is actually used. Thus, if a program
|
||||
is built against libjpeg-turbo 1.3+ and uses jpeg_mem_src() or jpeg_mem_dest(),
|
||||
that program will not fail if run against an older version of libjpeg-turbo or
|
||||
against libjpeg v7- until the program actually tries to call jpeg_mem_src() or
|
||||
jpeg_mem_dest(). Such is not the case on Windows. If a program is built
|
||||
against the libjpeg-turbo 1.3+ DLL and uses jpeg_mem_src() or jpeg_mem_dest(),
|
||||
then it must use the libjpeg-turbo 1.3+ DLL at run time.
|
||||
|
||||
Both cjpeg and djpeg have been extended to allow testing the in-memory
|
||||
source/destination manager functions. See their respective man pages for more
|
||||
details.
|
||||
|
||||
|
||||
*******************************************************************************
|
||||
** Mathematical Compatibility
|
||||
*******************************************************************************
|
||||
|
||||
For the most part, libjpeg-turbo should produce identical output to libjpeg
|
||||
v6b. The one exception to this is when using the floating point DCT/IDCT, in
|
||||
which case the outputs of libjpeg v6b and libjpeg-turbo are not guaranteed to
|
||||
be identical (the accuracy of the floating point DCT/IDCT is constant when
|
||||
using libjpeg-turbo's SIMD extensions, but otherwise, it can depend heavily on
|
||||
the compiler and compiler settings.)
|
||||
|
||||
While libjpeg-turbo does emulate the libjpeg v8 API/ABI, under the hood, it is
|
||||
still using the same algorithms as libjpeg v6b, so there are several specific
|
||||
cases in which libjpeg-turbo cannot be expected to produce the same output as
|
||||
libjpeg v8:
|
||||
|
||||
-- When decompressing using scaling factors of 1/2 and 1/4, because libjpeg v8
|
||||
implements those scaling algorithms a bit differently than libjpeg v6b does,
|
||||
and libjpeg-turbo's SIMD extensions are based on the libjpeg v6b behavior.
|
||||
|
||||
-- When using chrominance subsampling, because libjpeg v8 implements this
|
||||
with its DCT/IDCT scaling algorithms rather than with a separate
|
||||
downsampling/upsampling algorithm.
|
||||
|
||||
-- When using the floating point IDCT, for the reasons stated above and also
|
||||
because the floating point IDCT algorithm was modified in libjpeg v8a to
|
||||
improve accuracy.
|
||||
|
||||
-- When decompressing using a scaling factor > 1 and merged (AKA "non-fancy" or
|
||||
"non-smooth") chrominance upsampling, because libjpeg v8 does not support
|
||||
merged upsampling with scaling factors > 1.
|
||||
|
||||
|
||||
*******************************************************************************
|
||||
** Performance Pitfalls
|
||||
*******************************************************************************
|
||||
|
||||
===============
|
||||
Restart Markers
|
||||
===============
|
||||
|
||||
The optimized Huffman decoder in libjpeg-turbo does not handle restart markers
|
||||
in a way that makes the rest of the libjpeg infrastructure happy, so it is
|
||||
necessary to use the slow Huffman decoder when decompressing a JPEG image that
|
||||
has restart markers. This can cause the decompression performance to drop by
|
||||
as much as 20%, but the performance will still be much greater than that of
|
||||
libjpeg. Many consumer packages, such as PhotoShop, use restart markers when
|
||||
generating JPEG images, so images generated by those programs will experience
|
||||
this issue.
|
||||
|
||||
===============================================
|
||||
Fast Integer Forward DCT at High Quality Levels
|
||||
===============================================
|
||||
|
||||
The algorithm used by the SIMD-accelerated quantization function cannot produce
|
||||
correct results whenever the fast integer forward DCT is used along with a JPEG
|
||||
quality of 98-100. Thus, libjpeg-turbo must use the non-SIMD quantization
|
||||
function in those cases. This causes performance to drop by as much as 40%.
|
||||
It is therefore strongly advised that you use the slow integer forward DCT
|
||||
whenever encoding images with a JPEG quality of 98 or higher.
|
||||
@@ -1,7 +1,7 @@
|
||||
libjpeg-turbo note: This file has been modified by The libjpeg-turbo Project
|
||||
to include only information relevant to libjpeg-turbo, to wordsmith certain
|
||||
sections, and to remove impolitic language that existed in the libjpeg v8
|
||||
README. It is included only for reference. Please see README-turbo.txt for
|
||||
README. It is included only for reference. Please see README.md for
|
||||
information specific to libjpeg-turbo.
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ TO DO Plans for future IJG releases.
|
||||
Other documentation files in the distribution are:
|
||||
|
||||
User documentation:
|
||||
install.txt How to configure and install the IJG software.
|
||||
usage.txt Usage instructions for cjpeg, djpeg, jpegtran,
|
||||
rdjpgcom, and wrjpgcom.
|
||||
*.1 Unix-style man pages for programs (same info as usage.txt).
|
||||
@@ -44,13 +43,13 @@ User documentation:
|
||||
change.log Version-to-version change highlights.
|
||||
Programmer and internal documentation:
|
||||
libjpeg.txt How to use the JPEG library in your own programs.
|
||||
example.c Sample code for calling the JPEG library.
|
||||
example.txt Sample code for calling the JPEG library.
|
||||
structure.txt Overview of the JPEG library's internal structure.
|
||||
coderules.txt Coding style rules --- please read if you contribute code.
|
||||
|
||||
Please read at least the files install.txt and usage.txt. Some information
|
||||
can also be found in the JPEG FAQ (Frequently Asked Questions) article. See
|
||||
ARCHIVE LOCATIONS below to find out where to obtain the FAQ article.
|
||||
Please read at least usage.txt. Some information can also be found in the JPEG
|
||||
FAQ (Frequently Asked Questions) article. See ARCHIVE LOCATIONS below to find
|
||||
out where to obtain the FAQ article.
|
||||
|
||||
If you want to understand how the JPEG code works, we suggest reading one or
|
||||
more of the REFERENCES, then looking at the documentation files (in roughly
|
||||
@@ -62,7 +61,7 @@ OVERVIEW
|
||||
|
||||
This package contains C software to implement JPEG image encoding, decoding,
|
||||
and transcoding. JPEG (pronounced "jay-peg") is a standardized compression
|
||||
method for full-color and gray-scale images. JPEG's strong suit is compressing
|
||||
method for full-color and grayscale images. JPEG's strong suit is compressing
|
||||
photographic images or other types of images that have smooth color and
|
||||
brightness transitions between neighboring pixels. Images with sharp lines or
|
||||
other abrupt features may not compress well with JPEG, and a higher JPEG
|
||||
@@ -129,7 +128,7 @@ with respect to this software, its quality, accuracy, merchantability, or
|
||||
fitness for a particular purpose. This software is provided "AS IS", and you,
|
||||
its user, assume the entire risk as to its quality and accuracy.
|
||||
|
||||
This software is copyright (C) 1991-2012, Thomas G. Lane, Guido Vollbeding.
|
||||
This software is copyright (C) 1991-2016, Thomas G. Lane, Guido Vollbeding.
|
||||
All Rights Reserved except as specified below.
|
||||
|
||||
Permission is hereby granted to use, copy, modify, and distribute this
|
||||
@@ -160,18 +159,12 @@ commercial products, provided that all warranty or liability claims are
|
||||
assumed by the product vendor.
|
||||
|
||||
|
||||
The Unix configuration script "configure" was produced with GNU Autoconf.
|
||||
It is copyright by the Free Software Foundation but is freely distributable.
|
||||
The same holds for its supporting scripts (config.guess, config.sub,
|
||||
ltmain.sh). Another support script, install-sh, is copyright by X Consortium
|
||||
but is also freely distributable.
|
||||
|
||||
The IJG distribution formerly included code to read and write GIF files.
|
||||
To avoid entanglement with the Unisys LZW patent, GIF reading support has
|
||||
been removed altogether, and the GIF writer has been simplified to produce
|
||||
"uncompressed GIFs". This technique does not use the LZW algorithm; the
|
||||
resulting GIF files are larger than usual, but are readable by all standard
|
||||
GIF decoders.
|
||||
To avoid entanglement with the Unisys LZW patent (now expired), GIF reading
|
||||
support has been removed altogether, and the GIF writer has been simplified
|
||||
to produce "uncompressed GIFs". This technique does not use the LZW
|
||||
algorithm; the resulting GIF files are larger than usual, but are readable
|
||||
by all standard GIF decoders.
|
||||
|
||||
We are required to state that
|
||||
"The Graphics Interchange Format(c) is the Copyright property of
|
||||
@@ -190,8 +183,8 @@ The best short technical introduction to the JPEG compression algorithm is
|
||||
Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44.
|
||||
(Adjacent articles in that issue discuss MPEG motion picture compression,
|
||||
applications of JPEG, and related topics.) If you don't have the CACM issue
|
||||
handy, a PostScript file containing a revised version of Wallace's article is
|
||||
available at http://www.ijg.org/files/wallace.ps.gz. The file (actually
|
||||
handy, a PDF file containing a revised version of Wallace's article is
|
||||
available at http://www.ijg.org/files/Wallace.JPEG.pdf. The file (actually
|
||||
a preprint for an article that appeared in IEEE Trans. Consumer Electronics)
|
||||
omits the sample images that appeared in CACM, but it includes corrections
|
||||
and some added material. Note: the Wallace article is copyright ACM and IEEE,
|
||||
@@ -221,14 +214,14 @@ Continuous-tone Still Images, Part 2: Compliance testing" and has document
|
||||
numbers ISO/IEC IS 10918-2, ITU-T T.83.
|
||||
|
||||
The JPEG standard does not specify all details of an interchangeable file
|
||||
format. For the omitted details we follow the "JFIF" conventions, revision
|
||||
1.02. JFIF 1.02 has been adopted as an Ecma International Technical Report
|
||||
and thus received a formal publication status. It is available as a free
|
||||
download in PDF format from
|
||||
http://www.ecma-international.org/publications/techreports/E-TR-098.htm.
|
||||
A PostScript version of the JFIF document is available at
|
||||
http://www.ijg.org/files/jfif.ps.gz. There is also a plain text version at
|
||||
http://www.ijg.org/files/jfif.txt.gz, but it is missing the figures.
|
||||
format. For the omitted details, we follow the "JFIF" conventions, revision
|
||||
1.02. JFIF version 1 has been adopted as ISO/IEC 10918-5 (05/2013) and
|
||||
Recommendation ITU-T T.871 (05/2011): Information technology - Digital
|
||||
compression and coding of continuous-tone still images: JPEG File Interchange
|
||||
Format (JFIF). It is available as a free download in PDF file format from
|
||||
https://www.iso.org/standard/54989.html and http://www.itu.int/rec/T-REC-T.871.
|
||||
A PDF file of the older JFIF 1.02 specification is available at
|
||||
http://www.w3.org/Graphics/JPEG/jfif3.pdf.
|
||||
|
||||
The TIFF 6.0 file format specification can be obtained by FTP from
|
||||
ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme
|
||||
@@ -247,9 +240,7 @@ ARCHIVE LOCATIONS
|
||||
|
||||
The "official" archive site for this software is www.ijg.org.
|
||||
The most recent released version can always be found there in
|
||||
directory "files". This particular version will be archived as
|
||||
http://www.ijg.org/files/jpegsrc.v8d.tar.gz, and in Windows-compatible
|
||||
"zip" archive format as http://www.ijg.org/files/jpegsr8d.zip.
|
||||
directory "files".
|
||||
|
||||
The JPEG FAQ (Frequently Asked Questions) article is a source of some
|
||||
general information about JPEG.
|
||||
@@ -262,18 +253,22 @@ with body
|
||||
send usenet/news.answers/jpeg-faq/part2
|
||||
|
||||
|
||||
FILE FORMAT WARS
|
||||
================
|
||||
FILE FORMAT COMPATIBILITY
|
||||
=========================
|
||||
|
||||
The ISO/IEC JTC1/SC29/WG1 standards committee (also known as JPEG, together
|
||||
with ITU-T SG16) currently promotes different formats containing the name
|
||||
"JPEG" which are incompatible with original DCT-based JPEG. IJG therefore does
|
||||
not support these formats (see REFERENCES). Indeed, one of the original
|
||||
reasons for developing this free software was to help force convergence on
|
||||
common, interoperable format standards for JPEG files.
|
||||
Don't use an incompatible file format!
|
||||
(In any case, our decoder will remain capable of reading existing JPEG
|
||||
image files indefinitely.)
|
||||
This software implements ITU T.81 | ISO/IEC 10918 with some extensions from
|
||||
ITU T.871 | ISO/IEC 10918-5 (JPEG File Interchange Format-- see REFERENCES).
|
||||
Informally, the term "JPEG image" or "JPEG file" most often refers to JFIF or
|
||||
a subset thereof, but there are other formats containing the name "JPEG" that
|
||||
are incompatible with the DCT-based JPEG standard or with JFIF (for instance,
|
||||
JPEG 2000 and JPEG XR). This software therefore does not support these
|
||||
formats. Indeed, one of the original reasons for developing this free software
|
||||
was to help force convergence on a common, interoperable format standard for
|
||||
JPEG files.
|
||||
|
||||
JFIF is a minimal or "low end" representation. TIFF/JPEG (TIFF revision 6.0 as
|
||||
modified by TIFF Technical Note #2) can be used for "high end" applications
|
||||
that need to record a lot of additional data about an image.
|
||||
|
||||
|
||||
TO DO
|
||||
356
README.md
Normal file
356
README.md
Normal file
@@ -0,0 +1,356 @@
|
||||
Background
|
||||
==========
|
||||
|
||||
libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2,
|
||||
AVX2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression
|
||||
on x86, x86-64, ARM, and PowerPC systems, as well as progressive JPEG
|
||||
compression on x86 and x86-64 systems. On such systems, libjpeg-turbo is
|
||||
generally 2-6x as fast as libjpeg, all else being equal. On other types of
|
||||
systems, libjpeg-turbo can still outperform libjpeg by a significant amount, by
|
||||
virtue of its highly-optimized Huffman coding routines. In many cases, the
|
||||
performance of libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.
|
||||
|
||||
libjpeg-turbo implements both the traditional libjpeg API as well as the less
|
||||
powerful but more straightforward TurboJPEG API. libjpeg-turbo also features
|
||||
colorspace extensions that allow it to compress from/decompress to 32-bit and
|
||||
big-endian pixel buffers (RGBX, XBGR, etc.), as well as a full-featured Java
|
||||
interface.
|
||||
|
||||
libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated
|
||||
derivative of libjpeg v6b developed by Miyasaka Masaru. The TigerVNC and
|
||||
VirtualGL projects made numerous enhancements to the codec in 2009, and in
|
||||
early 2010, libjpeg-turbo spun off into an independent project, with the goal
|
||||
of making high-speed JPEG compression/decompression technology available to a
|
||||
broader range of users and developers.
|
||||
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
libjpeg-turbo is covered by three compatible BSD-style open source licenses.
|
||||
Refer to [LICENSE.md](LICENSE.md) for a roll-up of license terms.
|
||||
|
||||
|
||||
Building libjpeg-turbo
|
||||
======================
|
||||
|
||||
Refer to [BUILDING.md](BUILDING.md) for complete instructions.
|
||||
|
||||
|
||||
Using libjpeg-turbo
|
||||
===================
|
||||
|
||||
libjpeg-turbo includes two APIs that can be used to compress and decompress
|
||||
JPEG images:
|
||||
|
||||
- **TurboJPEG API**<br>
|
||||
This API provides an easy-to-use interface for compressing and decompressing
|
||||
JPEG images in memory. It also provides some functionality that would not be
|
||||
straightforward to achieve using the underlying libjpeg API, such as
|
||||
generating planar YUV images and performing multiple simultaneous lossless
|
||||
transforms on an image. The Java interface for libjpeg-turbo is written on
|
||||
top of the TurboJPEG API. The TurboJPEG API is recommended for first-time
|
||||
users of libjpeg-turbo. Refer to [tjexample.c](tjexample.c) and
|
||||
[TJExample.java](java/TJExample.java) for examples of its usage and to
|
||||
<http://libjpeg-turbo.org/Documentation/Documentation> for API documentation.
|
||||
|
||||
- **libjpeg API**<br>
|
||||
This is the de facto industry-standard API for compressing and decompressing
|
||||
JPEG images. It is more difficult to use than the TurboJPEG API but also
|
||||
more powerful. The libjpeg API implementation in libjpeg-turbo is both
|
||||
API/ABI-compatible and mathematically compatible with libjpeg v6b. It can
|
||||
also optionally be configured to be API/ABI-compatible with libjpeg v7 and v8
|
||||
(see below.) Refer to [cjpeg.c](cjpeg.c) and [djpeg.c](djpeg.c) for examples
|
||||
of its usage and to [libjpeg.txt](libjpeg.txt) for API documentation.
|
||||
|
||||
There is no significant performance advantage to either API when both are used
|
||||
to perform similar operations.
|
||||
|
||||
Colorspace Extensions
|
||||
---------------------
|
||||
|
||||
libjpeg-turbo includes extensions that allow JPEG images to be compressed
|
||||
directly from (and decompressed directly to) buffers that use BGR, BGRX,
|
||||
RGBX, XBGR, and XRGB pixel ordering. This is implemented with ten new
|
||||
colorspace constants:
|
||||
|
||||
JCS_EXT_RGB /* red/green/blue */
|
||||
JCS_EXT_RGBX /* red/green/blue/x */
|
||||
JCS_EXT_BGR /* blue/green/red */
|
||||
JCS_EXT_BGRX /* blue/green/red/x */
|
||||
JCS_EXT_XBGR /* x/blue/green/red */
|
||||
JCS_EXT_XRGB /* x/red/green/blue */
|
||||
JCS_EXT_RGBA /* red/green/blue/alpha */
|
||||
JCS_EXT_BGRA /* blue/green/red/alpha */
|
||||
JCS_EXT_ABGR /* alpha/blue/green/red */
|
||||
JCS_EXT_ARGB /* alpha/red/green/blue */
|
||||
|
||||
Setting `cinfo.in_color_space` (compression) or `cinfo.out_color_space`
|
||||
(decompression) to one of these values will cause libjpeg-turbo to read the
|
||||
red, green, and blue values from (or write them to) the appropriate position in
|
||||
the pixel when compressing from/decompressing to an RGB buffer.
|
||||
|
||||
Your application can check for the existence of these extensions at compile
|
||||
time with:
|
||||
|
||||
#ifdef JCS_EXTENSIONS
|
||||
|
||||
At run time, attempting to use these extensions with a libjpeg implementation
|
||||
that does not support them will result in a "Bogus input colorspace" error.
|
||||
Applications can trap this error in order to test whether run-time support is
|
||||
available for the colorspace extensions.
|
||||
|
||||
When using the RGBX, BGRX, XBGR, and XRGB colorspaces during decompression, the
|
||||
X byte is undefined, and in order to ensure the best performance, libjpeg-turbo
|
||||
can set that byte to whatever value it wishes. If an application expects the X
|
||||
byte to be used as an alpha channel, then it should specify `JCS_EXT_RGBA`,
|
||||
`JCS_EXT_BGRA`, `JCS_EXT_ABGR`, or `JCS_EXT_ARGB`. When these colorspace
|
||||
constants are used, the X byte is guaranteed to be 0xFF, which is interpreted
|
||||
as opaque.
|
||||
|
||||
Your application can check for the existence of the alpha channel colorspace
|
||||
extensions at compile time with:
|
||||
|
||||
#ifdef JCS_ALPHA_EXTENSIONS
|
||||
|
||||
[jcstest.c](jcstest.c), located in the libjpeg-turbo source tree, demonstrates
|
||||
how to check for the existence of the colorspace extensions at compile time and
|
||||
run time.
|
||||
|
||||
libjpeg v7 and v8 API/ABI Emulation
|
||||
-----------------------------------
|
||||
|
||||
With libjpeg v7 and v8, new features were added that necessitated extending the
|
||||
compression and decompression structures. Unfortunately, due to the exposed
|
||||
nature of those structures, extending them also necessitated breaking backward
|
||||
ABI compatibility with previous libjpeg releases. Thus, programs that were
|
||||
built to use libjpeg v7 or v8 did not work with libjpeg-turbo, since it is
|
||||
based on the libjpeg v6b code base. Although libjpeg v7 and v8 are not
|
||||
as widely used as v6b, enough programs (including a few Linux distros) made
|
||||
the switch that there was a demand to emulate the libjpeg v7 and v8 ABIs
|
||||
in libjpeg-turbo. It should be noted, however, that this feature was added
|
||||
primarily so that applications that had already been compiled to use libjpeg
|
||||
v7+ could take advantage of accelerated baseline JPEG encoding/decoding
|
||||
without recompiling. libjpeg-turbo does not claim to support all of the
|
||||
libjpeg v7+ features, nor to produce identical output to libjpeg v7+ in all
|
||||
cases (see below.)
|
||||
|
||||
By passing an argument of `-DWITH_JPEG7=1` or `-DWITH_JPEG8=1` to `cmake`, you
|
||||
can build a version of libjpeg-turbo that emulates the libjpeg v7 or v8 ABI, so
|
||||
that programs that are built against libjpeg v7 or v8 can be run with
|
||||
libjpeg-turbo. The following section describes which libjpeg v7+ features are
|
||||
supported and which aren't.
|
||||
|
||||
### Support for libjpeg v7 and v8 Features
|
||||
|
||||
#### Fully supported
|
||||
|
||||
- **libjpeg: IDCT scaling extensions in decompressor**<br>
|
||||
libjpeg-turbo supports IDCT scaling with scaling factors of 1/8, 1/4, 3/8,
|
||||
1/2, 5/8, 3/4, 7/8, 9/8, 5/4, 11/8, 3/2, 13/8, 7/4, 15/8, and 2/1 (only 1/4
|
||||
and 1/2 are SIMD-accelerated.)
|
||||
|
||||
- **libjpeg: Arithmetic coding**
|
||||
|
||||
- **libjpeg: In-memory source and destination managers**<br>
|
||||
See notes below.
|
||||
|
||||
- **cjpeg: Separate quality settings for luminance and chrominance**<br>
|
||||
Note that the libpjeg v7+ API was extended to accommodate this feature only
|
||||
for convenience purposes. It has always been possible to implement this
|
||||
feature with libjpeg v6b (see rdswitch.c for an example.)
|
||||
|
||||
- **cjpeg: 32-bit BMP support**
|
||||
|
||||
- **cjpeg: `-rgb` option**
|
||||
|
||||
- **jpegtran: Lossless cropping**
|
||||
|
||||
- **jpegtran: `-perfect` option**
|
||||
|
||||
- **jpegtran: Forcing width/height when performing lossless crop**
|
||||
|
||||
- **rdjpgcom: `-raw` option**
|
||||
|
||||
- **rdjpgcom: Locale awareness**
|
||||
|
||||
|
||||
#### Not supported
|
||||
|
||||
NOTE: As of this writing, extensive research has been conducted into the
|
||||
usefulness of DCT scaling as a means of data reduction and SmartScale as a
|
||||
means of quality improvement. The reader is invited to peruse the research at
|
||||
<http://www.libjpeg-turbo.org/About/SmartScale> and draw his/her own conclusions,
|
||||
but it is the general belief of our project that these features have not
|
||||
demonstrated sufficient usefulness to justify inclusion in libjpeg-turbo.
|
||||
|
||||
- **libjpeg: DCT scaling in compressor**<br>
|
||||
`cinfo.scale_num` and `cinfo.scale_denom` are silently ignored.
|
||||
There is no technical reason why DCT scaling could not be supported when
|
||||
emulating the libjpeg v7+ API/ABI, but without the SmartScale extension (see
|
||||
below), only scaling factors of 1/2, 8/15, 4/7, 8/13, 2/3, 8/11, 4/5, and
|
||||
8/9 would be available, which is of limited usefulness.
|
||||
|
||||
- **libjpeg: SmartScale**<br>
|
||||
`cinfo.block_size` is silently ignored.
|
||||
SmartScale is an extension to the JPEG format that allows for DCT block
|
||||
sizes other than 8x8. Providing support for this new format would be
|
||||
feasible (particularly without full acceleration.) However, until/unless
|
||||
the format becomes either an official industry standard or, at minimum, an
|
||||
accepted solution in the community, we are hesitant to implement it, as
|
||||
there is no sense of whether or how it might change in the future. It is
|
||||
our belief that SmartScale has not demonstrated sufficient usefulness as a
|
||||
lossless format nor as a means of quality enhancement, and thus our primary
|
||||
interest in providing this feature would be as a means of supporting
|
||||
additional DCT scaling factors.
|
||||
|
||||
- **libjpeg: Fancy downsampling in compressor**<br>
|
||||
`cinfo.do_fancy_downsampling` is silently ignored.
|
||||
This requires the DCT scaling feature, which is not supported.
|
||||
|
||||
- **jpegtran: Scaling**<br>
|
||||
This requires both the DCT scaling and SmartScale features, which are not
|
||||
supported.
|
||||
|
||||
- **Lossless RGB JPEG files**<br>
|
||||
This requires the SmartScale feature, which is not supported.
|
||||
|
||||
### What About libjpeg v9?
|
||||
|
||||
libjpeg v9 introduced yet another field to the JPEG compression structure
|
||||
(`color_transform`), thus making the ABI backward incompatible with that of
|
||||
libjpeg v8. This new field was introduced solely for the purpose of supporting
|
||||
lossless SmartScale encoding. Furthermore, there was actually no reason to
|
||||
extend the API in this manner, as the color transform could have just as easily
|
||||
been activated by way of a new JPEG colorspace constant, thus preserving
|
||||
backward ABI compatibility.
|
||||
|
||||
Our research (see link above) has shown that lossless SmartScale does not
|
||||
generally accomplish anything that can't already be accomplished better with
|
||||
existing, standard lossless formats. Therefore, at this time it is our belief
|
||||
that there is not sufficient technical justification for software projects to
|
||||
upgrade from libjpeg v8 to libjpeg v9, and thus there is not sufficient
|
||||
technical justification for us to emulate the libjpeg v9 ABI.
|
||||
|
||||
In-Memory Source/Destination Managers
|
||||
-------------------------------------
|
||||
|
||||
By default, libjpeg-turbo 1.3 and later includes the `jpeg_mem_src()` and
|
||||
`jpeg_mem_dest()` functions, even when not emulating the libjpeg v8 API/ABI.
|
||||
Previously, it was necessary to build libjpeg-turbo from source with libjpeg v8
|
||||
API/ABI emulation in order to use the in-memory source/destination managers,
|
||||
but several projects requested that those functions be included when emulating
|
||||
the libjpeg v6b API/ABI as well. This allows the use of those functions by
|
||||
programs that need them, without breaking ABI compatibility for programs that
|
||||
don't, and it allows those functions to be provided in the "official"
|
||||
libjpeg-turbo binaries.
|
||||
|
||||
Those who are concerned about maintaining strict conformance with the libjpeg
|
||||
v6b or v7 API can pass an argument of `-DWITH_MEM_SRCDST=0` to `cmake` prior to
|
||||
building libjpeg-turbo. This will restore the pre-1.3 behavior, in which
|
||||
`jpeg_mem_src()` and `jpeg_mem_dest()` are only included when emulating the
|
||||
libjpeg v8 API/ABI.
|
||||
|
||||
On Un*x systems, including the in-memory source/destination managers changes
|
||||
the dynamic library version from 62.1.0 to 62.2.0 if using libjpeg v6b API/ABI
|
||||
emulation and from 7.1.0 to 7.2.0 if using libjpeg v7 API/ABI emulation.
|
||||
|
||||
Note that, on most Un*x systems, the dynamic linker will not look for a
|
||||
function in a library until that function is actually used. Thus, if a program
|
||||
is built against libjpeg-turbo 1.3+ and uses `jpeg_mem_src()` or
|
||||
`jpeg_mem_dest()`, that program will not fail if run against an older version
|
||||
of libjpeg-turbo or against libjpeg v7- until the program actually tries to
|
||||
call `jpeg_mem_src()` or `jpeg_mem_dest()`. Such is not the case on Windows.
|
||||
If a program is built against the libjpeg-turbo 1.3+ DLL and uses
|
||||
`jpeg_mem_src()` or `jpeg_mem_dest()`, then it must use the libjpeg-turbo 1.3+
|
||||
DLL at run time.
|
||||
|
||||
Both cjpeg and djpeg have been extended to allow testing the in-memory
|
||||
source/destination manager functions. See their respective man pages for more
|
||||
details.
|
||||
|
||||
|
||||
Mathematical Compatibility
|
||||
==========================
|
||||
|
||||
For the most part, libjpeg-turbo should produce identical output to libjpeg
|
||||
v6b. The one exception to this is when using the floating point DCT/IDCT, in
|
||||
which case the outputs of libjpeg v6b and libjpeg-turbo can differ for the
|
||||
following reasons:
|
||||
|
||||
- The SSE/SSE2 floating point DCT implementation in libjpeg-turbo is ever so
|
||||
slightly more accurate than the implementation in libjpeg v6b, but not by
|
||||
any amount perceptible to human vision (generally in the range of 0.01 to
|
||||
0.08 dB gain in PNSR.)
|
||||
|
||||
- When not using the SIMD extensions, libjpeg-turbo uses the more accurate
|
||||
(and slightly faster) floating point IDCT algorithm introduced in libjpeg
|
||||
v8a as opposed to the algorithm used in libjpeg v6b. It should be noted,
|
||||
however, that this algorithm basically brings the accuracy of the floating
|
||||
point IDCT in line with the accuracy of the slow integer IDCT. The floating
|
||||
point DCT/IDCT algorithms are mainly a legacy feature, and they do not
|
||||
produce significantly more accuracy than the slow integer algorithms (to put
|
||||
numbers on this, the typical difference in PNSR between the two algorithms
|
||||
is less than 0.10 dB, whereas changing the quality level by 1 in the upper
|
||||
range of the quality scale is typically more like a 1.0 dB difference.)
|
||||
|
||||
- If the floating point algorithms in libjpeg-turbo are not implemented using
|
||||
SIMD instructions on a particular platform, then the accuracy of the
|
||||
floating point DCT/IDCT can depend on the compiler settings.
|
||||
|
||||
While libjpeg-turbo does emulate the libjpeg v8 API/ABI, under the hood it is
|
||||
still using the same algorithms as libjpeg v6b, so there are several specific
|
||||
cases in which libjpeg-turbo cannot be expected to produce the same output as
|
||||
libjpeg v8:
|
||||
|
||||
- When decompressing using scaling factors of 1/2 and 1/4, because libjpeg v8
|
||||
implements those scaling algorithms differently than libjpeg v6b does, and
|
||||
libjpeg-turbo's SIMD extensions are based on the libjpeg v6b behavior.
|
||||
|
||||
- When using chrominance subsampling, because libjpeg v8 implements this
|
||||
with its DCT/IDCT scaling algorithms rather than with a separate
|
||||
downsampling/upsampling algorithm. In our testing, the subsampled/upsampled
|
||||
output of libjpeg v8 is less accurate than that of libjpeg v6b for this
|
||||
reason.
|
||||
|
||||
- When decompressing using a scaling factor > 1 and merged (AKA "non-fancy" or
|
||||
"non-smooth") chrominance upsampling, because libjpeg v8 does not support
|
||||
merged upsampling with scaling factors > 1.
|
||||
|
||||
|
||||
Performance Pitfalls
|
||||
====================
|
||||
|
||||
Restart Markers
|
||||
---------------
|
||||
|
||||
The optimized Huffman decoder in libjpeg-turbo does not handle restart markers
|
||||
in a way that makes the rest of the libjpeg infrastructure happy, so it is
|
||||
necessary to use the slow Huffman decoder when decompressing a JPEG image that
|
||||
has restart markers. This can cause the decompression performance to drop by
|
||||
as much as 20%, but the performance will still be much greater than that of
|
||||
libjpeg. Many consumer packages, such as PhotoShop, use restart markers when
|
||||
generating JPEG images, so images generated by those programs will experience
|
||||
this issue.
|
||||
|
||||
Fast Integer Forward DCT at High Quality Levels
|
||||
-----------------------------------------------
|
||||
|
||||
The algorithm used by the SIMD-accelerated quantization function cannot produce
|
||||
correct results whenever the fast integer forward DCT is used along with a JPEG
|
||||
quality of 98-100. Thus, libjpeg-turbo must use the non-SIMD quantization
|
||||
function in those cases. This causes performance to drop by as much as 40%.
|
||||
It is therefore strongly advised that you use the slow integer forward DCT
|
||||
whenever encoding images with a JPEG quality of 98 or higher.
|
||||
|
||||
|
||||
Memory Debugger Pitfalls
|
||||
========================
|
||||
|
||||
Valgrind and Memory Sanitizer (MSan) can generate false positives
|
||||
(specifically, incorrect reports of uninitialized memory accesses) when used
|
||||
with libjpeg-turbo's SIMD extensions. It is generally recommended that the
|
||||
SIMD extensions be disabled, either by passing an argument of `-DWITH_SIMD=0`
|
||||
to `cmake` when configuring the build or by setting the environment variable
|
||||
`JSIMD_FORCENONE` to `1` at run time, when testing libjpeg-turbo with Valgrind,
|
||||
MSan, or other memory debuggers.
|
||||
182
acinclude.m4
182
acinclude.m4
@@ -1,182 +0,0 @@
|
||||
# AC_PROG_NASM
|
||||
# --------------------------
|
||||
# Check that NASM exists and determine flags
|
||||
AC_DEFUN([AC_PROG_NASM],[
|
||||
|
||||
AC_CHECK_PROGS(NASM, [nasm nasmw yasm])
|
||||
test -z "$NASM" && AC_MSG_ERROR([no nasm (Netwide Assembler) found])
|
||||
|
||||
AC_MSG_CHECKING([for object file format of host system])
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32* | interix*)
|
||||
case "$host_cpu" in
|
||||
x86_64)
|
||||
objfmt='Win64-COFF'
|
||||
;;
|
||||
*)
|
||||
objfmt='Win32-COFF'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
msdosdjgpp* | go32*)
|
||||
objfmt='COFF'
|
||||
;;
|
||||
os2-emx*) # not tested
|
||||
objfmt='MSOMF' # obj
|
||||
;;
|
||||
linux*coff* | linux*oldld*)
|
||||
objfmt='COFF' # ???
|
||||
;;
|
||||
linux*aout*)
|
||||
objfmt='a.out'
|
||||
;;
|
||||
linux*)
|
||||
case "$host_cpu" in
|
||||
x86_64)
|
||||
objfmt='ELF64'
|
||||
;;
|
||||
*)
|
||||
objfmt='ELF'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
kfreebsd* | freebsd* | netbsd* | openbsd*)
|
||||
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
|
||||
objfmt='BSD-a.out'
|
||||
else
|
||||
case "$host_cpu" in
|
||||
x86_64 | amd64)
|
||||
objfmt='ELF64'
|
||||
;;
|
||||
*)
|
||||
objfmt='ELF'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
solaris* | sunos* | sysv* | sco*)
|
||||
case "$host_cpu" in
|
||||
x86_64)
|
||||
objfmt='ELF64'
|
||||
;;
|
||||
*)
|
||||
objfmt='ELF'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
darwin* | rhapsody* | nextstep* | openstep* | macos*)
|
||||
case "$host_cpu" in
|
||||
x86_64)
|
||||
objfmt='Mach-O64'
|
||||
;;
|
||||
*)
|
||||
objfmt='Mach-O'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
objfmt='ELF ?'
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_RESULT([$objfmt])
|
||||
if test "$objfmt" = 'ELF ?'; then
|
||||
objfmt='ELF'
|
||||
AC_MSG_WARN([unexpected host system. assumed that the format is $objfmt.])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for object file format specifier (NAFLAGS) ])
|
||||
case "$objfmt" in
|
||||
MSOMF) NAFLAGS='-fobj -DOBJ32';;
|
||||
Win32-COFF) NAFLAGS='-fwin32 -DWIN32';;
|
||||
Win64-COFF) NAFLAGS='-fwin64 -DWIN64 -D__x86_64__';;
|
||||
COFF) NAFLAGS='-fcoff -DCOFF';;
|
||||
a.out) NAFLAGS='-faout -DAOUT';;
|
||||
BSD-a.out) NAFLAGS='-faoutb -DAOUT';;
|
||||
ELF) NAFLAGS='-felf -DELF';;
|
||||
ELF64) NAFLAGS='-felf64 -DELF -D__x86_64__';;
|
||||
RDF) NAFLAGS='-frdf -DRDF';;
|
||||
Mach-O) NAFLAGS='-fmacho -DMACHO';;
|
||||
Mach-O64) NAFLAGS='-fmacho64 -DMACHO -D__x86_64__';;
|
||||
esac
|
||||
AC_MSG_RESULT([$NAFLAGS])
|
||||
AC_SUBST([NAFLAGS])
|
||||
|
||||
AC_MSG_CHECKING([whether the assembler ($NASM $NAFLAGS) works])
|
||||
cat > conftest.asm <<EOF
|
||||
[%line __oline__ "configure"
|
||||
section .text
|
||||
global _main,main
|
||||
_main:
|
||||
main: xor eax,eax
|
||||
ret
|
||||
]EOF
|
||||
try_nasm='$NASM $NAFLAGS -o conftest.o conftest.asm'
|
||||
if AC_TRY_EVAL(try_nasm) && test -s conftest.o; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.asm >&AC_FD_CC
|
||||
rm -rf conftest*
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([installation or configuration problem: assembler cannot create object files.])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([whether the linker accepts assembler output])
|
||||
try_nasm='${CC-cc} -o conftest${ac_exeext} $LDFLAGS conftest.o $LIBS 1>&AC_FD_CC'
|
||||
if AC_TRY_EVAL(try_nasm) && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
rm -rf conftest*
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([configuration problem: maybe object file format mismatch.])
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
# AC_CHECK_COMPATIBLE_ARM_ASSEMBLER_IFELSE
|
||||
# --------------------------
|
||||
# Test whether the assembler is suitable and supports NEON instructions
|
||||
AC_DEFUN([AC_CHECK_COMPATIBLE_ARM_ASSEMBLER_IFELSE],[
|
||||
ac_good_gnu_arm_assembler=no
|
||||
ac_save_CC="$CC"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CCASFLAGS -x assembler-with-cpp"
|
||||
CC="$CCAS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
.text
|
||||
.fpu neon
|
||||
.arch armv7a
|
||||
.object_arch armv4
|
||||
.arm
|
||||
pld [r0]
|
||||
vmovn.u16 d0, q0]])], ac_good_gnu_arm_assembler=yes)
|
||||
|
||||
ac_use_gas_preprocessor=no
|
||||
if test "x$ac_good_gnu_arm_assembler" = "xno" ; then
|
||||
CC="gas-preprocessor.pl $CCAS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
.text
|
||||
.fpu neon
|
||||
.arch armv7a
|
||||
.object_arch armv4
|
||||
.arm
|
||||
pld [r0]
|
||||
vmovn.u16 d0, q0]])], ac_use_gas_preprocessor=yes)
|
||||
fi
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
CC="$ac_save_CC"
|
||||
|
||||
if test "x$ac_use_gas_preprocessor" = "xyes" ; then
|
||||
CCAS="gas-preprocessor.pl $CCAS"
|
||||
AC_SUBST([CCAS])
|
||||
ac_good_gnu_arm_assembler=yes
|
||||
fi
|
||||
|
||||
if test "x$ac_good_gnu_arm_assembler" = "xyes" ; then
|
||||
$1
|
||||
else
|
||||
$2
|
||||
fi
|
||||
])
|
||||
60
appveyor.yml
Normal file
60
appveyor.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
install:
|
||||
- cmd: >-
|
||||
if not exist c:\installers mkdir c:\installers
|
||||
|
||||
mkdir c:\temp
|
||||
|
||||
if not exist c:\installers\nasm-2.10.01-win32.zip curl -fSL -o c:\installers\nasm-2.10.01-win32.zip http://www.nasm.us/pub/nasm/releasebuilds/2.10.01/win32/nasm-2.10.01-win32.zip
|
||||
|
||||
7z x c:\installers\nasm-2.10.01-win32.zip -oc:\ > c:\installers\nasm.install.log
|
||||
|
||||
set INCLUDE=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\include
|
||||
|
||||
set LIB=c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\lib\x64
|
||||
|
||||
set PATH=c:\nasm-2.10.01;c:\Program Files (x86)\NSIS;c:\msys64\mingw32\bin;c:\msys64\usr\bin;c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64;c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\bin\x64;c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\bin;%PATH%
|
||||
|
||||
set MSYSTEM=MINGW32
|
||||
|
||||
bash -c "pacman --noconfirm -S zip"
|
||||
|
||||
mklink /d "%ProgramData%\Oracle\Java32" "c:\Program Files (x86)\Java\jdk1.6.0"
|
||||
|
||||
git clone --depth=1 https://github.com/libjpeg-turbo/buildscripts.git -b %APPVEYOR_REPO_BRANCH% c:/buildscripts
|
||||
|
||||
cache:
|
||||
- c:\installers\nasm-2.10.01-win32.zip -> appveyor.yml
|
||||
|
||||
build_script:
|
||||
- cmd: >-
|
||||
for /f %%i in ('"cygpath %CD%"') do set MINGWPATH=%%i
|
||||
|
||||
bash c:/buildscripts/buildljt -d %MINGWPATH% -b /c/ljt.nightly -v
|
||||
|
||||
move c:\ljt.nightly\files\*.tar.gz .
|
||||
|
||||
move c:\ljt.nightly\files\*.exe .
|
||||
|
||||
move c:\ljt.nightly\files\*.zip .
|
||||
|
||||
move c:\ljt.nightly\log-windows.txt .
|
||||
|
||||
artifacts:
|
||||
- path: '*.tar.gz'
|
||||
name: Source tarball
|
||||
|
||||
- path: '*-gcc*.exe'
|
||||
name: SDK for MinGW
|
||||
|
||||
- path: '*-vc*.exe'
|
||||
name: SDK for Visual C++
|
||||
|
||||
- path: '*.zip'
|
||||
name: Windows JNI JARs
|
||||
|
||||
- path: 'log-windows.txt'
|
||||
name: Build log
|
||||
|
||||
test: off
|
||||
|
||||
deploy: off
|
||||
274
bmp.c
274
bmp.c
@@ -1,274 +0,0 @@
|
||||
/*
|
||||
* Copyright (C)2011 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* - Neither the name of the libjpeg-turbo Project nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <setjmp.h>
|
||||
#include <errno.h>
|
||||
#include "cdjpeg.h"
|
||||
#include <jpeglib.h>
|
||||
#include <jpegint.h>
|
||||
#include "tjutil.h"
|
||||
#include "bmp.h"
|
||||
|
||||
|
||||
/* This duplicates the functionality of the VirtualGL bitmap library using
|
||||
the components from cjpeg and djpeg */
|
||||
|
||||
|
||||
/* Error handling (based on example in example.c) */
|
||||
|
||||
static char errStr[JMSG_LENGTH_MAX]="No error";
|
||||
|
||||
struct my_error_mgr
|
||||
{
|
||||
struct jpeg_error_mgr pub;
|
||||
jmp_buf setjmp_buffer;
|
||||
};
|
||||
typedef struct my_error_mgr *my_error_ptr;
|
||||
|
||||
static void my_error_exit(j_common_ptr cinfo)
|
||||
{
|
||||
my_error_ptr myerr=(my_error_ptr)cinfo->err;
|
||||
(*cinfo->err->output_message)(cinfo);
|
||||
longjmp(myerr->setjmp_buffer, 1);
|
||||
}
|
||||
|
||||
/* Based on output_message() in jerror.c */
|
||||
|
||||
static void my_output_message(j_common_ptr cinfo)
|
||||
{
|
||||
(*cinfo->err->format_message)(cinfo, errStr);
|
||||
}
|
||||
|
||||
#define _throw(m) {snprintf(errStr, JMSG_LENGTH_MAX, "%s", m); \
|
||||
retval=-1; goto bailout;}
|
||||
#define _throwunix(m) {snprintf(errStr, JMSG_LENGTH_MAX, "%s\n%s", m, \
|
||||
strerror(errno)); retval=-1; goto bailout;}
|
||||
|
||||
|
||||
static void pixelconvert(unsigned char *srcbuf, int srcpf, int srcbottomup,
|
||||
unsigned char *dstbuf, int dstpf, int dstbottomup, int w, int h)
|
||||
{
|
||||
unsigned char *srcptr=srcbuf, *srcptr2;
|
||||
int srcps=tjPixelSize[srcpf];
|
||||
int srcstride=srcbottomup? -w*srcps:w*srcps;
|
||||
unsigned char *dstptr=dstbuf, *dstptr2;
|
||||
int dstps=tjPixelSize[dstpf];
|
||||
int dststride=dstbottomup? -w*dstps:w*dstps;
|
||||
int row, col;
|
||||
|
||||
if(srcbottomup) srcptr=&srcbuf[w*srcps*(h-1)];
|
||||
if(dstbottomup) dstptr=&dstbuf[w*dstps*(h-1)];
|
||||
for(row=0; row<h; row++, srcptr+=srcstride, dstptr+=dststride)
|
||||
{
|
||||
for(col=0, srcptr2=srcptr, dstptr2=dstptr; col<w; col++, srcptr2+=srcps,
|
||||
dstptr2+=dstps)
|
||||
{
|
||||
dstptr2[tjRedOffset[dstpf]]=srcptr2[tjRedOffset[srcpf]];
|
||||
dstptr2[tjGreenOffset[dstpf]]=srcptr2[tjGreenOffset[srcpf]];
|
||||
dstptr2[tjBlueOffset[dstpf]]=srcptr2[tjBlueOffset[srcpf]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int loadbmp(char *filename, unsigned char **buf, int *w, int *h,
|
||||
int dstpf, int bottomup)
|
||||
{
|
||||
int retval=0, dstps, srcpf, tempc;
|
||||
struct jpeg_compress_struct cinfo;
|
||||
struct my_error_mgr jerr;
|
||||
cjpeg_source_ptr src;
|
||||
FILE *file=NULL;
|
||||
|
||||
memset(&cinfo, 0, sizeof(struct jpeg_compress_struct));
|
||||
|
||||
if(!filename || !buf || !w || !h || dstpf<0 || dstpf>=TJ_NUMPF)
|
||||
_throw("loadbmp(): Invalid argument");
|
||||
|
||||
if((file=fopen(filename, "rb"))==NULL)
|
||||
_throwunix("loadbmp(): Cannot open input file");
|
||||
|
||||
cinfo.err=jpeg_std_error(&jerr.pub);
|
||||
jerr.pub.error_exit=my_error_exit;
|
||||
jerr.pub.output_message=my_output_message;
|
||||
|
||||
if(setjmp(jerr.setjmp_buffer))
|
||||
{
|
||||
/* If we get here, the JPEG code has signaled an error. */
|
||||
retval=-1; goto bailout;
|
||||
}
|
||||
|
||||
jpeg_create_compress(&cinfo);
|
||||
if((tempc=getc(file))<0 || ungetc(tempc, file)==EOF)
|
||||
_throwunix("loadbmp(): Could not read input file")
|
||||
else if(tempc==EOF) _throw("loadbmp(): Input file contains no data");
|
||||
|
||||
if(tempc=='B')
|
||||
{
|
||||
if((src=jinit_read_bmp(&cinfo))==NULL)
|
||||
_throw("loadbmp(): Could not initialize bitmap loader");
|
||||
}
|
||||
else if(tempc=='P')
|
||||
{
|
||||
if((src=jinit_read_ppm(&cinfo))==NULL)
|
||||
_throw("loadbmp(): Could not initialize bitmap loader");
|
||||
}
|
||||
else _throw("loadbmp(): Unsupported file type");
|
||||
|
||||
src->input_file=file;
|
||||
(*src->start_input)(&cinfo, src);
|
||||
(*cinfo.mem->realize_virt_arrays)((j_common_ptr)&cinfo);
|
||||
|
||||
*w=cinfo.image_width; *h=cinfo.image_height;
|
||||
|
||||
if(cinfo.input_components==1 && cinfo.in_color_space==JCS_RGB)
|
||||
srcpf=TJPF_GRAY;
|
||||
else srcpf=TJPF_RGB;
|
||||
|
||||
dstps=tjPixelSize[dstpf];
|
||||
if((*buf=(unsigned char *)malloc((*w)*(*h)*dstps))==NULL)
|
||||
_throw("loadbmp(): Memory allocation failure");
|
||||
|
||||
while(cinfo.next_scanline<cinfo.image_height)
|
||||
{
|
||||
int i, nlines=(*src->get_pixel_rows)(&cinfo, src);
|
||||
for(i=0; i<nlines; i++)
|
||||
{
|
||||
unsigned char *outbuf; int row;
|
||||
row=cinfo.next_scanline+i;
|
||||
if(bottomup) outbuf=&(*buf)[((*h)-row-1)*(*w)*dstps];
|
||||
else outbuf=&(*buf)[row*(*w)*dstps];
|
||||
pixelconvert(src->buffer[i], srcpf, 0, outbuf, dstpf, bottomup, *w,
|
||||
nlines);
|
||||
}
|
||||
cinfo.next_scanline+=nlines;
|
||||
}
|
||||
|
||||
(*src->finish_input)(&cinfo, src);
|
||||
|
||||
bailout:
|
||||
jpeg_destroy_compress(&cinfo);
|
||||
if(file) fclose(file);
|
||||
if(retval<0 && buf && *buf) {free(*buf); *buf=NULL;}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
int savebmp(char *filename, unsigned char *buf, int w, int h, int srcpf,
|
||||
int bottomup)
|
||||
{
|
||||
int retval=0, srcps, dstpf;
|
||||
struct jpeg_decompress_struct dinfo;
|
||||
struct my_error_mgr jerr;
|
||||
djpeg_dest_ptr dst;
|
||||
FILE *file=NULL;
|
||||
char *ptr=NULL;
|
||||
|
||||
memset(&dinfo, 0, sizeof(struct jpeg_decompress_struct));
|
||||
|
||||
if(!filename || !buf || w<1 || h<1 || srcpf<0 || srcpf>=TJ_NUMPF)
|
||||
_throw("savebmp(): Invalid argument");
|
||||
|
||||
if((file=fopen(filename, "wb"))==NULL)
|
||||
_throwunix("savebmp(): Cannot open output file");
|
||||
|
||||
dinfo.err=jpeg_std_error(&jerr.pub);
|
||||
jerr.pub.error_exit=my_error_exit;
|
||||
jerr.pub.output_message=my_output_message;
|
||||
|
||||
if(setjmp(jerr.setjmp_buffer))
|
||||
{
|
||||
/* If we get here, the JPEG code has signaled an error. */
|
||||
retval=-1; goto bailout;
|
||||
}
|
||||
|
||||
jpeg_create_decompress(&dinfo);
|
||||
if(srcpf==TJPF_GRAY)
|
||||
{
|
||||
dinfo.out_color_components=dinfo.output_components=1;
|
||||
dinfo.out_color_space=JCS_GRAYSCALE;
|
||||
}
|
||||
else
|
||||
{
|
||||
dinfo.out_color_components=dinfo.output_components=3;
|
||||
dinfo.out_color_space=JCS_RGB;
|
||||
}
|
||||
dinfo.image_width=w; dinfo.image_height=h;
|
||||
dinfo.global_state=DSTATE_READY;
|
||||
dinfo.scale_num=dinfo.scale_denom=1;
|
||||
|
||||
ptr=strrchr(filename, '.');
|
||||
if(ptr && !strcasecmp(ptr, ".bmp"))
|
||||
{
|
||||
if((dst=jinit_write_bmp(&dinfo, 0))==NULL)
|
||||
_throw("savebmp(): Could not initialize bitmap writer");
|
||||
}
|
||||
else
|
||||
{
|
||||
if((dst=jinit_write_ppm(&dinfo))==NULL)
|
||||
_throw("savebmp(): Could not initialize PPM writer");
|
||||
}
|
||||
|
||||
dst->output_file=file;
|
||||
(*dst->start_output)(&dinfo, dst);
|
||||
(*dinfo.mem->realize_virt_arrays)((j_common_ptr)&dinfo);
|
||||
|
||||
if(srcpf==TJPF_GRAY) dstpf=srcpf;
|
||||
else dstpf=TJPF_RGB;
|
||||
srcps=tjPixelSize[srcpf];
|
||||
|
||||
while(dinfo.output_scanline<dinfo.output_height)
|
||||
{
|
||||
int i, nlines=dst->buffer_height;
|
||||
for(i=0; i<nlines; i++)
|
||||
{
|
||||
unsigned char *inbuf; int row;
|
||||
row=dinfo.output_scanline+i;
|
||||
if(bottomup) inbuf=&buf[(h-row-1)*w*srcps];
|
||||
else inbuf=&buf[row*w*srcps];
|
||||
pixelconvert(inbuf, srcpf, bottomup, dst->buffer[i], dstpf, 0, w,
|
||||
nlines);
|
||||
}
|
||||
(*dst->put_pixel_rows)(&dinfo, dst, nlines);
|
||||
dinfo.output_scanline+=nlines;
|
||||
}
|
||||
|
||||
(*dst->finish_output)(&dinfo, dst);
|
||||
|
||||
bailout:
|
||||
jpeg_destroy_decompress(&dinfo);
|
||||
if(file) fclose(file);
|
||||
return retval;
|
||||
}
|
||||
|
||||
const char *bmpgeterr(void)
|
||||
{
|
||||
return errStr;
|
||||
}
|
||||
13
cderror.h
13
cderror.h
@@ -2,9 +2,10 @@
|
||||
* cderror.h
|
||||
*
|
||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||
* Modified 2009 by Guido Vollbeding.
|
||||
* Modified 2009-2017 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
* This file defines the error and message codes for the cjpeg/djpeg
|
||||
* applications. These strings are not needed as part of the JPEG library
|
||||
@@ -25,7 +26,7 @@
|
||||
#define JMAKE_ENUM_LIST
|
||||
#else
|
||||
/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */
|
||||
#define JMESSAGE(code,string)
|
||||
#define JMESSAGE(code, string)
|
||||
#endif /* CDERROR_H */
|
||||
#endif /* JMESSAGE */
|
||||
|
||||
@@ -33,11 +34,11 @@
|
||||
|
||||
typedef enum {
|
||||
|
||||
#define JMESSAGE(code,string) code ,
|
||||
#define JMESSAGE(code, string) code,
|
||||
|
||||
#endif /* JMAKE_ENUM_LIST */
|
||||
|
||||
JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */
|
||||
JMESSAGE(JMSG_FIRSTADDONCODE = 1000, NULL) /* Must be first entry! */
|
||||
|
||||
#ifdef BMP_SUPPORTED
|
||||
JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format")
|
||||
@@ -48,6 +49,7 @@ JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB")
|
||||
JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported")
|
||||
JMESSAGE(JERR_BMP_EMPTY, "Empty BMP image")
|
||||
JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM")
|
||||
JMESSAGE(JERR_BMP_OUTOFRANGE, "Numeric value out of range in BMP file")
|
||||
JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image")
|
||||
JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image")
|
||||
JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image")
|
||||
@@ -75,6 +77,7 @@ JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits")
|
||||
JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB")
|
||||
JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file")
|
||||
JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file")
|
||||
JMESSAGE(JERR_PPM_OUTOFRANGE, "Numeric value out of range in PPM file")
|
||||
JMESSAGE(JTRC_PGM, "%ux%u PGM image")
|
||||
JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image")
|
||||
JMESSAGE(JTRC_PPM, "%ux%u PPM image")
|
||||
|
||||
68
cdjpeg.c
68
cdjpeg.c
@@ -1,9 +1,12 @@
|
||||
/*
|
||||
* cdjpeg.c
|
||||
*
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
* It was modified by The libjpeg-turbo Project to include only code relevant
|
||||
* to libjpeg-turbo.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
* This file contains common support routines used by the IJG application
|
||||
* programs (cjpeg, djpeg, jpegtran).
|
||||
@@ -11,9 +14,6 @@
|
||||
|
||||
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||
#include <ctype.h> /* to declare isupper(), tolower() */
|
||||
#ifdef NEED_SIGNAL_CATCHER
|
||||
#include <signal.h> /* to declare signal() */
|
||||
#endif
|
||||
#ifdef USE_SETMODE
|
||||
#include <fcntl.h> /* to declare setmode()'s parameter macros */
|
||||
/* If you have setmode() but not <io.h>, just delete this line: */
|
||||
@@ -21,43 +21,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Signal catcher to ensure that temporary files are removed before aborting.
|
||||
* NB: for Amiga Manx C this is actually a global routine named _abort();
|
||||
* we put "#define signal_catcher _abort" in jconfig.h. Talk about bogus...
|
||||
*/
|
||||
|
||||
#ifdef NEED_SIGNAL_CATCHER
|
||||
|
||||
static j_common_ptr sig_cinfo;
|
||||
|
||||
void /* must be global for Manx C */
|
||||
signal_catcher (int signum)
|
||||
{
|
||||
if (sig_cinfo != NULL) {
|
||||
if (sig_cinfo->err != NULL) /* turn off trace output */
|
||||
sig_cinfo->err->trace_level = 0;
|
||||
jpeg_destroy(sig_cinfo); /* clean up memory allocation & temp files */
|
||||
}
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
GLOBAL(void)
|
||||
enable_signal_catcher (j_common_ptr cinfo)
|
||||
{
|
||||
sig_cinfo = cinfo;
|
||||
#ifdef SIGINT /* not all systems have SIGINT */
|
||||
signal(SIGINT, signal_catcher);
|
||||
#endif
|
||||
#ifdef SIGTERM /* not all systems have SIGTERM */
|
||||
signal(SIGTERM, signal_catcher);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Optional progress monitor: display a percent-done figure on stderr.
|
||||
*/
|
||||
@@ -65,11 +28,12 @@ enable_signal_catcher (j_common_ptr cinfo)
|
||||
#ifdef PROGRESS_REPORT
|
||||
|
||||
METHODDEF(void)
|
||||
progress_monitor (j_common_ptr cinfo)
|
||||
progress_monitor(j_common_ptr cinfo)
|
||||
{
|
||||
cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress;
|
||||
cd_progress_ptr prog = (cd_progress_ptr)cinfo->progress;
|
||||
int total_passes = prog->pub.total_passes + prog->total_extra_passes;
|
||||
int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit);
|
||||
int percent_done =
|
||||
(int)(prog->pub.pass_counter * 100L / prog->pub.pass_limit);
|
||||
|
||||
if (percent_done != prog->percent_done) {
|
||||
prog->percent_done = percent_done;
|
||||
@@ -86,7 +50,7 @@ progress_monitor (j_common_ptr cinfo)
|
||||
|
||||
|
||||
GLOBAL(void)
|
||||
start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress)
|
||||
start_progress_monitor(j_common_ptr cinfo, cd_progress_ptr progress)
|
||||
{
|
||||
/* Enable progress display, unless trace output is on */
|
||||
if (cinfo->err->trace_level == 0) {
|
||||
@@ -100,7 +64,7 @@ start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress)
|
||||
|
||||
|
||||
GLOBAL(void)
|
||||
end_progress_monitor (j_common_ptr cinfo)
|
||||
end_progress_monitor(j_common_ptr cinfo)
|
||||
{
|
||||
/* Clear away progress display */
|
||||
if (cinfo->err->trace_level == 0) {
|
||||
@@ -119,7 +83,7 @@ end_progress_monitor (j_common_ptr cinfo)
|
||||
*/
|
||||
|
||||
GLOBAL(boolean)
|
||||
keymatch (char * arg, const char * keyword, int minchars)
|
||||
keymatch(char *arg, const char *keyword, int minchars)
|
||||
{
|
||||
register int ca, ck;
|
||||
register int nmatched = 0;
|
||||
@@ -146,9 +110,9 @@ keymatch (char * arg, const char * keyword, int minchars)
|
||||
*/
|
||||
|
||||
GLOBAL(FILE *)
|
||||
read_stdin (void)
|
||||
read_stdin(void)
|
||||
{
|
||||
FILE * input_file = stdin;
|
||||
FILE *input_file = stdin;
|
||||
|
||||
#ifdef USE_SETMODE /* need to hack file mode? */
|
||||
setmode(fileno(stdin), O_BINARY);
|
||||
@@ -164,9 +128,9 @@ read_stdin (void)
|
||||
|
||||
|
||||
GLOBAL(FILE *)
|
||||
write_stdout (void)
|
||||
write_stdout(void)
|
||||
{
|
||||
FILE * output_file = stdout;
|
||||
FILE *output_file = stdout;
|
||||
|
||||
#ifdef USE_SETMODE /* need to hack file mode? */
|
||||
setmode(fileno(stdout), O_BINARY);
|
||||
|
||||
138
cdjpeg.h
138
cdjpeg.h
@@ -1,9 +1,12 @@
|
||||
/*
|
||||
* cdjpeg.h
|
||||
*
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1994-1997, Thomas G. Lane.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2017, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
* This file contains common declarations for the sample applications
|
||||
* cjpeg and djpeg. It is NOT used by the core JPEG library.
|
||||
@@ -21,15 +24,12 @@
|
||||
* Object interface for cjpeg's source file decoding modules
|
||||
*/
|
||||
|
||||
typedef struct cjpeg_source_struct * cjpeg_source_ptr;
|
||||
typedef struct cjpeg_source_struct *cjpeg_source_ptr;
|
||||
|
||||
struct cjpeg_source_struct {
|
||||
JMETHOD(void, start_input, (j_compress_ptr cinfo,
|
||||
cjpeg_source_ptr sinfo));
|
||||
JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo,
|
||||
cjpeg_source_ptr sinfo));
|
||||
JMETHOD(void, finish_input, (j_compress_ptr cinfo,
|
||||
cjpeg_source_ptr sinfo));
|
||||
void (*start_input) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
|
||||
JDIMENSION (*get_pixel_rows) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
|
||||
void (*finish_input) (j_compress_ptr cinfo, cjpeg_source_ptr sinfo);
|
||||
|
||||
FILE *input_file;
|
||||
|
||||
@@ -42,24 +42,29 @@ struct cjpeg_source_struct {
|
||||
* Object interface for djpeg's output file encoding modules
|
||||
*/
|
||||
|
||||
typedef struct djpeg_dest_struct * djpeg_dest_ptr;
|
||||
typedef struct djpeg_dest_struct *djpeg_dest_ptr;
|
||||
|
||||
struct djpeg_dest_struct {
|
||||
/* start_output is called after jpeg_start_decompress finishes.
|
||||
* The color map will be ready at this time, if one is needed.
|
||||
*/
|
||||
JMETHOD(void, start_output, (j_decompress_ptr cinfo,
|
||||
djpeg_dest_ptr dinfo));
|
||||
void (*start_output) (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo);
|
||||
/* Emit the specified number of pixel rows from the buffer. */
|
||||
JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo,
|
||||
djpeg_dest_ptr dinfo,
|
||||
JDIMENSION rows_supplied));
|
||||
void (*put_pixel_rows) (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
|
||||
JDIMENSION rows_supplied);
|
||||
/* Finish up at the end of the image. */
|
||||
JMETHOD(void, finish_output, (j_decompress_ptr cinfo,
|
||||
djpeg_dest_ptr dinfo));
|
||||
void (*finish_output) (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo);
|
||||
/* Re-calculate buffer dimensions based on output dimensions (for use with
|
||||
partial image decompression.) If this is NULL, then the output format
|
||||
does not support partial image decompression (BMP and RLE, in particular,
|
||||
cannot support partial decompression because they use an inversion buffer
|
||||
to write the image in bottom-up order.) */
|
||||
void (*calc_buffer_dimensions) (j_decompress_ptr cinfo,
|
||||
djpeg_dest_ptr dinfo);
|
||||
|
||||
|
||||
/* Target file spec; filled in by djpeg.c after object is created. */
|
||||
FILE * output_file;
|
||||
FILE *output_file;
|
||||
|
||||
/* Output pixel-row buffer. Created by module init or start_output.
|
||||
* Width is cinfo->output_width * cinfo->output_components;
|
||||
@@ -86,72 +91,47 @@ struct cdjpeg_progress_mgr {
|
||||
int percent_done;
|
||||
};
|
||||
|
||||
typedef struct cdjpeg_progress_mgr * cd_progress_ptr;
|
||||
typedef struct cdjpeg_progress_mgr *cd_progress_ptr;
|
||||
|
||||
|
||||
/* Short forms of external names for systems with brain-damaged linkers. */
|
||||
|
||||
#ifdef NEED_SHORT_EXTERNAL_NAMES
|
||||
#define jinit_read_bmp jIRdBMP
|
||||
#define jinit_write_bmp jIWrBMP
|
||||
#define jinit_read_gif jIRdGIF
|
||||
#define jinit_write_gif jIWrGIF
|
||||
#define jinit_read_ppm jIRdPPM
|
||||
#define jinit_write_ppm jIWrPPM
|
||||
#define jinit_read_rle jIRdRLE
|
||||
#define jinit_write_rle jIWrRLE
|
||||
#define jinit_read_targa jIRdTarga
|
||||
#define jinit_write_targa jIWrTarga
|
||||
#define read_quant_tables RdQTables
|
||||
#define read_scan_script RdScnScript
|
||||
#define set_quality_ratings SetQRates
|
||||
#define set_quant_slots SetQSlots
|
||||
#define set_sample_factors SetSFacts
|
||||
#define read_color_map RdCMap
|
||||
#define enable_signal_catcher EnSigCatcher
|
||||
#define start_progress_monitor StProgMon
|
||||
#define end_progress_monitor EnProgMon
|
||||
#define read_stdin RdStdin
|
||||
#define write_stdout WrStdout
|
||||
#endif /* NEED_SHORT_EXTERNAL_NAMES */
|
||||
|
||||
/* Module selection routines for I/O modules. */
|
||||
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo));
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo,
|
||||
boolean is_os2));
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo));
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo));
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo));
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo));
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo));
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_bmp(j_compress_ptr cinfo,
|
||||
boolean use_inversion_array);
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_bmp(j_decompress_ptr cinfo, boolean is_os2,
|
||||
boolean use_inversion_array);
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_gif(j_compress_ptr cinfo);
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_gif(j_decompress_ptr cinfo);
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_ppm(j_compress_ptr cinfo);
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_ppm(j_decompress_ptr cinfo);
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_rle(j_compress_ptr cinfo);
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_rle(j_decompress_ptr cinfo);
|
||||
EXTERN(cjpeg_source_ptr) jinit_read_targa(j_compress_ptr cinfo);
|
||||
EXTERN(djpeg_dest_ptr) jinit_write_targa(j_decompress_ptr cinfo);
|
||||
|
||||
/* cjpeg support routines (in rdswitch.c) */
|
||||
|
||||
EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename,
|
||||
boolean force_baseline));
|
||||
EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename));
|
||||
EXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg,
|
||||
boolean force_baseline));
|
||||
EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg));
|
||||
EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg));
|
||||
EXTERN(boolean) read_quant_tables(j_compress_ptr cinfo, char *filename,
|
||||
boolean force_baseline);
|
||||
EXTERN(boolean) read_scan_script(j_compress_ptr cinfo, char *filename);
|
||||
EXTERN(boolean) set_quality_ratings(j_compress_ptr cinfo, char *arg,
|
||||
boolean force_baseline);
|
||||
EXTERN(boolean) set_quant_slots(j_compress_ptr cinfo, char *arg);
|
||||
EXTERN(boolean) set_sample_factors(j_compress_ptr cinfo, char *arg);
|
||||
|
||||
/* djpeg support routines (in rdcolmap.c) */
|
||||
|
||||
EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile));
|
||||
EXTERN(void) read_color_map(j_decompress_ptr cinfo, FILE *infile);
|
||||
|
||||
/* common support routines (in cdjpeg.c) */
|
||||
|
||||
EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo));
|
||||
EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo,
|
||||
cd_progress_ptr progress));
|
||||
EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo));
|
||||
EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars));
|
||||
EXTERN(FILE *) read_stdin JPP((void));
|
||||
EXTERN(FILE *) write_stdout JPP((void));
|
||||
EXTERN(void) enable_signal_catcher(j_common_ptr cinfo);
|
||||
EXTERN(void) start_progress_monitor(j_common_ptr cinfo,
|
||||
cd_progress_ptr progress);
|
||||
EXTERN(void) end_progress_monitor(j_common_ptr cinfo);
|
||||
EXTERN(boolean) keymatch(char *arg, const char *keyword, int minchars);
|
||||
EXTERN(FILE *) read_stdin(void);
|
||||
EXTERN(FILE *) write_stdout(void);
|
||||
|
||||
/* miscellaneous useful macros */
|
||||
|
||||
@@ -159,29 +139,19 @@ EXTERN(FILE *) write_stdout JPP((void));
|
||||
#define READ_BINARY "r"
|
||||
#define WRITE_BINARY "w"
|
||||
#else
|
||||
#ifdef VMS /* VMS is very nonstandard */
|
||||
#define READ_BINARY "rb", "ctx=stm"
|
||||
#define WRITE_BINARY "wb", "ctx=stm"
|
||||
#else /* standard ANSI-compliant case */
|
||||
#define READ_BINARY "rb"
|
||||
#define WRITE_BINARY "wb"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EXIT_FAILURE /* define exit() codes if not provided */
|
||||
#define EXIT_FAILURE 1
|
||||
#endif
|
||||
#ifndef EXIT_SUCCESS
|
||||
#ifdef VMS
|
||||
#define EXIT_SUCCESS 1 /* VMS is very nonstandard */
|
||||
#else
|
||||
#define EXIT_SUCCESS 0
|
||||
#endif
|
||||
#endif
|
||||
#ifndef EXIT_WARNING
|
||||
#ifdef VMS
|
||||
#define EXIT_WARNING 1 /* VMS is very nonstandard */
|
||||
#else
|
||||
#define EXIT_WARNING 2
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define IsExtRGB(cs) \
|
||||
(cs == JCS_RGB || (cs >= JCS_EXT_RGB && cs <= JCS_EXT_ARGB))
|
||||
|
||||
23
change.log
23
change.log
@@ -1,9 +1,28 @@
|
||||
NOTE: This file was modified by The libjpeg-turbo Project to include only
|
||||
information relevant to libjpeg-turbo.
|
||||
libjpeg-turbo note: This file has been modified by The libjpeg-turbo Project
|
||||
to include only information relevant to libjpeg-turbo. It is included only for
|
||||
reference. Please see ChangeLog.md for information specific to libjpeg-turbo.
|
||||
|
||||
|
||||
CHANGE LOG for Independent JPEG Group's JPEG software
|
||||
|
||||
|
||||
Version 9b 17-Jan-2016
|
||||
-----------------------
|
||||
|
||||
Document 'f' specifier for jpegtran -crop specification.
|
||||
Thank to Michele Martone for suggestion.
|
||||
|
||||
|
||||
Version 9 13-Jan-2013
|
||||
----------------------
|
||||
|
||||
Add remark for jpeg_mem_dest() in jdatadst.c.
|
||||
Thank to Elie-Gregoire Khoury for the hint.
|
||||
|
||||
Correct argument type in format string, avoid compiler warnings.
|
||||
Thank to Vincent Torri for hint.
|
||||
|
||||
|
||||
Version 8d 15-Jan-2012
|
||||
-----------------------
|
||||
|
||||
|
||||
BIN
ci/keys.enc
Normal file
BIN
ci/keys.enc
Normal file
Binary file not shown.
54
cjpeg.1
54
cjpeg.1
@@ -1,4 +1,4 @@
|
||||
.TH CJPEG 1 "18 January 2013"
|
||||
.TH CJPEG 1 "18 March 2017"
|
||||
.SH NAME
|
||||
cjpeg \- compress an image file to a JPEG file
|
||||
.SH SYNOPSIS
|
||||
@@ -16,7 +16,7 @@ cjpeg \- compress an image file to a JPEG file
|
||||
compresses the named image file, or the standard input if no file is
|
||||
named, and produces a JPEG/JFIF file on the standard output.
|
||||
The currently supported input file formats are: PPM (PBMPLUS color
|
||||
format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster
|
||||
format), PGM (PBMPLUS grayscale format), BMP, Targa, and RLE (Utah Raster
|
||||
Toolkit format). (RLE is supported only if the URT library is available.)
|
||||
.SH OPTIONS
|
||||
All switch names may be abbreviated; for example,
|
||||
@@ -46,7 +46,7 @@ compressing a grayscale BMP file, because
|
||||
.B cjpeg
|
||||
isn't bright enough to notice whether a BMP file uses only shades of gray.
|
||||
By saying
|
||||
.BR \-grayscale ,
|
||||
.BR \-grayscale,
|
||||
you'll get a smaller JPEG file that takes less time to process.
|
||||
.TP
|
||||
.B \-rgb
|
||||
@@ -85,8 +85,8 @@ reconstructed image: the higher the quality setting, the larger the JPEG file,
|
||||
and the closer the output image will be to the original input. Normally you
|
||||
want to use the lowest quality setting (smallest file) that decompresses into
|
||||
something visually indistinguishable from the original image. For this
|
||||
purpose the quality setting should be between 50 and 95; the default of 75 is
|
||||
often about right. If you see defects at
|
||||
purpose the quality setting should generally be between 50 and 95 (the default
|
||||
is 75) for photographic images. If you see defects at
|
||||
.B \-quality
|
||||
75, then go up 5 or 10 counts at a time until you are happy with the output
|
||||
image. (The optimal setting will vary from one image to another.)
|
||||
@@ -94,11 +94,10 @@ image. (The optimal setting will vary from one image to another.)
|
||||
.B \-quality
|
||||
100 will generate a quantization table of all 1's, minimizing loss in the
|
||||
quantization step (but there is still information loss in subsampling, as well
|
||||
as roundoff error). This setting is mainly of interest for experimental
|
||||
purposes. Quality values above about 95 are
|
||||
.B not
|
||||
recommended for normal use; the compressed file size goes up dramatically for
|
||||
hardly any gain in output image quality.
|
||||
as roundoff error.) For most images, specifying a quality value above
|
||||
about 95 will increase the size of the compressed file dramatically, and while
|
||||
the quality gain from these higher quality values is measurable (using metrics
|
||||
such as PSNR or SSIM), it is rarely perceivable by human vision.
|
||||
.PP
|
||||
In the other direction, quality values below 50 will produce very small files
|
||||
of low image quality. Settings around 5 to 10 might be useful in preparing an
|
||||
@@ -166,14 +165,30 @@ Use integer DCT method (default).
|
||||
.TP
|
||||
.B \-dct fast
|
||||
Use fast integer DCT (less accurate).
|
||||
In libjpeg-turbo, the fast method is generally about 5-15% faster than the int
|
||||
method when using the x86/x86-64 SIMD extensions (results may vary with other
|
||||
SIMD implementations, or when using libjpeg-turbo without SIMD extensions.)
|
||||
For quality levels of 90 and below, there should be little or no perceptible
|
||||
difference between the two algorithms. For quality levels above 90, however,
|
||||
the difference between the fast and the int methods becomes more pronounced.
|
||||
With quality=97, for instance, the fast method incurs generally about a 1-3 dB
|
||||
loss (in PSNR) relative to the int method, but this can be larger for some
|
||||
images. Do not use the fast method with quality levels above 97. The
|
||||
algorithm often degenerates at quality=98 and above and can actually produce a
|
||||
more lossy image than if lower quality levels had been used. Also, in
|
||||
libjpeg-turbo, the fast method is not fully accelerated for quality levels
|
||||
above 97, so it will be slower than the int method.
|
||||
.TP
|
||||
.B \-dct float
|
||||
Use floating-point DCT method.
|
||||
The float method is very slightly more accurate than the int method, but is
|
||||
much slower unless your machine has very fast floating-point hardware. Also
|
||||
note that results of the floating-point method may vary slightly across
|
||||
machines, while the integer methods should give the same results everywhere.
|
||||
The fast integer method is much less accurate than the other two.
|
||||
The float method is mainly a legacy feature. It does not produce significantly
|
||||
more accurate results than the int method, and it is much slower. The float
|
||||
method may also give different results on different machines due to varying
|
||||
roundoff behavior, whereas the integer methods should give the same results on
|
||||
all machines.
|
||||
.TP
|
||||
.BI \-icc " file"
|
||||
Embed ICC color management profile contained in the specified file.
|
||||
.TP
|
||||
.BI \-restart " N"
|
||||
Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
|
||||
@@ -190,7 +205,7 @@ Set limit for amount of memory to use in processing large images. Value is
|
||||
in thousands of bytes, or millions of bytes if "M" is attached to the
|
||||
number. For example,
|
||||
.B \-max 4m
|
||||
selects 4000000 bytes. If more space is needed, temporary files will be used.
|
||||
selects 4000000 bytes. If more space is needed, an error will occur.
|
||||
.TP
|
||||
.BI \-outfile " name"
|
||||
Send output image to the named file, not to standard output.
|
||||
@@ -208,6 +223,9 @@ give more output. Also, version information is printed at startup.
|
||||
.B \-debug
|
||||
Same as
|
||||
.BR \-verbose .
|
||||
.TP
|
||||
.B \-version
|
||||
Print version information and exit.
|
||||
.PP
|
||||
The
|
||||
.B \-restart
|
||||
@@ -322,11 +340,11 @@ Independent JPEG Group
|
||||
This file was modified by The libjpeg-turbo Project to include only information
|
||||
relevant to libjpeg-turbo, to wordsmith certain sections, and to describe
|
||||
features not present in libjpeg.
|
||||
.SH BUGS
|
||||
.SH ISSUES
|
||||
Support for GIF input files was removed in cjpeg v6b due to concerns over
|
||||
the Unisys LZW patent. Although this patent expired in 2006, cjpeg still
|
||||
lacks GIF support, for these historical reasons. (Conversion of GIF files to
|
||||
JPEG is usually a bad idea anyway.)
|
||||
JPEG is usually a bad idea anyway, since GIF is a 256-color format.)
|
||||
.PP
|
||||
Not all variants of BMP and Targa file formats are supported.
|
||||
.PP
|
||||
|
||||
140
cjpeg.c
140
cjpeg.c
@@ -5,8 +5,9 @@
|
||||
* Copyright (C) 1991-1998, Thomas G. Lane.
|
||||
* Modified 2003-2011 by Guido Vollbeding.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2010, 2013, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
* Copyright (C) 2010, 2013-2014, 2017, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
* This file contains a command-line user interface for the JPEG compressor.
|
||||
* It should work on any system with Unix- or MS-DOS-style command lines.
|
||||
@@ -28,7 +29,12 @@
|
||||
|
||||
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||
#include "jversion.h" /* for version message */
|
||||
#include "config.h"
|
||||
#include "jconfigint.h"
|
||||
|
||||
#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare malloc(),free() */
|
||||
extern void *malloc(size_t size);
|
||||
extern void free(void *ptr);
|
||||
#endif
|
||||
|
||||
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
|
||||
#ifdef __MWERKS__
|
||||
@@ -43,7 +49,7 @@
|
||||
|
||||
/* Create the add-on message string table. */
|
||||
|
||||
#define JMESSAGE(code,string) string ,
|
||||
#define JMESSAGE(code, string) string,
|
||||
|
||||
static const char * const cdjpeg_message_table[] = {
|
||||
#include "cderror.h"
|
||||
@@ -81,7 +87,7 @@ static boolean is_targa; /* records user -targa switch */
|
||||
|
||||
|
||||
LOCAL(cjpeg_source_ptr)
|
||||
select_file_type (j_compress_ptr cinfo, FILE * infile)
|
||||
select_file_type(j_compress_ptr cinfo, FILE *infile)
|
||||
{
|
||||
int c;
|
||||
|
||||
@@ -101,7 +107,7 @@ select_file_type (j_compress_ptr cinfo, FILE * infile)
|
||||
switch (c) {
|
||||
#ifdef BMP_SUPPORTED
|
||||
case 'B':
|
||||
return jinit_read_bmp(cinfo);
|
||||
return jinit_read_bmp(cinfo, TRUE);
|
||||
#endif
|
||||
#ifdef GIF_SUPPORTED
|
||||
case 'G':
|
||||
@@ -137,13 +143,14 @@ select_file_type (j_compress_ptr cinfo, FILE * infile)
|
||||
*/
|
||||
|
||||
|
||||
static const char * progname; /* program name for error messages */
|
||||
static char * outfilename; /* for -outfile switch */
|
||||
static const char *progname; /* program name for error messages */
|
||||
static char *icc_filename; /* for -icc switch */
|
||||
static char *outfilename; /* for -outfile switch */
|
||||
boolean memdst; /* for -memdst switch */
|
||||
|
||||
|
||||
LOCAL(void)
|
||||
usage (void)
|
||||
usage(void)
|
||||
/* complain about bad command line */
|
||||
{
|
||||
fprintf(stderr, "usage: %s [switches] ", progname);
|
||||
@@ -154,7 +161,8 @@ usage (void)
|
||||
#endif
|
||||
|
||||
fprintf(stderr, "Switches (names may be abbreviated):\n");
|
||||
fprintf(stderr, " -quality N[,...] Compression quality (0..100; 5-95 is useful range)\n");
|
||||
fprintf(stderr, " -quality N[,...] Compression quality (0..100; 5-95 is most useful range,\n");
|
||||
fprintf(stderr, " default is 75)\n");
|
||||
fprintf(stderr, " -grayscale Create monochrome JPEG file\n");
|
||||
fprintf(stderr, " -rgb Create RGB JPEG file\n");
|
||||
#ifdef ENTROPY_OPT_SUPPORTED
|
||||
@@ -182,6 +190,7 @@ usage (void)
|
||||
fprintf(stderr, " -dct float Use floating-point DCT method%s\n",
|
||||
(JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : ""));
|
||||
#endif
|
||||
fprintf(stderr, " -icc FILE Embed ICC profile contained in FILE\n");
|
||||
fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n");
|
||||
#ifdef INPUT_SMOOTHING_SUPPORTED
|
||||
fprintf(stderr, " -smooth N Smooth dithered input (N=1..100 is strength)\n");
|
||||
@@ -192,20 +201,21 @@ usage (void)
|
||||
fprintf(stderr, " -memdst Compress to memory instead of file (useful for benchmarking)\n");
|
||||
#endif
|
||||
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
||||
fprintf(stderr, " -version Print version information and exit\n");
|
||||
fprintf(stderr, "Switches for wizards:\n");
|
||||
fprintf(stderr, " -baseline Force baseline quantization tables\n");
|
||||
fprintf(stderr, " -qtables file Use quantization tables given in file\n");
|
||||
fprintf(stderr, " -qtables FILE Use quantization tables given in FILE\n");
|
||||
fprintf(stderr, " -qslots N[,...] Set component quantization tables\n");
|
||||
fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n");
|
||||
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
||||
fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n");
|
||||
fprintf(stderr, " -scans FILE Create multi-scan JPEG per script FILE\n");
|
||||
#endif
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
LOCAL(int)
|
||||
parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||
parse_switches(j_compress_ptr cinfo, int argc, char **argv,
|
||||
int last_file_arg_seen, boolean for_real)
|
||||
/* Parse optional switches.
|
||||
* Returns argv[] index of first file-name argument (== argc if none).
|
||||
@@ -217,20 +227,21 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||
*/
|
||||
{
|
||||
int argn;
|
||||
char * arg;
|
||||
char *arg;
|
||||
boolean force_baseline;
|
||||
boolean simple_progressive;
|
||||
char * qualityarg = NULL; /* saves -quality parm if any */
|
||||
char * qtablefile = NULL; /* saves -qtables filename if any */
|
||||
char * qslotsarg = NULL; /* saves -qslots parm if any */
|
||||
char * samplearg = NULL; /* saves -sample parm if any */
|
||||
char * scansarg = NULL; /* saves -scans parm if any */
|
||||
char *qualityarg = NULL; /* saves -quality parm if any */
|
||||
char *qtablefile = NULL; /* saves -qtables filename if any */
|
||||
char *qslotsarg = NULL; /* saves -qslots parm if any */
|
||||
char *samplearg = NULL; /* saves -sample parm if any */
|
||||
char *scansarg = NULL; /* saves -scans parm if any */
|
||||
|
||||
/* Set up default JPEG parameters. */
|
||||
|
||||
force_baseline = FALSE; /* by default, allow 16-bit quantizers */
|
||||
simple_progressive = FALSE;
|
||||
is_targa = FALSE;
|
||||
icc_filename = NULL;
|
||||
outfilename = NULL;
|
||||
memdst = FALSE;
|
||||
cinfo->err->trace_level = 0;
|
||||
@@ -281,7 +292,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||
/* On first -d, print version identification */
|
||||
static boolean printed_version = FALSE;
|
||||
|
||||
if (! printed_version) {
|
||||
if (!printed_version) {
|
||||
fprintf(stderr, "%s version %s (build %s)\n",
|
||||
PACKAGE_NAME, VERSION, BUILD);
|
||||
fprintf(stderr, "%s\n\n", JCOPYRIGHT);
|
||||
@@ -291,7 +302,13 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||
}
|
||||
cinfo->err->trace_level++;
|
||||
|
||||
} else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
|
||||
} else if (keymatch(arg, "version", 4)) {
|
||||
fprintf(stderr, "%s version %s (build %s)\n",
|
||||
PACKAGE_NAME, VERSION, BUILD);
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
} else if (keymatch(arg, "grayscale", 2) ||
|
||||
keymatch(arg, "greyscale", 2)) {
|
||||
/* Force a monochrome JPEG file to be generated. */
|
||||
jpeg_set_colorspace(cinfo, JCS_GRAYSCALE);
|
||||
|
||||
@@ -299,6 +316,12 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||
/* Force an RGB JPEG file to be generated. */
|
||||
jpeg_set_colorspace(cinfo, JCS_RGB);
|
||||
|
||||
} else if (keymatch(arg, "icc", 1)) {
|
||||
/* Set ICC filename. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
icc_filename = argv[argn];
|
||||
|
||||
} else if (keymatch(arg, "maxmemory", 3)) {
|
||||
/* Maximum memory in Kb (or Mb with 'm'). */
|
||||
long lval;
|
||||
@@ -384,10 +407,10 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||
if (lval < 0 || lval > 65535L)
|
||||
usage();
|
||||
if (ch == 'b' || ch == 'B') {
|
||||
cinfo->restart_interval = (unsigned int) lval;
|
||||
cinfo->restart_interval = (unsigned int)lval;
|
||||
cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */
|
||||
} else {
|
||||
cinfo->restart_in_rows = (int) lval;
|
||||
cinfo->restart_in_rows = (int)lval;
|
||||
/* restart_interval will be computed during startup */
|
||||
}
|
||||
|
||||
@@ -442,19 +465,19 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||
/* Set quantization tables for selected quality. */
|
||||
/* Some or all may be overridden if -qtables is present. */
|
||||
if (qualityarg != NULL) /* process -quality if it was present */
|
||||
if (! set_quality_ratings(cinfo, qualityarg, force_baseline))
|
||||
if (!set_quality_ratings(cinfo, qualityarg, force_baseline))
|
||||
usage();
|
||||
|
||||
if (qtablefile != NULL) /* process -qtables if it was present */
|
||||
if (! read_quant_tables(cinfo, qtablefile, force_baseline))
|
||||
if (!read_quant_tables(cinfo, qtablefile, force_baseline))
|
||||
usage();
|
||||
|
||||
if (qslotsarg != NULL) /* process -qslots if it was present */
|
||||
if (! set_quant_slots(cinfo, qslotsarg))
|
||||
if (!set_quant_slots(cinfo, qslotsarg))
|
||||
usage();
|
||||
|
||||
if (samplearg != NULL) /* process -sample if it was present */
|
||||
if (! set_sample_factors(cinfo, samplearg))
|
||||
if (!set_sample_factors(cinfo, samplearg))
|
||||
usage();
|
||||
|
||||
#ifdef C_PROGRESSIVE_SUPPORTED
|
||||
@@ -464,7 +487,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||
|
||||
#ifdef C_MULTISCAN_FILES_SUPPORTED
|
||||
if (scansarg != NULL) /* process -scans if it was present */
|
||||
if (! read_scan_script(cinfo, scansarg))
|
||||
if (!read_scan_script(cinfo, scansarg))
|
||||
usage();
|
||||
#endif
|
||||
}
|
||||
@@ -478,7 +501,7 @@ parse_switches (j_compress_ptr cinfo, int argc, char **argv,
|
||||
*/
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
struct jpeg_compress_struct cinfo;
|
||||
struct jpeg_error_mgr jerr;
|
||||
@@ -487,8 +510,11 @@ main (int argc, char **argv)
|
||||
#endif
|
||||
int file_index;
|
||||
cjpeg_source_ptr src_mgr;
|
||||
FILE * input_file;
|
||||
FILE * output_file = NULL;
|
||||
FILE *input_file;
|
||||
FILE *icc_file;
|
||||
JOCTET *icc_profile = NULL;
|
||||
long icc_len = 0;
|
||||
FILE *output_file = NULL;
|
||||
unsigned char *outbuffer = NULL;
|
||||
unsigned long outsize = 0;
|
||||
JDIMENSION num_scanlines;
|
||||
@@ -510,11 +536,6 @@ main (int argc, char **argv)
|
||||
jerr.first_addon_message = JMSG_FIRSTADDONCODE;
|
||||
jerr.last_addon_message = JMSG_LASTADDONCODE;
|
||||
|
||||
/* Now safe to enable signal catcher. */
|
||||
#ifdef NEED_SIGNAL_CATCHER
|
||||
enable_signal_catcher((j_common_ptr) &cinfo);
|
||||
#endif
|
||||
|
||||
/* Initialize JPEG parameters.
|
||||
* Much of this may be overridden later.
|
||||
* In particular, we don't yet know the input file's color space,
|
||||
@@ -536,14 +557,14 @@ main (int argc, char **argv)
|
||||
if (!memdst) {
|
||||
/* Must have either -outfile switch or explicit output file name */
|
||||
if (outfilename == NULL) {
|
||||
if (file_index != argc-2) {
|
||||
if (file_index != argc - 2) {
|
||||
fprintf(stderr, "%s: must name one input and one output file\n",
|
||||
progname);
|
||||
usage();
|
||||
}
|
||||
outfilename = argv[file_index+1];
|
||||
outfilename = argv[file_index + 1];
|
||||
} else {
|
||||
if (file_index != argc-1) {
|
||||
if (file_index != argc - 1) {
|
||||
fprintf(stderr, "%s: must name one input and one output file\n",
|
||||
progname);
|
||||
usage();
|
||||
@@ -552,7 +573,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
#else
|
||||
/* Unix style: expect zero or one file name */
|
||||
if (file_index < argc-1) {
|
||||
if (file_index < argc - 1) {
|
||||
fprintf(stderr, "%s: only one input file\n", progname);
|
||||
usage();
|
||||
}
|
||||
@@ -580,8 +601,35 @@ main (int argc, char **argv)
|
||||
output_file = write_stdout();
|
||||
}
|
||||
|
||||
if (icc_filename != NULL) {
|
||||
if ((icc_file = fopen(icc_filename, READ_BINARY)) == NULL) {
|
||||
fprintf(stderr, "%s: can't open %s\n", progname, icc_filename);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (fseek(icc_file, 0, SEEK_END) < 0 ||
|
||||
(icc_len = ftell(icc_file)) < 1 ||
|
||||
fseek(icc_file, 0, SEEK_SET) < 0) {
|
||||
fprintf(stderr, "%s: can't determine size of %s\n", progname,
|
||||
icc_filename);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if ((icc_profile = (JOCTET *)malloc(icc_len)) == NULL) {
|
||||
fprintf(stderr, "%s: can't allocate memory for ICC profile\n", progname);
|
||||
fclose(icc_file);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (fread(icc_profile, icc_len, 1, icc_file) < 1) {
|
||||
fprintf(stderr, "%s: can't read ICC profile from %s\n", progname,
|
||||
icc_filename);
|
||||
free(icc_profile);
|
||||
fclose(icc_file);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
fclose(icc_file);
|
||||
}
|
||||
|
||||
#ifdef PROGRESS_REPORT
|
||||
start_progress_monitor((j_common_ptr) &cinfo, &progress);
|
||||
start_progress_monitor((j_common_ptr)&cinfo, &progress);
|
||||
#endif
|
||||
|
||||
/* Figure out the input file format, and set up to read it. */
|
||||
@@ -608,10 +656,13 @@ main (int argc, char **argv)
|
||||
/* Start compressor */
|
||||
jpeg_start_compress(&cinfo, TRUE);
|
||||
|
||||
if (icc_profile != NULL)
|
||||
jpeg_write_icc_profile(&cinfo, icc_profile, (unsigned int)icc_len);
|
||||
|
||||
/* Process data */
|
||||
while (cinfo.next_scanline < cinfo.image_height) {
|
||||
num_scanlines = (*src_mgr->get_pixel_rows) (&cinfo, src_mgr);
|
||||
(void) jpeg_write_scanlines(&cinfo, src_mgr->buffer, num_scanlines);
|
||||
(void)jpeg_write_scanlines(&cinfo, src_mgr->buffer, num_scanlines);
|
||||
}
|
||||
|
||||
/* Finish compression and release memory */
|
||||
@@ -626,7 +677,7 @@ main (int argc, char **argv)
|
||||
fclose(output_file);
|
||||
|
||||
#ifdef PROGRESS_REPORT
|
||||
end_progress_monitor((j_common_ptr) &cinfo);
|
||||
end_progress_monitor((j_common_ptr)&cinfo);
|
||||
#endif
|
||||
|
||||
if (memdst) {
|
||||
@@ -635,6 +686,9 @@ main (int argc, char **argv)
|
||||
free(outbuffer);
|
||||
}
|
||||
|
||||
if (icc_profile != NULL)
|
||||
free(icc_profile);
|
||||
|
||||
/* All done. */
|
||||
exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS);
|
||||
return 0; /* suppress no-return-value warnings */
|
||||
|
||||
182
cmakescripts/BuildPackages.cmake
Normal file
182
cmakescripts/BuildPackages.cmake
Normal file
@@ -0,0 +1,182 @@
|
||||
# This file is included from the top-level CMakeLists.txt. We just store it
|
||||
# here to avoid cluttering up that file.
|
||||
|
||||
set(PKGNAME ${CMAKE_PROJECT_NAME} CACHE STRING
|
||||
"Distribution package name (default: ${CMAKE_PROJECT_NAME})")
|
||||
set(PKGVENDOR "The ${CMAKE_PROJECT_NAME} Project" CACHE STRING
|
||||
"Vendor name to be included in distribution package descriptions (default: The ${CMAKE_PROJECT_NAME} Project)")
|
||||
set(PKGURL "http://www.${CMAKE_PROJECT_NAME}.org" CACHE STRING
|
||||
"URL of project web site to be included in distribution package descriptions (default: http://www.${CMAKE_PROJECT_NAME}.org)")
|
||||
set(PKGEMAIL "information@${CMAKE_PROJECT_NAME}.org" CACHE STRING
|
||||
"E-mail of project maintainer to be included in distribution package descriptions (default: information@${CMAKE_PROJECT_NAME}.org")
|
||||
set(PKGID "com.${CMAKE_PROJECT_NAME}.${PKGNAME}" CACHE STRING
|
||||
"Globally unique package identifier (reverse DNS notation) (default: com.${CMAKE_PROJECT_NAME}.${PKGNAME})")
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Linux RPM and DEB
|
||||
###############################################################################
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
|
||||
set(RPMARCH ${CMAKE_SYSTEM_PROCESSOR})
|
||||
if(CPU_TYPE STREQUAL "x86_64")
|
||||
set(DEBARCH amd64)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7*")
|
||||
set(DEBARCH armhf)
|
||||
elseif(CPU_TYPE STREQUAL "arm64")
|
||||
set(DEBARCH ${CPU_TYPE})
|
||||
elseif(CPU_TYPE STREQUAL "arm")
|
||||
set(DEBARCH armel)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR_LC STREQUAL "ppc64le")
|
||||
set(DEBARCH ppc64el)
|
||||
elseif(CPU_TYPE STREQUAL "powerpc" AND BITS EQUAL 32)
|
||||
set(RPMARCH ppc)
|
||||
set(DEBARCH ppc)
|
||||
else()
|
||||
set(DEBARCH ${CMAKE_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
message(STATUS "RPM architecture = ${RPMARCH}, DEB architecture = ${DEBARCH}")
|
||||
|
||||
# Re-set CMAKE_POSITION_INDEPENDENT_CODE so that the RPM spec file works
|
||||
# properly
|
||||
boolean_number(CMAKE_POSITION_INDEPENDENT_CODE)
|
||||
|
||||
configure_file(release/makerpm.in pkgscripts/makerpm)
|
||||
configure_file(release/rpm.spec.in pkgscripts/rpm.spec @ONLY)
|
||||
|
||||
add_custom_target(rpm sh pkgscripts/makerpm
|
||||
SOURCES pkgscripts/makerpm)
|
||||
|
||||
configure_file(release/makesrpm.in pkgscripts/makesrpm)
|
||||
|
||||
add_custom_target(srpm sh pkgscripts/makesrpm
|
||||
SOURCES pkgscripts/makesrpm
|
||||
DEPENDS dist)
|
||||
|
||||
configure_file(release/makedpkg.in pkgscripts/makedpkg)
|
||||
configure_file(release/deb-control.in pkgscripts/deb-control)
|
||||
|
||||
add_custom_target(deb sh pkgscripts/makedpkg
|
||||
SOURCES pkgscripts/makedpkg)
|
||||
|
||||
endif() # Linux
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Windows installer (NullSoft Installer)
|
||||
###############################################################################
|
||||
|
||||
if(WIN32)
|
||||
|
||||
if(MSVC)
|
||||
set(INST_PLATFORM "Visual C++")
|
||||
set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-vc)
|
||||
set(INST_REG_NAME ${CMAKE_PROJECT_NAME})
|
||||
elseif(MINGW)
|
||||
set(INST_PLATFORM GCC)
|
||||
set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}-gcc)
|
||||
set(INST_REG_NAME ${CMAKE_PROJECT_NAME}-gcc)
|
||||
set(INST_DEFS -DGCC)
|
||||
endif()
|
||||
|
||||
if(BITS EQUAL 64)
|
||||
set(INST_PLATFORM "${INST_PLATFORM} 64-bit")
|
||||
set(INST_NAME ${INST_NAME}64)
|
||||
set(INST_REG_NAME ${INST_DIR}64)
|
||||
set(INST_DEFS ${INST_DEFS} -DWIN64)
|
||||
endif()
|
||||
|
||||
if(WITH_JAVA)
|
||||
set(INST_DEFS ${INST_DEFS} -DJAVA)
|
||||
endif()
|
||||
|
||||
if(MSVC_IDE)
|
||||
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=${CMAKE_CFG_INTDIR}\\")
|
||||
else()
|
||||
set(INST_DEFS ${INST_DEFS} "-DBUILDDIR=")
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "/" "\\\\" INST_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
configure_file(release/installer.nsi.in installer.nsi @ONLY)
|
||||
|
||||
if(WITH_JAVA)
|
||||
set(JAVA_DEPEND turbojpeg-java)
|
||||
endif()
|
||||
add_custom_target(installer
|
||||
makensis -nocd ${INST_DEFS} installer.nsi
|
||||
DEPENDS jpeg jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom
|
||||
cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND}
|
||||
SOURCES installer.nsi)
|
||||
|
||||
endif() # WIN32
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Cygwin Package
|
||||
###############################################################################
|
||||
|
||||
if(CYGWIN)
|
||||
|
||||
configure_file(release/makecygwinpkg.in pkgscripts/makecygwinpkg)
|
||||
|
||||
add_custom_target(cygwinpkg sh pkgscripts/makecygwinpkg)
|
||||
|
||||
endif() # CYGWIN
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Mac DMG
|
||||
###############################################################################
|
||||
|
||||
if(APPLE)
|
||||
|
||||
set(DEFAULT_OSX_32BIT_BUILD ${CMAKE_SOURCE_DIR}/osxx86)
|
||||
set(OSX_32BIT_BUILD ${DEFAULT_OSX_32BIT_BUILD} CACHE PATH
|
||||
"Directory containing 32-bit (i386) Mac build to include in universal binaries (default: ${DEFAULT_OSX_32BIT_BUILD})")
|
||||
set(DEFAULT_IOS_ARMV7_BUILD ${CMAKE_SOURCE_DIR}/iosarmv7)
|
||||
set(IOS_ARMV7_BUILD ${DEFAULT_IOS_ARMV7_BUILD} CACHE PATH
|
||||
"Directory containing ARMv7 iOS build to include in universal binaries (default: ${DEFAULT_IOS_ARMV7_BUILD})")
|
||||
set(DEFAULT_IOS_ARMV7S_BUILD ${CMAKE_SOURCE_DIR}/iosarmv7s)
|
||||
set(IOS_ARMV7S_BUILD ${DEFAULT_IOS_ARMV7S_BUILD} CACHE PATH
|
||||
"Directory containing ARMv7s iOS build to include in universal binaries (default: ${DEFAULT_IOS_ARMV7S_BUILD})")
|
||||
set(DEFAULT_IOS_ARMV8_BUILD ${CMAKE_SOURCE_DIR}/iosarmv8)
|
||||
set(IOS_ARMV8_BUILD ${DEFAULT_IOS_ARMV8_BUILD} CACHE PATH
|
||||
"Directory containing ARMv8 iOS build to include in universal binaries (default: ${DEFAULT_IOS_ARMV8_BUILD})")
|
||||
|
||||
set(OSX_APP_CERT_NAME "" CACHE STRING
|
||||
"Name of the Developer ID Application certificate (in the macOS keychain) that should be used to sign the libjpeg-turbo DMG. Leave this blank to generate an unsigned DMG.")
|
||||
set(OSX_INST_CERT_NAME "" CACHE STRING
|
||||
"Name of the Developer ID Installer certificate (in the macOS keychain) that should be used to sign the libjpeg-turbo installer package. Leave this blank to generate an unsigned package.")
|
||||
|
||||
configure_file(release/makemacpkg.in pkgscripts/makemacpkg)
|
||||
configure_file(release/Distribution.xml.in pkgscripts/Distribution.xml)
|
||||
configure_file(release/uninstall.in pkgscripts/uninstall)
|
||||
|
||||
add_custom_target(dmg sh pkgscripts/makemacpkg
|
||||
SOURCES pkgscripts/makemacpkg)
|
||||
|
||||
add_custom_target(udmg sh pkgscripts/makemacpkg universal
|
||||
SOURCES pkgscripts/makemacpkg)
|
||||
|
||||
endif() # APPLE
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Generic
|
||||
###############################################################################
|
||||
|
||||
add_custom_target(dist
|
||||
COMMAND git archive --prefix=${CMAKE_PROJECT_NAME}-${VERSION}/ HEAD |
|
||||
gzip > ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}.tar.gz
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
configure_file(release/maketarball.in pkgscripts/maketarball)
|
||||
|
||||
add_custom_target(tarball sh pkgscripts/maketarball
|
||||
SOURCES pkgscripts/maketarball)
|
||||
|
||||
configure_file(release/libjpeg.pc.in pkgscripts/libjpeg.pc @ONLY)
|
||||
|
||||
configure_file(release/libturbojpeg.pc.in pkgscripts/libturbojpeg.pc @ONLY)
|
||||
416
cmakescripts/GNUInstallDirs.cmake
Normal file
416
cmakescripts/GNUInstallDirs.cmake
Normal file
@@ -0,0 +1,416 @@
|
||||
#.rst:
|
||||
# GNUInstallDirs
|
||||
# --------------
|
||||
#
|
||||
# Define GNU standard installation directories
|
||||
#
|
||||
# Provides install directory variables as defined by the
|
||||
# `GNU Coding Standards`_.
|
||||
#
|
||||
# .. _`GNU Coding Standards`: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
||||
#
|
||||
# Result Variables
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# Inclusion of this module defines the following variables:
|
||||
#
|
||||
# ``CMAKE_INSTALL_<dir>``
|
||||
#
|
||||
# Destination for files of a given type. This value may be passed to
|
||||
# the ``DESTINATION`` options of :command:`install` commands for the
|
||||
# corresponding file type.
|
||||
#
|
||||
# ``CMAKE_INSTALL_FULL_<dir>``
|
||||
#
|
||||
# The absolute path generated from the corresponding ``CMAKE_INSTALL_<dir>``
|
||||
# value. If the value is not already an absolute path, an absolute path
|
||||
# is constructed typically by prepending the value of the
|
||||
# :variable:`CMAKE_INSTALL_PREFIX` variable. However, there are some
|
||||
# `special cases`_ as documented below.
|
||||
#
|
||||
# where ``<dir>`` is one of:
|
||||
#
|
||||
# ``BINDIR``
|
||||
# user executables (``bin``)
|
||||
# ``SBINDIR``
|
||||
# system admin executables (``sbin``)
|
||||
# ``LIBEXECDIR``
|
||||
# program executables (``libexec``)
|
||||
# ``SYSCONFDIR``
|
||||
# read-only single-machine data (``etc``)
|
||||
# ``SHAREDSTATEDIR``
|
||||
# modifiable architecture-independent data (``com``)
|
||||
# ``LOCALSTATEDIR``
|
||||
# modifiable single-machine data (``var``)
|
||||
# ``LIBDIR``
|
||||
# object code libraries (``lib`` or ``lib64``
|
||||
# or ``lib/<multiarch-tuple>`` on Debian)
|
||||
# ``INCLUDEDIR``
|
||||
# C header files (``include``)
|
||||
# ``OLDINCLUDEDIR``
|
||||
# C header files for non-gcc (``/usr/include``)
|
||||
# ``DATAROOTDIR``
|
||||
# read-only architecture-independent data root (``share``)
|
||||
# ``DATADIR``
|
||||
# read-only architecture-independent data (``DATAROOTDIR``)
|
||||
# ``INFODIR``
|
||||
# info documentation (``DATAROOTDIR/info``)
|
||||
# ``LOCALEDIR``
|
||||
# locale-dependent data (``DATAROOTDIR/locale``)
|
||||
# ``MANDIR``
|
||||
# man documentation (``DATAROOTDIR/man``)
|
||||
# ``DOCDIR``
|
||||
# documentation root (``DATAROOTDIR/doc/PROJECT_NAME``)
|
||||
#
|
||||
# If the includer does not define a value the above-shown default will be
|
||||
# used and the value will appear in the cache for editing by the user.
|
||||
#
|
||||
# Special Cases
|
||||
# ^^^^^^^^^^^^^
|
||||
#
|
||||
# The following values of :variable:`CMAKE_INSTALL_PREFIX` are special:
|
||||
#
|
||||
# ``/``
|
||||
#
|
||||
# For ``<dir>`` other than the ``SYSCONFDIR`` and ``LOCALSTATEDIR``,
|
||||
# the value of ``CMAKE_INSTALL_<dir>`` is prefixed with ``usr/`` if
|
||||
# it is not user-specified as an absolute path. For example, the
|
||||
# ``INCLUDEDIR`` value ``include`` becomes ``usr/include``.
|
||||
# This is required by the `GNU Coding Standards`_, which state:
|
||||
#
|
||||
# When building the complete GNU system, the prefix will be empty
|
||||
# and ``/usr`` will be a symbolic link to ``/``.
|
||||
#
|
||||
# ``/usr``
|
||||
#
|
||||
# For ``<dir>`` equal to ``SYSCONFDIR`` or ``LOCALSTATEDIR``, the
|
||||
# ``CMAKE_INSTALL_FULL_<dir>`` is computed by prepending just ``/``
|
||||
# to the value of ``CMAKE_INSTALL_<dir>`` if it is not user-specified
|
||||
# as an absolute path. For example, the ``SYSCONFDIR`` value ``etc``
|
||||
# becomes ``/etc``. This is required by the `GNU Coding Standards`_.
|
||||
#
|
||||
# ``/opt/...``
|
||||
#
|
||||
# For ``<dir>`` equal to ``SYSCONFDIR`` or ``LOCALSTATEDIR``, the
|
||||
# ``CMAKE_INSTALL_FULL_<dir>`` is computed by *appending* the prefix
|
||||
# to the value of ``CMAKE_INSTALL_<dir>`` if it is not user-specified
|
||||
# as an absolute path. For example, the ``SYSCONFDIR`` value ``etc``
|
||||
# becomes ``/etc/opt/...``. This is defined by the
|
||||
# `Filesystem Hierarchy Standard`_.
|
||||
#
|
||||
# .. _`Filesystem Hierarchy Standard`: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html
|
||||
#
|
||||
# Macros
|
||||
# ^^^^^^
|
||||
#
|
||||
# .. command:: GNUInstallDirs_get_absolute_install_dir
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# GNUInstallDirs_get_absolute_install_dir(absvar var)
|
||||
#
|
||||
# Set the given variable ``absvar`` to the absolute path contained
|
||||
# within the variable ``var``. This is to allow the computation of an
|
||||
# absolute path, accounting for all the special cases documented
|
||||
# above. While this macro is used to compute the various
|
||||
# ``CMAKE_INSTALL_FULL_<dir>`` variables, it is exposed publicly to
|
||||
# allow users who create additional path variables to also compute
|
||||
# absolute paths where necessary, using the same logic.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2016, 2019 D. R. Commander
|
||||
# Copyright 2016 Dmitry Marakasov
|
||||
# Copyright 2016 Roger Leigh
|
||||
# Copyright 2015 Alex Turbov
|
||||
# Copyright 2014 Rolf Eike Beer
|
||||
# Copyright 2014 Daniele E. Domenichelli
|
||||
# Copyright 2013 Dimitri John Ledkov
|
||||
# Copyright 2011 Alex Neundorf
|
||||
# Copyright 2011 Eric NOULARD
|
||||
# Copyright 2011, 2013-2015 Kitware, Inc.
|
||||
# Copyright 2011 Nikita Krupen'ko
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
|
||||
# nor the names of their contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#=============================================================================
|
||||
|
||||
# Installation directories
|
||||
#
|
||||
|
||||
macro(GNUInstallDirs_set_install_dir var docstring)
|
||||
# If CMAKE_INSTALL_PREFIX changes and CMAKE_INSTALL_*DIR is still set to the
|
||||
# default value, then modify it accordingly. This presumes that the default
|
||||
# value may change based on the prefix.
|
||||
|
||||
set(_GNUInstallDirs_CMAKE_INSTALL_FORCE_${var} "")
|
||||
if(NOT DEFINED CMAKE_INSTALL_${var})
|
||||
set(_GNUInstallDirs_CMAKE_INSTALL_DEFAULT_${var} 1 CACHE INTERNAL
|
||||
"CMAKE_INSTALL_${var} has default value")
|
||||
elseif(DEFINED _GNUInstallDirs_CMAKE_INSTALL_LAST_DEFAULT_${var} AND
|
||||
NOT "${_GNUInstallDirs_CMAKE_INSTALL_LAST_DEFAULT_${var}}" STREQUAL
|
||||
"${CMAKE_INSTALL_DEFAULT_${var}}" AND
|
||||
_GNUInstallDirs_CMAKE_INSTALL_DEFAULT_${var} AND
|
||||
"${_GNUInstallDirs_CMAKE_INSTALL_LAST_${var}}" STREQUAL
|
||||
"${CMAKE_INSTALL_${var}}")
|
||||
set(_GNUInstallDirs_CMAKE_INSTALL_FORCE_${var} "FORCE")
|
||||
endif()
|
||||
|
||||
set(CMAKE_INSTALL_${var} "${CMAKE_INSTALL_DEFAULT_${var}}" CACHE PATH
|
||||
"${docstring} (Default: ${CMAKE_INSTALL_DEFAULT_${var}})"
|
||||
${_GNUInstallDirs_CMAKE_INSTALL_FORCE_${var}})
|
||||
|
||||
if(NOT CMAKE_INSTALL_${var} STREQUAL CMAKE_INSTALL_DEFAULT_${var})
|
||||
unset(_GNUInstallDirs_CMAKE_INSTALL_DEFAULT_${var} CACHE)
|
||||
endif()
|
||||
|
||||
# Save for next run
|
||||
set(_GNUInstallDirs_CMAKE_INSTALL_LAST_${var} "${CMAKE_INSTALL_${var}}"
|
||||
CACHE INTERNAL "CMAKE_INSTALL_${var} during last run")
|
||||
set(_GNUInstallDirs_CMAKE_INSTALL_LAST_DEFAULT_${var}
|
||||
"${CMAKE_INSTALL_DEFAULT_${var}}" CACHE INTERNAL
|
||||
"CMAKE_INSTALL_DEFAULT_${var} during last run")
|
||||
endmacro()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_BINDIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_BINDIR "bin")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(BINDIR
|
||||
"Directory into which user executables should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_SBINDIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_SBINDIR "sbin")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(SBINDIR
|
||||
"Directory into which system admin executables should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_LIBEXECDIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_LIBEXECDIR "libexec")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(LIBEXECDIR
|
||||
"Directory under which executables run by other programs should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_SYSCONFDIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_SYSCONFDIR "etc")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(SYSCONFDIR
|
||||
"Directory into which machine-specific read-only ASCII data and configuration files should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_SHAREDSTATEDIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_SHAREDSTATEDIR "com")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(SHAREDSTATEDIR
|
||||
"Directory into which architecture-independent run-time-modifiable data files should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_LOCALSTATEDIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_LOCALSTATEDIR "var")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(LOCALSTATEDIR
|
||||
"Directory into which machine-specific run-time-modifiable data files should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_LIBDIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_LIBDIR "lib")
|
||||
# Override this default 'lib' with 'lib64' iff:
|
||||
# - we are on Linux system but NOT cross-compiling
|
||||
# - we are NOT on debian
|
||||
# - we are on a 64 bits system
|
||||
# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
|
||||
# For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
|
||||
# CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
|
||||
# and CMAKE_INSTALL_PREFIX is "/usr"
|
||||
# See http://wiki.debian.org/Multiarch
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$"
|
||||
AND NOT CMAKE_CROSSCOMPILING)
|
||||
if (EXISTS "/etc/debian_version") # is this a debian system ?
|
||||
if(CMAKE_LIBRARY_ARCHITECTURE)
|
||||
if("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$")
|
||||
set(CMAKE_INSTALL_DEFAULT_LIBDIR "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
|
||||
endif()
|
||||
endif()
|
||||
else() # not debian, rely on CMAKE_SIZEOF_VOID_P:
|
||||
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
|
||||
message(AUTHOR_WARNING
|
||||
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
|
||||
"Please enable at least one language before including GNUInstallDirs.")
|
||||
else()
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(CMAKE_INSTALL_DEFAULT_LIBDIR "lib64")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(LIBDIR
|
||||
"Directory into which object files and object code libraries should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_INCLUDEDIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_INCLUDEDIR "include")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(INCLUDEDIR
|
||||
"Directory into which C header files should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_OLDINCLUDEDIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_OLDINCLUDEDIR "/usr/include")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(OLDINCLUDEDIR
|
||||
PATH "Directory into which C header files for non-GCC compilers should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_DATAROOTDIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_DATAROOTDIR "share")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(DATAROOTDIR
|
||||
"The root of the directory tree for read-only architecture-independent data files")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Values whose defaults are relative to DATAROOTDIR. Store empty values in
|
||||
# the cache and store the defaults in local variables if the cache values are
|
||||
# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes.
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_DATADIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_DATADIR "<CMAKE_INSTALL_DATAROOTDIR>")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(DATADIR
|
||||
"The directory under which read-only architecture-independent data files should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_INFODIR)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "^(.*BSD|DragonFly)$")
|
||||
set(CMAKE_INSTALL_DEFAULT_INFODIR "info")
|
||||
else()
|
||||
set(CMAKE_INSTALL_DEFAULT_INFODIR "<CMAKE_INSTALL_DATAROOTDIR>/info")
|
||||
endif()
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(INFODIR
|
||||
"The directory into which info documentation files should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_MANDIR)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "^(.*BSD|DragonFly)$")
|
||||
set(CMAKE_INSTALL_DEFAULT_MANDIR "man")
|
||||
else()
|
||||
set(CMAKE_INSTALL_DEFAULT_MANDIR "<CMAKE_INSTALL_DATAROOTDIR>/man")
|
||||
endif()
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(MANDIR
|
||||
"The directory under which man pages should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_LOCALEDIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_LOCALEDIR "<CMAKE_INSTALL_DATAROOTDIR>/locale")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(LOCALEDIR
|
||||
"The directory under which locale-specific message catalogs should be installed")
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_DOCDIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_DOCDIR "<CMAKE_INSTALL_DATAROOTDIR>/doc/${PROJECT_NAME}")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(DOCDIR
|
||||
"The directory into which documentation files (other than info files) should be installed")
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
mark_as_advanced(
|
||||
CMAKE_INSTALL_BINDIR
|
||||
CMAKE_INSTALL_SBINDIR
|
||||
CMAKE_INSTALL_LIBEXECDIR
|
||||
CMAKE_INSTALL_SYSCONFDIR
|
||||
CMAKE_INSTALL_SHAREDSTATEDIR
|
||||
CMAKE_INSTALL_LOCALSTATEDIR
|
||||
CMAKE_INSTALL_LIBDIR
|
||||
CMAKE_INSTALL_INCLUDEDIR
|
||||
CMAKE_INSTALL_OLDINCLUDEDIR
|
||||
CMAKE_INSTALL_DATAROOTDIR
|
||||
CMAKE_INSTALL_DATADIR
|
||||
CMAKE_INSTALL_INFODIR
|
||||
CMAKE_INSTALL_LOCALEDIR
|
||||
CMAKE_INSTALL_MANDIR
|
||||
CMAKE_INSTALL_DOCDIR
|
||||
)
|
||||
|
||||
macro(GNUInstallDirs_get_absolute_install_dir absvar var)
|
||||
string(REGEX REPLACE "[<>]" "@" ${var} "${${var}}")
|
||||
# Handle the specific case of an empty CMAKE_INSTALL_DATAROOTDIR
|
||||
if(NOT CMAKE_INSTALL_DATAROOTDIR AND
|
||||
${var} MATCHES "\@CMAKE_INSTALL_DATAROOTDIR\@/")
|
||||
string(CONFIGURE "${${var}}" ${var} @ONLY)
|
||||
string(REGEX REPLACE "^/" "" ${var} "${${var}}")
|
||||
else()
|
||||
string(CONFIGURE "${${var}}" ${var} @ONLY)
|
||||
endif()
|
||||
if(NOT IS_ABSOLUTE "${${var}}")
|
||||
# Handle special cases:
|
||||
# - CMAKE_INSTALL_PREFIX == /
|
||||
# - CMAKE_INSTALL_PREFIX == /usr
|
||||
# - CMAKE_INSTALL_PREFIX == /opt/...
|
||||
if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/")
|
||||
if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR")
|
||||
set(${absvar} "/${${var}}")
|
||||
else()
|
||||
if (NOT "${${var}}" MATCHES "^usr/")
|
||||
set(${var} "usr/${${var}}")
|
||||
endif()
|
||||
set(${absvar} "/${${var}}")
|
||||
endif()
|
||||
elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/usr/?$")
|
||||
if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR")
|
||||
set(${absvar} "/${${var}}")
|
||||
else()
|
||||
set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}")
|
||||
endif()
|
||||
elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/opt/.*")
|
||||
if("${dir}" STREQUAL "SYSCONFDIR" OR "${dir}" STREQUAL "LOCALSTATEDIR")
|
||||
set(${absvar} "/${${var}}${CMAKE_INSTALL_PREFIX}")
|
||||
else()
|
||||
set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}")
|
||||
endif()
|
||||
else()
|
||||
set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}")
|
||||
endif()
|
||||
else()
|
||||
set(${absvar} "${${var}}")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" ${absvar} "${${absvar}}")
|
||||
endmacro()
|
||||
|
||||
# Result directories
|
||||
#
|
||||
foreach(dir
|
||||
BINDIR
|
||||
SBINDIR
|
||||
LIBEXECDIR
|
||||
SYSCONFDIR
|
||||
SHAREDSTATEDIR
|
||||
LOCALSTATEDIR
|
||||
LIBDIR
|
||||
INCLUDEDIR
|
||||
OLDINCLUDEDIR
|
||||
DATAROOTDIR
|
||||
DATADIR
|
||||
INFODIR
|
||||
LOCALEDIR
|
||||
MANDIR
|
||||
DOCDIR
|
||||
)
|
||||
GNUInstallDirs_get_absolute_install_dir(CMAKE_INSTALL_FULL_${dir} CMAKE_INSTALL_${dir})
|
||||
endforeach()
|
||||
24
cmakescripts/cmake_uninstall.cmake.in
Normal file
24
cmakescripts/cmake_uninstall.cmake.in
Normal file
@@ -0,0 +1,24 @@
|
||||
# This code is from the CMake FAQ
|
||||
|
||||
if (NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"")
|
||||
endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
|
||||
|
||||
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
list(REVERSE files)
|
||||
foreach (file ${files})
|
||||
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||
if (EXISTS "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND "@CMAKE_COMMAND@" -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT ${rm_retval} EQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif (NOT ${rm_retval} EQUAL 0)
|
||||
else (EXISTS "$ENV{DESTDIR}${file}")
|
||||
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||
endif (EXISTS "$ENV{DESTDIR}${file}")
|
||||
endforeach(file)
|
||||
@@ -1,15 +0,0 @@
|
||||
if(NOT MD5)
|
||||
message(FATAL_ERROR "MD5 not specified")
|
||||
endif()
|
||||
|
||||
if(NOT FILE)
|
||||
message(FATAL_ERROR "FILE not specified")
|
||||
endif()
|
||||
|
||||
file(MD5 ${FILE} MD5FILE)
|
||||
|
||||
if(NOT MD5 STREQUAL MD5FILE)
|
||||
message(FATAL_ERROR "MD5 of ${FILE} should be ${MD5}, not ${MD5FILE}.")
|
||||
else()
|
||||
message(STATUS "${MD5}: OK")
|
||||
endif()
|
||||
@@ -24,7 +24,14 @@ file(GLOB FILES
|
||||
*_440_*.png
|
||||
*_440_*.ppm
|
||||
*_440_*.jpg
|
||||
*_440.yuv)
|
||||
*_440.yuv
|
||||
*_411_*.bmp
|
||||
*_411_*.png
|
||||
*_411_*.ppm
|
||||
*_411_*.jpg
|
||||
*_411.yuv
|
||||
tjbenchtest*.log
|
||||
tjexampletest*.log)
|
||||
|
||||
if(NOT FILES STREQUAL "")
|
||||
message(STATUS "Removing test files")
|
||||
|
||||
61
cmyk.h
Normal file
61
cmyk.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* cmyk.h
|
||||
*
|
||||
* Copyright (C) 2017-2018, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
* This file contains convenience functions for performing quick & dirty
|
||||
* CMYK<->RGB conversion. This algorithm is suitable for testing purposes
|
||||
* only. Properly converting between CMYK and RGB requires a color management
|
||||
* system.
|
||||
*/
|
||||
|
||||
#ifndef CMYK_H
|
||||
#define CMYK_H
|
||||
|
||||
#include <jinclude.h>
|
||||
#define JPEG_INTERNALS
|
||||
#include <jpeglib.h>
|
||||
#include "jconfigint.h"
|
||||
|
||||
|
||||
/* Fully reversible */
|
||||
|
||||
INLINE
|
||||
LOCAL(void)
|
||||
rgb_to_cmyk(JSAMPLE r, JSAMPLE g, JSAMPLE b, JSAMPLE *c, JSAMPLE *m,
|
||||
JSAMPLE *y, JSAMPLE *k)
|
||||
{
|
||||
double ctmp = 1.0 - ((double)r / 255.0);
|
||||
double mtmp = 1.0 - ((double)g / 255.0);
|
||||
double ytmp = 1.0 - ((double)b / 255.0);
|
||||
double ktmp = MIN(MIN(ctmp, mtmp), ytmp);
|
||||
|
||||
if (ktmp == 1.0) ctmp = mtmp = ytmp = 0.0;
|
||||
else {
|
||||
ctmp = (ctmp - ktmp) / (1.0 - ktmp);
|
||||
mtmp = (mtmp - ktmp) / (1.0 - ktmp);
|
||||
ytmp = (ytmp - ktmp) / (1.0 - ktmp);
|
||||
}
|
||||
*c = (JSAMPLE)(255.0 - ctmp * 255.0 + 0.5);
|
||||
*m = (JSAMPLE)(255.0 - mtmp * 255.0 + 0.5);
|
||||
*y = (JSAMPLE)(255.0 - ytmp * 255.0 + 0.5);
|
||||
*k = (JSAMPLE)(255.0 - ktmp * 255.0 + 0.5);
|
||||
}
|
||||
|
||||
|
||||
/* Fully reversible only for C/M/Y/K values generated with rgb_to_cmyk() */
|
||||
|
||||
INLINE
|
||||
LOCAL(void)
|
||||
cmyk_to_rgb(JSAMPLE c, JSAMPLE m, JSAMPLE y, JSAMPLE k, JSAMPLE *r, JSAMPLE *g,
|
||||
JSAMPLE *b)
|
||||
{
|
||||
*r = (JSAMPLE)((double)c * (double)k / 255.0 + 0.5);
|
||||
*g = (JSAMPLE)((double)m * (double)k / 255.0 + 0.5);
|
||||
*b = (JSAMPLE)((double)y * (double)k / 255.0 + 0.5);
|
||||
}
|
||||
|
||||
|
||||
#endif /* CMYK_H */
|
||||
@@ -1,8 +1,10 @@
|
||||
IJG JPEG LIBRARY: CODING RULES
|
||||
|
||||
This file was part of the Independent JPEG Group's software:
|
||||
Copyright (C) 1991-1996, Thomas G. Lane.
|
||||
This file is part of the Independent JPEG Group's software.
|
||||
For conditions of distribution and use, see the accompanying README file.
|
||||
It was modified by The libjpeg-turbo Project to include only information
|
||||
relevant to libjpeg-turbo.
|
||||
For conditions of distribution and use, see the accompanying README.ijg file.
|
||||
|
||||
|
||||
Since numerous people will be contributing code and bug fixes, it's important
|
||||
@@ -32,22 +34,7 @@ handled automatically by GNU Emacs and many other text editors.)
|
||||
Multi-word names should be written in lower case with underscores, e.g.,
|
||||
multi_word_name (not multiWordName). Preprocessor symbols and enum constants
|
||||
are similar but upper case (MULTI_WORD_NAME). Names should be unique within
|
||||
the first fifteen characters. (On some older systems, global names must be
|
||||
unique within six characters. We accommodate this without cluttering the
|
||||
source code by using macros to substitute shorter names.)
|
||||
|
||||
We use function prototypes everywhere; we rely on automatic source code
|
||||
transformation to feed prototype-less C compilers. Transformation is done
|
||||
by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript).
|
||||
ansi2knr is not very bright, so it imposes a format requirement on function
|
||||
declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions
|
||||
should be written in the following style:
|
||||
|
||||
LOCAL(int *)
|
||||
function_name (int a, char *b)
|
||||
{
|
||||
code...
|
||||
}
|
||||
the first fifteen characters.
|
||||
|
||||
Note that each function definition must begin with GLOBAL(type), LOCAL(type),
|
||||
or METHODDEF(type). These macros expand to "static type" or just "type" as
|
||||
@@ -55,32 +42,8 @@ appropriate. They provide a readable indication of the routine's usage and
|
||||
can readily be changed for special needs. (For instance, special linkage
|
||||
keywords can be inserted for use in Windows DLLs.)
|
||||
|
||||
ansi2knr does not transform method declarations (function pointers in
|
||||
structs). We handle these with a macro JMETHOD, defined as
|
||||
#ifdef HAVE_PROTOTYPES
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) arglist
|
||||
#else
|
||||
#define JMETHOD(type,methodname,arglist) type (*methodname) ()
|
||||
#endif
|
||||
which is used like this:
|
||||
struct function_pointers {
|
||||
JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp));
|
||||
JMETHOD(void, term_entropy_encoder, (void));
|
||||
};
|
||||
Note the set of parentheses surrounding the parameter list.
|
||||
|
||||
A similar solution is used for forward and external function declarations
|
||||
(see the EXTERN and JPP macros).
|
||||
|
||||
If the code is to work on non-ANSI compilers, we cannot rely on a prototype
|
||||
declaration to coerce actual parameters into the right types. Therefore, use
|
||||
explicit casts on actual parameters whenever the actual parameter type is not
|
||||
identical to the formal parameter. Beware of implicit conversions to "int".
|
||||
|
||||
It seems there are some non-ANSI compilers in which the sizeof() operator
|
||||
is defined to return int, yet size_t is defined as long. Needless to say,
|
||||
this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(),
|
||||
so that the result is guaranteed to be of type size_t.
|
||||
A similar solution is used for external function declarations (see the EXTERN
|
||||
macro.)
|
||||
|
||||
|
||||
The JPEG library is intended to be used within larger programs. Furthermore,
|
||||
@@ -94,9 +57,7 @@ pass these through the common routines provided.
|
||||
wherever possible. (Note that our method-based calling conventions help this
|
||||
a lot: in many modules only the initialization function will ever need to be
|
||||
called directly, so only that function need be externally visible.) All
|
||||
global function names should begin with "jpeg_", and should have an
|
||||
abbreviated name (unique in the first six characters) substituted by macro
|
||||
when NEED_SHORT_EXTERNAL_NAMES is set.
|
||||
global function names should begin with "jpeg_".
|
||||
|
||||
3. Don't use global variables; anything that must be used in another module
|
||||
should be in the common data structures.
|
||||
@@ -107,10 +68,9 @@ the system architecture document, structure.txt).
|
||||
|
||||
5. Source file names should begin with "j" for files that are part of the
|
||||
library proper; source files that are not part of the library, such as cjpeg.c
|
||||
and djpeg.c, do not begin with "j". Keep source file names to eight
|
||||
characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep
|
||||
compression and decompression code in separate source files --- some
|
||||
applications may want only one half of the library.
|
||||
and djpeg.c, do not begin with "j". Keep compression and decompression code in
|
||||
separate source files --- some applications may want only one half of the
|
||||
library.
|
||||
|
||||
Note: these rules (particularly #4) are not followed religiously in the
|
||||
modules that are used in cjpeg/djpeg but are not part of the JPEG library
|
||||
|
||||
513
configure.ac
513
configure.ac
@@ -1,513 +0,0 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.56])
|
||||
AC_INIT([libjpeg-turbo], [1.3.1])
|
||||
BUILD=`date +%Y%m%d`
|
||||
|
||||
AM_INIT_AUTOMAKE([-Wall foreign dist-bzip2])
|
||||
AC_PREFIX_DEFAULT(/opt/libjpeg-turbo)
|
||||
|
||||
# Always build with prototypes
|
||||
AC_DEFINE([HAVE_PROTOTYPES], 1, [Define if your compiler supports prototypes])
|
||||
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
# Checks for programs.
|
||||
SAVED_CFLAGS=${CFLAGS}
|
||||
SAVED_CPPFLAGS=${CPPFLAGS}
|
||||
AC_PROG_CPP
|
||||
AC_PROG_CC
|
||||
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||
AM_PROG_AS
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_LN_S
|
||||
|
||||
# When the prefix is /opt/libjpeg-turbo, we assume that an "official" binary is
|
||||
# being created, and thus we install things into specific locations.
|
||||
|
||||
old_prefix=${prefix}
|
||||
if test "x$prefix" = "xNONE" -a "x$ac_default_prefix" != "x"; then
|
||||
prefix=$ac_default_prefix
|
||||
fi
|
||||
DATADIR=`eval echo ${datadir}`
|
||||
DATADIR=`eval echo $DATADIR`
|
||||
if test "$DATADIR" = "/opt/libjpeg-turbo/share"; then
|
||||
datadir='${prefix}'
|
||||
fi
|
||||
DATADIR=`eval echo ${datarootdir}`
|
||||
DATADIR=`eval echo $DATADIR`
|
||||
if test "$DATADIR" = "/opt/libjpeg-turbo/share"; then
|
||||
datarootdir='${prefix}'
|
||||
fi
|
||||
|
||||
old_exec_prefix=${exec_prefix}
|
||||
if test "x$exec_prefix" = "xNONE"; then
|
||||
exec_prefix=${prefix}
|
||||
fi
|
||||
|
||||
if test "x${libdir}" = 'x${exec_prefix}/lib' -o "x${libdir}" = 'x${prefix}/lib'; then
|
||||
LIBDIR=`eval echo ${libdir}`
|
||||
LIBDIR=`eval echo $LIBDIR`
|
||||
if test "$LIBDIR" = "/opt/libjpeg-turbo/lib"; then
|
||||
case $host_os in
|
||||
darwin*)
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
if test "${ac_cv_sizeof_long}" = "8"; then
|
||||
libdir='${exec_prefix}/lib64'
|
||||
elif test "${ac_cv_sizeof_long}" = "4"; then
|
||||
libdir='${exec_prefix}/lib32'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
exec_prefix=${old_exec_prefix}
|
||||
prefix=${old_prefix}
|
||||
|
||||
# Check whether compiler supports pointers to undefined structures
|
||||
AC_MSG_CHECKING(whether compiler supports pointers to undefined structures)
|
||||
AC_TRY_COMPILE([ typedef struct undefined_structure * undef_struct_ptr; ], ,
|
||||
AC_MSG_RESULT(yes),
|
||||
[AC_MSG_RESULT(no)
|
||||
AC_DEFINE([INCOMPLETE_TYPES_BROKEN], [1],
|
||||
[Compiler does not support pointers to undefined structures.])])
|
||||
|
||||
if test "x${GCC}" = "xyes"; then
|
||||
if test "x${SAVED_CFLAGS}" = "x"; then
|
||||
CFLAGS=-O3
|
||||
fi
|
||||
if test "x${SAVED_CPPFLAGS}" = "x"; then
|
||||
CPPFLAGS=-Wall
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
|
||||
if test "x${SUNCC}" = "xyes"; then
|
||||
if test "x${SAVED_CFLAGS}" = "x"; then
|
||||
CFLAGS=-xO5
|
||||
fi
|
||||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
|
||||
AC_CHECK_HEADER([sys/types.h],
|
||||
AC_DEFINE([NEED_SYS_TYPES_H], 1, [Define if you have sys/types.h]))
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_CHAR_UNSIGNED
|
||||
AC_C_INLINE
|
||||
AC_TYPE_SIZE_T
|
||||
AC_CHECK_TYPES([unsigned char, unsigned short])
|
||||
|
||||
AC_MSG_CHECKING([if right shift is signed])
|
||||
AC_TRY_RUN(
|
||||
[#include <stdio.h>
|
||||
int is_shifting_signed (long arg) {
|
||||
long res = arg >> 4;
|
||||
|
||||
if (res == -0x7F7E80CL)
|
||||
return 1; /* right shift is signed */
|
||||
|
||||
/* see if unsigned-shift hack will fix it. */
|
||||
/* we can't just test exact value since it depends on width of long... */
|
||||
res |= (~0L) << (32-4);
|
||||
if (res == -0x7F7E80CL)
|
||||
return 0; /* right shift is unsigned */
|
||||
|
||||
printf("Right shift isn't acting as I expect it to.\n");
|
||||
printf("I fear the JPEG software will not work at all.\n\n");
|
||||
return 0; /* try it with unsigned anyway */
|
||||
}
|
||||
int main (void) {
|
||||
exit(is_shifting_signed(-0x7F7E80B1L));
|
||||
}],
|
||||
[AC_MSG_RESULT(no)
|
||||
AC_DEFINE([RIGHT_SHIFT_IS_UNSIGNED], 1, [Define if shift is unsigned])],
|
||||
[AC_MSG_RESULT(yes)],
|
||||
[AC_MSG_RESULT(Assuming that right shift is signed on target machine.)])
|
||||
|
||||
# test whether global names are unique to at least 15 chars
|
||||
AC_MSG_CHECKING([for short external names])
|
||||
AC_TRY_LINK(
|
||||
[int possibly_duplicate_function () { return 0; }
|
||||
int possibly_dupli_function () { return 1; }], [ ],
|
||||
[AC_MSG_RESULT(ok)],
|
||||
[AC_MSG_RESULT(short)
|
||||
AC_DEFINE([NEED_SHORT_EXTERNAL_NAMES], 1,
|
||||
[Define if you need short function names])])
|
||||
|
||||
# Checks for library functions.
|
||||
AC_CHECK_FUNCS([memset memcpy], [],
|
||||
[AC_DEFINE([NEED_BSD_STRINGS], 1,
|
||||
[Define if you have BSD-like bzero and bcopy])])
|
||||
|
||||
AC_MSG_CHECKING([libjpeg API version])
|
||||
AC_ARG_VAR(JPEG_LIB_VERSION, [libjpeg API version (62, 70, or 80)])
|
||||
if test "x$JPEG_LIB_VERSION" = "x"; then
|
||||
AC_ARG_WITH([jpeg7],
|
||||
AC_HELP_STRING([--with-jpeg7],
|
||||
[Emulate libjpeg v7 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b.)]))
|
||||
AC_ARG_WITH([jpeg8],
|
||||
AC_HELP_STRING([--with-jpeg8],
|
||||
[Emulate libjpeg v8 API/ABI (this makes libjpeg-turbo backward incompatible with libjpeg v6b.)]))
|
||||
if test "x${with_jpeg8}" = "xyes"; then
|
||||
JPEG_LIB_VERSION=80
|
||||
else
|
||||
if test "x${with_jpeg7}" = "xyes"; then
|
||||
JPEG_LIB_VERSION=70
|
||||
else
|
||||
JPEG_LIB_VERSION=62
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
JPEG_LIB_VERSION_DECIMAL=`expr $JPEG_LIB_VERSION / 10`.`expr $JPEG_LIB_VERSION % 10`
|
||||
AC_SUBST(JPEG_LIB_VERSION_DECIMAL)
|
||||
AC_MSG_RESULT([$JPEG_LIB_VERSION_DECIMAL])
|
||||
AC_DEFINE_UNQUOTED(JPEG_LIB_VERSION, [$JPEG_LIB_VERSION],
|
||||
[libjpeg API version])
|
||||
|
||||
AC_ARG_VAR(SO_MAJOR_VERSION,
|
||||
[Major version of the libjpeg-turbo shared library (default is determined by the API version)])
|
||||
AC_ARG_VAR(SO_MINOR_VERSION,
|
||||
[Minor version of the libjpeg-turbo shared library (default is determined by the API version)])
|
||||
if test "x$SO_MAJOR_VERSION" = "x"; then
|
||||
case "$JPEG_LIB_VERSION" in
|
||||
62) SO_MAJOR_VERSION=$JPEG_LIB_VERSION ;;
|
||||
*) SO_MAJOR_VERSION=`expr $JPEG_LIB_VERSION / 10` ;;
|
||||
esac
|
||||
fi
|
||||
if test "x$SO_MINOR_VERSION" = "x"; then
|
||||
case "$JPEG_LIB_VERSION" in
|
||||
80) SO_MINOR_VERSION=2 ;;
|
||||
*) SO_MINOR_VERSION=0 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
RPM_CONFIG_ARGS=
|
||||
|
||||
# Memory source/destination managers
|
||||
SO_AGE=0
|
||||
MEM_SRCDST_FUNCTIONS=
|
||||
if test "x${with_jpeg8}" != "xyes"; then
|
||||
AC_MSG_CHECKING([whether to include in-memory source/destination managers])
|
||||
AC_ARG_WITH([mem-srcdst],
|
||||
AC_HELP_STRING([--without-mem-srcdst],
|
||||
[Do not include in-memory source/destination manager functions when emulating the libjpeg v6b or v7 API/ABI]))
|
||||
if test "x$with_mem_srcdst" != "xno"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE([MEM_SRCDST_SUPPORTED], [1],
|
||||
[Support in-memory source/destination managers])
|
||||
SO_AGE=1
|
||||
MEM_SRCDST_FUNCTIONS="global: jpeg_mem_dest; jpeg_mem_src;";
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-mem-srcdst"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([libjpeg shared library version])
|
||||
AC_MSG_RESULT([$SO_MAJOR_VERSION.$SO_AGE.$SO_MINOR_VERSION])
|
||||
LIBTOOL_CURRENT=`expr $SO_MAJOR_VERSION + $SO_AGE`
|
||||
AC_SUBST(LIBTOOL_CURRENT)
|
||||
AC_SUBST(SO_MAJOR_VERSION)
|
||||
AC_SUBST(SO_MINOR_VERSION)
|
||||
AC_SUBST(SO_AGE)
|
||||
AC_SUBST(MEM_SRCDST_FUNCTIONS)
|
||||
|
||||
AC_DEFINE_UNQUOTED(LIBJPEG_TURBO_VERSION, [$VERSION], [libjpeg-turbo version])
|
||||
|
||||
VERSION_SCRIPT=yes
|
||||
AC_ARG_ENABLE([ld-version-script],
|
||||
AS_HELP_STRING([--disable-ld-version-script],
|
||||
[Disable linker version script for libjpeg-turbo (default is to use linker version script if the linker supports it)]),
|
||||
[VERSION_SCRIPT=$enableval], [])
|
||||
|
||||
AC_MSG_CHECKING([whether the linker supports version scripts])
|
||||
SAVED_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$LDFLAGS -Wl,--version-script,conftest.map"
|
||||
cat > conftest.map <<EOF
|
||||
VERS_1 {
|
||||
global: *;
|
||||
};
|
||||
EOF
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
|
||||
[VERSION_SCRIPT_FLAG=-Wl,--version-script,;
|
||||
AC_MSG_RESULT([yes (GNU style)])],
|
||||
[])
|
||||
if test "x$VERSION_SCRIPT_FLAG" = "x"; then
|
||||
LDFLAGS="$SAVED_LDFLAGS -Wl,-M,conftest.map"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
|
||||
[VERSION_SCRIPT_FLAG=-Wl,-M,;
|
||||
AC_MSG_RESULT([yes (Sun style)])],
|
||||
[])
|
||||
fi
|
||||
if test "x$VERSION_SCRIPT_FLAG" = "x"; then
|
||||
VERSION_SCRIPT=no
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
LDFLAGS="$SAVED_LDFLAGS"
|
||||
|
||||
AC_MSG_CHECKING([whether to use version script when building libjpeg-turbo])
|
||||
AC_MSG_RESULT($VERSION_SCRIPT)
|
||||
|
||||
AM_CONDITIONAL(VERSION_SCRIPT, test "x$VERSION_SCRIPT" = "xyes")
|
||||
AC_SUBST(VERSION_SCRIPT_FLAG)
|
||||
|
||||
# Check for non-broken inline under various spellings
|
||||
AC_MSG_CHECKING(for inline)
|
||||
ljt_cv_inline=""
|
||||
AC_TRY_COMPILE(, [} __attribute__((always_inline)) int foo() { return 0; }
|
||||
int bar() { return foo();], ljt_cv_inline="inline __attribute__((always_inline))",
|
||||
AC_TRY_COMPILE(, [} __inline__ int foo() { return 0; }
|
||||
int bar() { return foo();], ljt_cv_inline="__inline__",
|
||||
AC_TRY_COMPILE(, [} __inline int foo() { return 0; }
|
||||
int bar() { return foo();], ljt_cv_inline="__inline",
|
||||
AC_TRY_COMPILE(, [} inline int foo() { return 0; }
|
||||
int bar() { return foo();], ljt_cv_inline="inline"))))
|
||||
AC_MSG_RESULT($ljt_cv_inline)
|
||||
AC_DEFINE_UNQUOTED([INLINE],[$ljt_cv_inline],[How to obtain function inlining.])
|
||||
|
||||
# Arithmetic coding support
|
||||
AC_MSG_CHECKING([whether to include arithmetic encoding support])
|
||||
AC_ARG_WITH([arith-enc],
|
||||
AC_HELP_STRING([--without-arith-enc],
|
||||
[Do not include arithmetic encoding support]))
|
||||
if test "x$with_arith_enc" = "xno"; then
|
||||
AC_MSG_RESULT(no)
|
||||
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-arith-enc"
|
||||
else
|
||||
AC_DEFINE([C_ARITH_CODING_SUPPORTED], [1], [Support arithmetic encoding])
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_ARITH_ENC], [test "x$with_arith_enc" != "xno"])
|
||||
|
||||
AC_MSG_CHECKING([whether to include arithmetic decoding support])
|
||||
AC_ARG_WITH([arith-dec],
|
||||
AC_HELP_STRING([--without-arith-dec],
|
||||
[Do not include arithmetic decoding support]))
|
||||
if test "x$with_arith_dec" = "xno"; then
|
||||
AC_MSG_RESULT(no)
|
||||
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-arith-dec"
|
||||
else
|
||||
AC_DEFINE([D_ARITH_CODING_SUPPORTED], [1], [Support arithmetic decoding])
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_ARITH_DEC], [test "x$with_arith_dec" != "xno"])
|
||||
|
||||
AM_CONDITIONAL([WITH_ARITH],
|
||||
[test "x$with_arith_dec" != "xno" -o "x$with_arith_enc" != "xno"])
|
||||
|
||||
# TurboJPEG support
|
||||
AC_MSG_CHECKING([whether to build TurboJPEG C wrapper])
|
||||
AC_ARG_WITH([turbojpeg],
|
||||
AC_HELP_STRING([--without-turbojpeg],
|
||||
[Do not include the TurboJPEG wrapper library and associated test programs]))
|
||||
if test "x$with_turbojpeg" = "xno"; then
|
||||
AC_MSG_RESULT(no)
|
||||
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-turbojpeg"
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
|
||||
# Java support
|
||||
AC_ARG_VAR(JAVAC, [Java compiler command (default: javac)])
|
||||
if test "x$JAVAC" = "x"; then
|
||||
JAVAC=javac
|
||||
fi
|
||||
AC_SUBST(JAVAC)
|
||||
AC_ARG_VAR(JAVACFLAGS, [Java compiler flags])
|
||||
AC_SUBST(JAVACFLAGS)
|
||||
AC_ARG_VAR(JAR, [Java archive command (default: jar)])
|
||||
if test "x$JAR" = "x"; then
|
||||
JAR=jar
|
||||
fi
|
||||
AC_SUBST(JAR)
|
||||
AC_ARG_VAR(JAVA, [Java runtime command (default: java)])
|
||||
if test "x$JAVA" = "x"; then
|
||||
JAVA=java
|
||||
fi
|
||||
AC_SUBST(JAVA)
|
||||
AC_ARG_VAR(JNI_CFLAGS,
|
||||
[C compiler flags needed to include jni.h (default: -I/System/Library/Frameworks/JavaVM.framework/Headers on OS X, '-I/usr/java/include -I/usr/java/include/solaris' on Solaris, and '-I/usr/java/default/include -I/usr/java/default/include/linux' on Linux)])
|
||||
|
||||
AC_MSG_CHECKING([whether to build TurboJPEG Java wrapper])
|
||||
AC_ARG_WITH([java],
|
||||
AC_HELP_STRING([--with-java], [Build Java wrapper for the TurboJPEG library]))
|
||||
if test "x$with_turbojpeg" = "xno"; then
|
||||
with_java=no
|
||||
fi
|
||||
|
||||
WITH_JAVA=0
|
||||
if test "x$with_java" = "xyes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
case $host_os in
|
||||
darwin*)
|
||||
DEFAULT_JNI_CFLAGS=-I/System/Library/Frameworks/JavaVM.framework/Headers
|
||||
;;
|
||||
solaris*)
|
||||
DEFAULT_JNI_CFLAGS='-I/usr/java/include -I/usr/java/include/solaris'
|
||||
;;
|
||||
linux*)
|
||||
DEFAULT_JNI_CFLAGS='-I/usr/java/default/include -I/usr/java/default/include/linux'
|
||||
;;
|
||||
esac
|
||||
if test "x$JNI_CFLAGS" = "x"; then
|
||||
JNI_CFLAGS=$DEFAULT_JNI_CFLAGS
|
||||
fi
|
||||
|
||||
SAVE_CPPFLAGS=${CPPFLAGS}
|
||||
CPPFLAGS="${CPPFLAGS} ${JNI_CFLAGS}"
|
||||
AC_CHECK_HEADERS([jni.h], [DUMMY=1],
|
||||
[AC_MSG_ERROR([Could not find JNI header file])])
|
||||
CPPFLAGS=${SAVE_CPPFLAGS}
|
||||
AC_SUBST(JNI_CFLAGS)
|
||||
|
||||
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --with-java"
|
||||
JAVA_RPM_CONTENTS_1='%dir %{_datadir}/classes'
|
||||
JAVA_RPM_CONTENTS_2=%{_datadir}/classes/turbojpeg.jar
|
||||
WITH_JAVA=1
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_JAVA], [test "x$with_java" = "xyes"])
|
||||
AC_SUBST(WITH_JAVA)
|
||||
AC_SUBST(JAVA_RPM_CONTENTS_1)
|
||||
AC_SUBST(JAVA_RPM_CONTENTS_2)
|
||||
|
||||
# optionally force using gas-preprocessor.pl for compatibility testing
|
||||
AC_ARG_WITH([gas-preprocessor],
|
||||
AC_HELP_STRING([--with-gas-preprocessor],
|
||||
[Force using gas-preprocessor.pl on ARM.]))
|
||||
if test "x${with_gas_preprocessor}" = "xyes"; then
|
||||
case $host_os in
|
||||
darwin*)
|
||||
CCAS="gas-preprocessor.pl -fix-unreq $CC"
|
||||
;;
|
||||
*)
|
||||
CCAS="gas-preprocessor.pl -no-fix-unreq $CC"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST([CCAS])
|
||||
fi
|
||||
|
||||
# SIMD is optional
|
||||
AC_ARG_WITH([simd],
|
||||
AC_HELP_STRING([--without-simd], [Do not include SIMD extensions]))
|
||||
if test "x${with_simd}" != "xno"; then
|
||||
require_simd=no
|
||||
if test "x${with_simd}" = "xyes"; then
|
||||
require_simd=yes
|
||||
fi
|
||||
# Check if we're on a supported CPU
|
||||
AC_MSG_CHECKING([if we have SIMD optimisations for cpu type])
|
||||
case "$host_cpu" in
|
||||
x86_64 | amd64)
|
||||
AC_MSG_RESULT([yes (x86_64)])
|
||||
AC_PROG_NASM
|
||||
simd_arch=x86_64
|
||||
;;
|
||||
i*86 | x86 | ia32)
|
||||
AC_MSG_RESULT([yes (i386)])
|
||||
AC_PROG_NASM
|
||||
simd_arch=i386
|
||||
;;
|
||||
arm*)
|
||||
AC_MSG_RESULT([yes (arm)])
|
||||
AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used])
|
||||
AC_CHECK_COMPATIBLE_ARM_ASSEMBLER_IFELSE(
|
||||
[AC_MSG_RESULT([yes])
|
||||
simd_arch=arm],
|
||||
[AC_MSG_RESULT([no])
|
||||
with_simd=no])
|
||||
if test "x${with_simd}" = "xno"; then
|
||||
if test "x${require_simd}" = "xyes"; then
|
||||
AC_MSG_ERROR([SIMD support can't be enabled.])
|
||||
else
|
||||
AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.])
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([no ("$host_cpu")])
|
||||
with_simd=no;
|
||||
if test "x${require_simd}" = "xyes"; then
|
||||
AC_MSG_ERROR([SIMD support not available for this CPU.])
|
||||
else
|
||||
AC_MSG_WARN([SIMD support not available for this CPU. Performance will suffer.])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "x${with_simd}" != "xno"; then
|
||||
AC_DEFINE([WITH_SIMD], [1], [Use accelerated SIMD routines.])
|
||||
fi
|
||||
else
|
||||
RPM_CONFIG_ARGS="$RPM_CONFIG_ARGS --without-simd"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([WITH_SIMD], [test "x$with_simd" != "xno"])
|
||||
AM_CONDITIONAL([WITH_SSE_FLOAT_DCT], [test "x$simd_arch" = "xx86_64" -o "x$simd_arch" = "xi386"])
|
||||
AM_CONDITIONAL([SIMD_I386], [test "x$simd_arch" = "xi386"])
|
||||
AM_CONDITIONAL([SIMD_X86_64], [test "x$simd_arch" = "xx86_64"])
|
||||
AM_CONDITIONAL([SIMD_ARM], [test "x$simd_arch" = "xarm"])
|
||||
AM_CONDITIONAL([X86_64], [test "x$host_cpu" = "xx86_64" -o "x$host_cpu" = "xamd64"])
|
||||
AM_CONDITIONAL([WITH_TURBOJPEG], [test "x$with_turbojpeg" != "xno"])
|
||||
|
||||
AC_ARG_VAR(PKGNAME, [distribution package name (default: libjpeg-turbo)])
|
||||
if test "x$PKGNAME" = "x"; then
|
||||
PKGNAME=$PACKAGE_NAME
|
||||
fi
|
||||
AC_SUBST(PKGNAME)
|
||||
|
||||
case "$host_cpu" in
|
||||
x86_64)
|
||||
RPMARCH=x86_64
|
||||
DEBARCH=amd64
|
||||
;;
|
||||
i*86 | x86 | ia32)
|
||||
RPMARCH=i386
|
||||
DEBARCH=i386
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(RPMARCH)
|
||||
AC_SUBST(RPM_CONFIG_ARGS)
|
||||
AC_SUBST(DEBARCH)
|
||||
AC_SUBST(BUILD)
|
||||
AC_DEFINE_UNQUOTED([BUILD], "$BUILD", [Build number])
|
||||
|
||||
# jconfig.h is the file we use, but we have another before that to
|
||||
# fool autoheader. the reason is that we include this header in our
|
||||
# API headers, which can screw things up for users of the lib.
|
||||
# jconfig.h is a minimal version that allows this package to be built
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_HEADERS([jconfig.h])
|
||||
AC_CONFIG_FILES([pkgscripts/libjpeg-turbo.spec.tmpl:release/libjpeg-turbo.spec.in])
|
||||
AC_CONFIG_FILES([pkgscripts/makecygwinpkg.tmpl:release/makecygwinpkg.in])
|
||||
AC_CONFIG_FILES([pkgscripts/makedpkg.tmpl:release/makedpkg.in])
|
||||
AC_CONFIG_FILES([pkgscripts/makemacpkg.tmpl:release/makemacpkg.in])
|
||||
AC_CONFIG_FILES([pkgscripts/Description.plist:release/Description.plist.in])
|
||||
AC_CONFIG_FILES([pkgscripts/Info.plist:release/Info.plist.in])
|
||||
AC_CONFIG_FILES([pkgscripts/uninstall.tmpl:release/uninstall.in])
|
||||
if test "x$with_turbojpeg" != "xno"; then
|
||||
AC_CONFIG_FILES([tjbenchtest])
|
||||
fi
|
||||
if test "x$with_java" = "xyes"; then
|
||||
AC_CONFIG_FILES([tjbenchtest.java])
|
||||
AC_CONFIG_FILES([tjexampletest])
|
||||
fi
|
||||
AC_CONFIG_FILES([libjpeg.map])
|
||||
AC_CONFIG_FILES([Makefile simd/Makefile])
|
||||
AC_CONFIG_FILES([java/Makefile])
|
||||
AC_CONFIG_FILES([md5/Makefile])
|
||||
AC_OUTPUT
|
||||
76
djpeg.1
76
djpeg.1
@@ -1,4 +1,4 @@
|
||||
.TH DJPEG 1 "18 January 2013"
|
||||
.TH DJPEG 1 "13 November 2017"
|
||||
.SH NAME
|
||||
djpeg \- decompress a JPEG file to an image file
|
||||
.SH SYNOPSIS
|
||||
@@ -55,11 +55,14 @@ default options are chosen for highest quality output.) Currently, this is
|
||||
equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR.
|
||||
.TP
|
||||
.B \-grayscale
|
||||
Force gray-scale output even if JPEG file is color. Useful for viewing on
|
||||
Force grayscale output even if JPEG file is color. Useful for viewing on
|
||||
monochrome displays; also,
|
||||
.B djpeg
|
||||
runs noticeably faster in this mode.
|
||||
.TP
|
||||
.B \-rgb
|
||||
Force RGB output even if JPEG file is grayscale.
|
||||
.TP
|
||||
.BI \-scale " M/N"
|
||||
Scale the output image by a factor M/N. Currently the scale factor must be
|
||||
M/8, where M is an integer between 1 and 16 inclusive, or any reduced fraction
|
||||
@@ -74,7 +77,7 @@ emitted if
|
||||
.B \-colors
|
||||
or
|
||||
.B \-grayscale
|
||||
is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
|
||||
is specified, or if the JPEG file is grayscale; otherwise, 24-bit full-color
|
||||
format is emitted.
|
||||
.TP
|
||||
.B \-gif
|
||||
@@ -88,12 +91,12 @@ emitted if
|
||||
.B \-colors
|
||||
or
|
||||
.B \-grayscale
|
||||
is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
|
||||
is specified, or if the JPEG file is grayscale; otherwise, 24-bit full-color
|
||||
format is emitted.
|
||||
.TP
|
||||
.B \-pnm
|
||||
Select PBMPLUS (PPM/PGM) output format (this is the default format).
|
||||
PGM is emitted if the JPEG file is gray-scale or if
|
||||
PGM is emitted if the JPEG file is grayscale or if
|
||||
.B \-grayscale
|
||||
is specified; otherwise PPM is emitted.
|
||||
.TP
|
||||
@@ -101,8 +104,8 @@ is specified; otherwise PPM is emitted.
|
||||
Select RLE output format. (Requires URT library.)
|
||||
.TP
|
||||
.B \-targa
|
||||
Select Targa output format. Gray-scale format is emitted if the JPEG file is
|
||||
gray-scale or if
|
||||
Select Targa output format. Grayscale format is emitted if the JPEG file is
|
||||
grayscale or if
|
||||
.B \-grayscale
|
||||
is specified; otherwise, colormapped format is emitted if
|
||||
.B \-colors
|
||||
@@ -115,14 +118,28 @@ Use integer DCT method (default).
|
||||
.TP
|
||||
.B \-dct fast
|
||||
Use fast integer DCT (less accurate).
|
||||
In libjpeg-turbo, the fast method is generally about 5-15% faster than the int
|
||||
method when using the x86/x86-64 SIMD extensions (results may vary with other
|
||||
SIMD implementations, or when using libjpeg-turbo without SIMD extensions.) If
|
||||
the JPEG image was compressed using a quality level of 85 or below, then there
|
||||
should be little or no perceptible difference between the two algorithms. When
|
||||
decompressing images that were compressed using quality levels above 85,
|
||||
however, the difference between the fast and int methods becomes more
|
||||
pronounced. With images compressed using quality=97, for instance, the fast
|
||||
method incurs generally about a 4-6 dB loss (in PSNR) relative to the int
|
||||
method, but this can be larger for some images. If you can avoid it, do not
|
||||
use the fast method when decompressing images that were compressed using
|
||||
quality levels above 97. The algorithm often degenerates for such images and
|
||||
can actually produce a more lossy output image than if the JPEG image had been
|
||||
compressed using lower quality levels.
|
||||
.TP
|
||||
.B \-dct float
|
||||
Use floating-point DCT method.
|
||||
The float method is very slightly more accurate than the int method, but is
|
||||
much slower unless your machine has very fast floating-point hardware. Also
|
||||
note that results of the floating-point method may vary slightly across
|
||||
machines, while the integer methods should give the same results everywhere.
|
||||
The fast integer method is much less accurate than the other two.
|
||||
The float method is mainly a legacy feature. It does not produce significantly
|
||||
more accurate results than the int method, and it is much slower. The float
|
||||
method may also give different results on different machines due to varying
|
||||
roundoff behavior, whereas the integer methods should give the same results on
|
||||
all machines.
|
||||
.TP
|
||||
.B \-dither fs
|
||||
Use Floyd-Steinberg dithering in color quantization.
|
||||
@@ -140,6 +157,9 @@ Ordered dither is only available in
|
||||
.B \-onepass
|
||||
mode.
|
||||
.TP
|
||||
.BI \-icc " file"
|
||||
Extract ICC color management profile to the specified file.
|
||||
.TP
|
||||
.BI \-map " file"
|
||||
Quantize to the colors used in the specified image file. This is useful for
|
||||
producing multiple files with identical color maps, or for forcing a
|
||||
@@ -160,7 +180,7 @@ faster and needs less memory, but it produces a lower-quality image.
|
||||
is ignored unless you also say
|
||||
.B \-colors
|
||||
.IR N .
|
||||
Also, the one-pass method is always used for gray-scale output (the two-pass
|
||||
Also, the one-pass method is always used for grayscale output (the two-pass
|
||||
method is no improvement then).
|
||||
.TP
|
||||
.BI \-maxmemory " N"
|
||||
@@ -168,7 +188,7 @@ Set limit for amount of memory to use in processing large images. Value is
|
||||
in thousands of bytes, or millions of bytes if "M" is attached to the
|
||||
number. For example,
|
||||
.B \-max 4m
|
||||
selects 4000000 bytes. If more space is needed, temporary files will be used.
|
||||
selects 4000000 bytes. If more space is needed, an error will occur.
|
||||
.TP
|
||||
.BI \-outfile " name"
|
||||
Send output image to the named file, not to standard output.
|
||||
@@ -177,6 +197,19 @@ Send output image to the named file, not to standard output.
|
||||
Load input file into memory before decompressing. This feature was implemented
|
||||
mainly as a way of testing the in-memory source manager (jpeg_mem_src().)
|
||||
.TP
|
||||
.BI \-skip " Y0,Y1"
|
||||
Decompress all rows of the JPEG image except those between Y0 and Y1
|
||||
(inclusive.) Note that if decompression scaling is being used, then Y0 and Y1
|
||||
are relative to the scaled image dimensions.
|
||||
.TP
|
||||
.BI \-crop " WxH+X+Y"
|
||||
Decompress only a rectangular subregion of the image, starting at point X,Y
|
||||
with width W and height H. If necessary, X will be shifted left to the nearest
|
||||
iMCU boundary, and the width will be increased accordingly. Note that if
|
||||
decompression scaling is being used, then X, Y, W, and H are relative to the
|
||||
scaled image dimensions. Currently this option only works with the
|
||||
PBMPLUS (PPM/PGM), GIF, and Targa output formats.
|
||||
.TP
|
||||
.B \-verbose
|
||||
Enable debug printout. More
|
||||
.BR \-v 's
|
||||
@@ -185,6 +218,9 @@ give more output. Also, version information is printed at startup.
|
||||
.B \-debug
|
||||
Same as
|
||||
.BR \-verbose .
|
||||
.TP
|
||||
.B \-version
|
||||
Print version information and exit.
|
||||
.SH EXAMPLES
|
||||
.LP
|
||||
This example decompresses the JPEG file foo.jpg, quantizes it to
|
||||
@@ -251,8 +287,10 @@ Independent JPEG Group
|
||||
This file was modified by The libjpeg-turbo Project to include only information
|
||||
relevant to libjpeg-turbo, to wordsmith certain sections, and to describe
|
||||
features not present in libjpeg.
|
||||
.SH BUGS
|
||||
To avoid the Unisys LZW patent,
|
||||
.B djpeg
|
||||
produces uncompressed GIF files. These are larger than they should be, but
|
||||
are readable by standard GIF decoders.
|
||||
.SH ISSUES
|
||||
Support for compressed GIF output files was removed in djpeg v6b due to
|
||||
concerns over the Unisys LZW patent. Although this patent expired in 2006,
|
||||
djpeg still lacks compressed GIF support, for these historical reasons.
|
||||
(Conversion of JPEG files to GIF is usually a bad idea anyway, since GIF is a
|
||||
256-color format.) The uncompressed GIF files that djpeg generates are larger
|
||||
than they should be, but they are readable by standard GIF decoders.
|
||||
|
||||
232
djpeg.c
232
djpeg.c
@@ -3,9 +3,12 @@
|
||||
*
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Copyright (C) 1991-1997, Thomas G. Lane.
|
||||
* Modified 2013 by Guido Vollbeding.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2010-2011, 2013, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
* Copyright (C) 2010-2011, 2013-2017, D. R. Commander.
|
||||
* Copyright (C) 2015, Google, Inc.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
* This file contains a command-line user interface for the JPEG decompressor.
|
||||
* It should work on any system with Unix- or MS-DOS-style command lines.
|
||||
@@ -27,7 +30,11 @@
|
||||
|
||||
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||
#include "jversion.h" /* for version message */
|
||||
#include "config.h"
|
||||
#include "jconfigint.h"
|
||||
|
||||
#ifndef HAVE_STDLIB_H /* <stdlib.h> should declare free() */
|
||||
extern void free(void *ptr);
|
||||
#endif
|
||||
|
||||
#include <ctype.h> /* to declare isprint() */
|
||||
|
||||
@@ -44,7 +51,7 @@
|
||||
|
||||
/* Create the add-on message string table. */
|
||||
|
||||
#define JMESSAGE(code,string) string ,
|
||||
#define JMESSAGE(code, string) string,
|
||||
|
||||
static const char * const cdjpeg_message_table[] = {
|
||||
#include "cderror.h"
|
||||
@@ -85,14 +92,18 @@ static IMAGE_FORMATS requested_fmt;
|
||||
*/
|
||||
|
||||
|
||||
static const char * progname; /* program name for error messages */
|
||||
static char * outfilename; /* for -outfile switch */
|
||||
static const char *progname; /* program name for error messages */
|
||||
static char *icc_filename; /* for -icc switch */
|
||||
static char *outfilename; /* for -outfile switch */
|
||||
boolean memsrc; /* for -memsrc switch */
|
||||
boolean skip, crop;
|
||||
JDIMENSION skip_start, skip_end;
|
||||
JDIMENSION crop_x, crop_y, crop_width, crop_height;
|
||||
#define INPUT_BUF_SIZE 4096
|
||||
|
||||
|
||||
LOCAL(void)
|
||||
usage (void)
|
||||
usage(void)
|
||||
/* complain about bad command line */
|
||||
{
|
||||
fprintf(stderr, "usage: %s [switches] ", progname);
|
||||
@@ -107,6 +118,7 @@ usage (void)
|
||||
fprintf(stderr, " -fast Fast, low-quality processing\n");
|
||||
fprintf(stderr, " -grayscale Force grayscale output\n");
|
||||
fprintf(stderr, " -rgb Force RGB output\n");
|
||||
fprintf(stderr, " -rgb565 Force RGB565 output\n");
|
||||
#ifdef IDCT_SCALING_SUPPORTED
|
||||
fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n");
|
||||
#endif
|
||||
@@ -150,6 +162,7 @@ usage (void)
|
||||
fprintf(stderr, " -dither fs Use F-S dithering (default)\n");
|
||||
fprintf(stderr, " -dither none Don't use dithering in quantization\n");
|
||||
fprintf(stderr, " -dither ordered Use ordered dither (medium speed, quality)\n");
|
||||
fprintf(stderr, " -icc FILE Extract ICC profile to FILE\n");
|
||||
#ifdef QUANT_2PASS_SUPPORTED
|
||||
fprintf(stderr, " -map FILE Map to colors used in named image file\n");
|
||||
#endif
|
||||
@@ -163,13 +176,17 @@ usage (void)
|
||||
fprintf(stderr, " -memsrc Load input file into memory before decompressing\n");
|
||||
#endif
|
||||
|
||||
fprintf(stderr, " -skip Y0,Y1 Decompress all rows except those between Y0 and Y1 (inclusive)\n");
|
||||
fprintf(stderr, " -crop WxH+X+Y Decompress only a rectangular subregion of the image\n");
|
||||
fprintf(stderr, " [requires PBMPLUS (PPM/PGM), GIF, or Targa output format]\n");
|
||||
fprintf(stderr, " -verbose or -debug Emit debug output\n");
|
||||
fprintf(stderr, " -version Print version information and exit\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
LOCAL(int)
|
||||
parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
||||
parse_switches(j_decompress_ptr cinfo, int argc, char **argv,
|
||||
int last_file_arg_seen, boolean for_real)
|
||||
/* Parse optional switches.
|
||||
* Returns argv[] index of first file-name argument (== argc if none).
|
||||
@@ -181,12 +198,15 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
||||
*/
|
||||
{
|
||||
int argn;
|
||||
char * arg;
|
||||
char *arg;
|
||||
|
||||
/* Set up default JPEG parameters. */
|
||||
requested_fmt = DEFAULT_FMT; /* set default output file format */
|
||||
icc_filename = NULL;
|
||||
outfilename = NULL;
|
||||
memsrc = FALSE;
|
||||
skip = FALSE;
|
||||
crop = FALSE;
|
||||
cinfo->err->trace_level = 0;
|
||||
|
||||
/* Scan command line options, adjust parameters */
|
||||
@@ -250,7 +270,7 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
||||
/* On first -d, print version identification */
|
||||
static boolean printed_version = FALSE;
|
||||
|
||||
if (! printed_version) {
|
||||
if (!printed_version) {
|
||||
fprintf(stderr, "%s version %s (build %s)\n",
|
||||
PACKAGE_NAME, VERSION, BUILD);
|
||||
fprintf(stderr, "%s\n\n", JCOPYRIGHT);
|
||||
@@ -260,11 +280,16 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
||||
}
|
||||
cinfo->err->trace_level++;
|
||||
|
||||
} else if (keymatch(arg, "version", 4)) {
|
||||
fprintf(stderr, "%s version %s (build %s)\n",
|
||||
PACKAGE_NAME, VERSION, BUILD);
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
} else if (keymatch(arg, "fast", 1)) {
|
||||
/* Select recommended processing options for quick-and-dirty output. */
|
||||
cinfo->two_pass_quantize = FALSE;
|
||||
cinfo->dither_mode = JDITHER_ORDERED;
|
||||
if (! cinfo->quantize_colors) /* don't override an earlier -colors */
|
||||
if (!cinfo->quantize_colors) /* don't override an earlier -colors */
|
||||
cinfo->desired_number_of_colors = 216;
|
||||
cinfo->dct_method = JDCT_FASTEST;
|
||||
cinfo->do_fancy_upsampling = FALSE;
|
||||
@@ -273,7 +298,8 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
||||
/* GIF output format. */
|
||||
requested_fmt = FMT_GIF;
|
||||
|
||||
} else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) {
|
||||
} else if (keymatch(arg, "grayscale", 2) ||
|
||||
keymatch(arg, "greyscale", 2)) {
|
||||
/* Force monochrome output. */
|
||||
cinfo->out_color_space = JCS_GRAYSCALE;
|
||||
|
||||
@@ -281,13 +307,24 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
||||
/* Force RGB output. */
|
||||
cinfo->out_color_space = JCS_RGB;
|
||||
|
||||
} else if (keymatch(arg, "rgb565", 2)) {
|
||||
/* Force RGB565 output. */
|
||||
cinfo->out_color_space = JCS_RGB565;
|
||||
|
||||
} else if (keymatch(arg, "icc", 1)) {
|
||||
/* Set ICC filename. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
icc_filename = argv[argn];
|
||||
jpeg_save_markers(cinfo, JPEG_APP0 + 2, 0xFFFF);
|
||||
|
||||
} else if (keymatch(arg, "map", 3)) {
|
||||
/* Quantize to a color map taken from an input file. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (for_real) { /* too expensive to do twice! */
|
||||
#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */
|
||||
FILE * mapfile;
|
||||
FILE *mapfile;
|
||||
|
||||
if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) {
|
||||
fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]);
|
||||
@@ -350,14 +387,32 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
||||
/* RLE output format. */
|
||||
requested_fmt = FMT_RLE;
|
||||
|
||||
} else if (keymatch(arg, "scale", 1)) {
|
||||
} else if (keymatch(arg, "scale", 2)) {
|
||||
/* Scale the output image by a fraction M/N. */
|
||||
if (++argn >= argc) /* advance to next argument */
|
||||
usage();
|
||||
if (sscanf(argv[argn], "%d/%d",
|
||||
if (sscanf(argv[argn], "%u/%u",
|
||||
&cinfo->scale_num, &cinfo->scale_denom) != 2)
|
||||
usage();
|
||||
|
||||
} else if (keymatch(arg, "skip", 2)) {
|
||||
if (++argn >= argc)
|
||||
usage();
|
||||
if (sscanf(argv[argn], "%u,%u", &skip_start, &skip_end) != 2 ||
|
||||
skip_start > skip_end)
|
||||
usage();
|
||||
skip = TRUE;
|
||||
|
||||
} else if (keymatch(arg, "crop", 2)) {
|
||||
char c;
|
||||
if (++argn >= argc)
|
||||
usage();
|
||||
if (sscanf(argv[argn], "%u%c%u+%u+%u", &crop_width, &c, &crop_height,
|
||||
&crop_x, &crop_y) != 5 ||
|
||||
(c != 'X' && c != 'x') || crop_width < 1 || crop_height < 1)
|
||||
usage();
|
||||
crop = TRUE;
|
||||
|
||||
} else if (keymatch(arg, "targa", 1)) {
|
||||
/* Targa output format. */
|
||||
requested_fmt = FMT_TARGA;
|
||||
@@ -379,13 +434,13 @@ parse_switches (j_decompress_ptr cinfo, int argc, char **argv,
|
||||
*/
|
||||
|
||||
LOCAL(unsigned int)
|
||||
jpeg_getc (j_decompress_ptr cinfo)
|
||||
jpeg_getc(j_decompress_ptr cinfo)
|
||||
/* Read next byte */
|
||||
{
|
||||
struct jpeg_source_mgr * datasrc = cinfo->src;
|
||||
struct jpeg_source_mgr *datasrc = cinfo->src;
|
||||
|
||||
if (datasrc->bytes_in_buffer == 0) {
|
||||
if (! (*datasrc->fill_input_buffer) (cinfo))
|
||||
if (!(*datasrc->fill_input_buffer) (cinfo))
|
||||
ERREXIT(cinfo, JERR_CANT_SUSPEND);
|
||||
}
|
||||
datasrc->bytes_in_buffer--;
|
||||
@@ -394,10 +449,10 @@ jpeg_getc (j_decompress_ptr cinfo)
|
||||
|
||||
|
||||
METHODDEF(boolean)
|
||||
print_text_marker (j_decompress_ptr cinfo)
|
||||
print_text_marker(j_decompress_ptr cinfo)
|
||||
{
|
||||
boolean traceit = (cinfo->err->trace_level >= 1);
|
||||
INT32 length;
|
||||
long length;
|
||||
unsigned int ch;
|
||||
unsigned int lastch = 0;
|
||||
|
||||
@@ -407,10 +462,10 @@ print_text_marker (j_decompress_ptr cinfo)
|
||||
|
||||
if (traceit) {
|
||||
if (cinfo->unread_marker == JPEG_COM)
|
||||
fprintf(stderr, "Comment, length %ld:\n", (long) length);
|
||||
fprintf(stderr, "Comment, length %ld:\n", (long)length);
|
||||
else /* assume it is an APPn otherwise */
|
||||
fprintf(stderr, "APP%d, length %ld:\n",
|
||||
cinfo->unread_marker - JPEG_APP0, (long) length);
|
||||
cinfo->unread_marker - JPEG_APP0, (long)length);
|
||||
}
|
||||
|
||||
while (--length >= 0) {
|
||||
@@ -449,7 +504,7 @@ print_text_marker (j_decompress_ptr cinfo)
|
||||
*/
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
struct jpeg_decompress_struct cinfo;
|
||||
struct jpeg_error_mgr jerr;
|
||||
@@ -458,8 +513,8 @@ main (int argc, char **argv)
|
||||
#endif
|
||||
int file_index;
|
||||
djpeg_dest_ptr dest_mgr = NULL;
|
||||
FILE * input_file;
|
||||
FILE * output_file;
|
||||
FILE *input_file;
|
||||
FILE *output_file;
|
||||
unsigned char *inbuffer = NULL;
|
||||
unsigned long insize = 0;
|
||||
JDIMENSION num_scanlines;
|
||||
@@ -488,12 +543,7 @@ main (int argc, char **argv)
|
||||
* but don't try to override APP0 or APP14 this way (see libjpeg.txt).
|
||||
*/
|
||||
jpeg_set_marker_processor(&cinfo, JPEG_COM, print_text_marker);
|
||||
jpeg_set_marker_processor(&cinfo, JPEG_APP0+12, print_text_marker);
|
||||
|
||||
/* Now safe to enable signal catcher. */
|
||||
#ifdef NEED_SIGNAL_CATCHER
|
||||
enable_signal_catcher((j_common_ptr) &cinfo);
|
||||
#endif
|
||||
jpeg_set_marker_processor(&cinfo, JPEG_APP0 + 12, print_text_marker);
|
||||
|
||||
/* Scan command line to find file names. */
|
||||
/* It is convenient to use just one switch-parsing routine, but the switch
|
||||
@@ -508,14 +558,14 @@ main (int argc, char **argv)
|
||||
#ifdef TWO_FILE_COMMANDLINE
|
||||
/* Must have either -outfile switch or explicit output file name */
|
||||
if (outfilename == NULL) {
|
||||
if (file_index != argc-2) {
|
||||
if (file_index != argc - 2) {
|
||||
fprintf(stderr, "%s: must name one input and one output file\n",
|
||||
progname);
|
||||
usage();
|
||||
}
|
||||
outfilename = argv[file_index+1];
|
||||
outfilename = argv[file_index + 1];
|
||||
} else {
|
||||
if (file_index != argc-1) {
|
||||
if (file_index != argc - 1) {
|
||||
fprintf(stderr, "%s: must name one input and one output file\n",
|
||||
progname);
|
||||
usage();
|
||||
@@ -523,7 +573,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
#else
|
||||
/* Unix style: expect zero or one file name */
|
||||
if (file_index < argc-1) {
|
||||
if (file_index < argc - 1) {
|
||||
fprintf(stderr, "%s: only one input file\n", progname);
|
||||
usage();
|
||||
}
|
||||
@@ -552,7 +602,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
|
||||
#ifdef PROGRESS_REPORT
|
||||
start_progress_monitor((j_common_ptr) &cinfo, &progress);
|
||||
start_progress_monitor((j_common_ptr)&cinfo, &progress);
|
||||
#endif
|
||||
|
||||
/* Specify data source for decompression */
|
||||
@@ -582,7 +632,7 @@ main (int argc, char **argv)
|
||||
jpeg_stdio_src(&cinfo, input_file);
|
||||
|
||||
/* Read file header, set default decompression parameters */
|
||||
(void) jpeg_read_header(&cinfo, TRUE);
|
||||
(void)jpeg_read_header(&cinfo, TRUE);
|
||||
|
||||
/* Adjust default decompression parameters by re-parsing the options */
|
||||
file_index = parse_switches(&cinfo, argc, argv, 0, TRUE);
|
||||
@@ -593,10 +643,10 @@ main (int argc, char **argv)
|
||||
switch (requested_fmt) {
|
||||
#ifdef BMP_SUPPORTED
|
||||
case FMT_BMP:
|
||||
dest_mgr = jinit_write_bmp(&cinfo, FALSE);
|
||||
dest_mgr = jinit_write_bmp(&cinfo, FALSE, TRUE);
|
||||
break;
|
||||
case FMT_OS2:
|
||||
dest_mgr = jinit_write_bmp(&cinfo, TRUE);
|
||||
dest_mgr = jinit_write_bmp(&cinfo, TRUE, TRUE);
|
||||
break;
|
||||
#endif
|
||||
#ifdef GIF_SUPPORTED
|
||||
@@ -626,8 +676,82 @@ main (int argc, char **argv)
|
||||
dest_mgr->output_file = output_file;
|
||||
|
||||
/* Start decompressor */
|
||||
(void) jpeg_start_decompress(&cinfo);
|
||||
(void)jpeg_start_decompress(&cinfo);
|
||||
|
||||
/* Skip rows */
|
||||
if (skip) {
|
||||
JDIMENSION tmp;
|
||||
|
||||
/* Check for valid skip_end. We cannot check this value until after
|
||||
* jpeg_start_decompress() is called. Note that we have already verified
|
||||
* that skip_start <= skip_end.
|
||||
*/
|
||||
if (skip_end > cinfo.output_height - 1) {
|
||||
fprintf(stderr, "%s: skip region exceeds image height %d\n", progname,
|
||||
cinfo.output_height);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Write output file header. This is a hack to ensure that the destination
|
||||
* manager creates an output image of the proper size.
|
||||
*/
|
||||
tmp = cinfo.output_height;
|
||||
cinfo.output_height -= (skip_end - skip_start + 1);
|
||||
(*dest_mgr->start_output) (&cinfo, dest_mgr);
|
||||
cinfo.output_height = tmp;
|
||||
|
||||
/* Process data */
|
||||
while (cinfo.output_scanline < skip_start) {
|
||||
num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
|
||||
dest_mgr->buffer_height);
|
||||
(*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
|
||||
}
|
||||
jpeg_skip_scanlines(&cinfo, skip_end - skip_start + 1);
|
||||
while (cinfo.output_scanline < cinfo.output_height) {
|
||||
num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
|
||||
dest_mgr->buffer_height);
|
||||
(*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
|
||||
}
|
||||
|
||||
/* Decompress a subregion */
|
||||
} else if (crop) {
|
||||
JDIMENSION tmp;
|
||||
|
||||
/* Check for valid crop dimensions. We cannot check these values until
|
||||
* after jpeg_start_decompress() is called.
|
||||
*/
|
||||
if (crop_x + crop_width > cinfo.output_width ||
|
||||
crop_y + crop_height > cinfo.output_height) {
|
||||
fprintf(stderr, "%s: crop dimensions exceed image dimensions %d x %d\n",
|
||||
progname, cinfo.output_width, cinfo.output_height);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
jpeg_crop_scanline(&cinfo, &crop_x, &crop_width);
|
||||
if (dest_mgr->calc_buffer_dimensions)
|
||||
(*dest_mgr->calc_buffer_dimensions) (&cinfo, dest_mgr);
|
||||
else
|
||||
ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT);
|
||||
|
||||
/* Write output file header. This is a hack to ensure that the destination
|
||||
* manager creates an output image of the proper size.
|
||||
*/
|
||||
tmp = cinfo.output_height;
|
||||
cinfo.output_height = crop_height;
|
||||
(*dest_mgr->start_output) (&cinfo, dest_mgr);
|
||||
cinfo.output_height = tmp;
|
||||
|
||||
/* Process data */
|
||||
jpeg_skip_scanlines(&cinfo, crop_y);
|
||||
while (cinfo.output_scanline < crop_y + crop_height) {
|
||||
num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
|
||||
dest_mgr->buffer_height);
|
||||
(*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
|
||||
}
|
||||
jpeg_skip_scanlines(&cinfo, cinfo.output_height - crop_y - crop_height);
|
||||
|
||||
/* Normal full-image decompress */
|
||||
} else {
|
||||
/* Write output file header */
|
||||
(*dest_mgr->start_output) (&cinfo, dest_mgr);
|
||||
|
||||
@@ -637,6 +761,7 @@ main (int argc, char **argv)
|
||||
dest_mgr->buffer_height);
|
||||
(*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PROGRESS_REPORT
|
||||
/* Hack: count final pass as done in case finish_output does an extra pass.
|
||||
@@ -645,12 +770,35 @@ main (int argc, char **argv)
|
||||
progress.pub.completed_passes = progress.pub.total_passes;
|
||||
#endif
|
||||
|
||||
if (icc_filename != NULL) {
|
||||
FILE *icc_file;
|
||||
JOCTET *icc_profile;
|
||||
unsigned int icc_len;
|
||||
|
||||
if ((icc_file = fopen(icc_filename, WRITE_BINARY)) == NULL) {
|
||||
fprintf(stderr, "%s: can't open %s\n", progname, icc_filename);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (jpeg_read_icc_profile(&cinfo, &icc_profile, &icc_len)) {
|
||||
if (fwrite(icc_profile, icc_len, 1, icc_file) < 1) {
|
||||
fprintf(stderr, "%s: can't read ICC profile from %s\n", progname,
|
||||
icc_filename);
|
||||
free(icc_profile);
|
||||
fclose(icc_file);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
free(icc_profile);
|
||||
fclose(icc_file);
|
||||
} else if (cinfo.err->msg_code != JWRN_BOGUS_ICC)
|
||||
fprintf(stderr, "%s: no ICC profile data in JPEG file\n", progname);
|
||||
}
|
||||
|
||||
/* Finish decompression and release memory.
|
||||
* I must do it in this order because output module has allocated memory
|
||||
* of lifespan JPOOL_IMAGE; it needs to finish before releasing memory.
|
||||
*/
|
||||
(*dest_mgr->finish_output) (&cinfo, dest_mgr);
|
||||
(void) jpeg_finish_decompress(&cinfo);
|
||||
(void)jpeg_finish_decompress(&cinfo);
|
||||
jpeg_destroy_decompress(&cinfo);
|
||||
|
||||
/* Close files, if we opened them */
|
||||
@@ -660,7 +808,7 @@ main (int argc, char **argv)
|
||||
fclose(output_file);
|
||||
|
||||
#ifdef PROGRESS_REPORT
|
||||
end_progress_monitor((j_common_ptr) &cinfo);
|
||||
end_progress_monitor((j_common_ptr)&cinfo);
|
||||
#endif
|
||||
|
||||
if (memsrc && inbuffer != NULL)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
@@ -23,7 +24,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TurboJPEG
|
||||
 <span id="projectnumber">1.2.1</span>
|
||||
 <span id="projectnumber">2.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
@@ -23,7 +24,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TurboJPEG
|
||||
 <span id="projectnumber">1.2.1</span>
|
||||
 <span id="projectnumber">2.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
3
doc/html/doxygen-extra.css
Normal file
3
doc/html/doxygen-extra.css
Normal file
@@ -0,0 +1,3 @@
|
||||
code {
|
||||
color: #4665A2;
|
||||
}
|
||||
@@ -14,6 +14,7 @@
|
||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
@@ -23,7 +24,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TurboJPEG
|
||||
 <span id="projectnumber">1.2.1</span>
|
||||
 <span id="projectnumber">2.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
@@ -23,7 +24,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TurboJPEG
|
||||
 <span id="projectnumber">1.2.1</span>
|
||||
 <span id="projectnumber">2.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,7 @@
|
||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
@@ -23,7 +24,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TurboJPEG
|
||||
 <span id="projectnumber">1.2.1</span>
|
||||
 <span id="projectnumber">2.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
@@ -23,7 +24,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TurboJPEG
|
||||
 <span id="projectnumber">1.2.1</span>
|
||||
 <span id="projectnumber">2.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -1,35 +1,53 @@
|
||||
var searchData=
|
||||
[
|
||||
['tj_5fnumcs',['TJ_NUMCS',['../group___turbo_j_p_e_g.html#ga39f57a6fb02d9cf32e7b6890099b5a71',1,'turbojpeg.h']]],
|
||||
['tj_5fnumerr',['TJ_NUMERR',['../group___turbo_j_p_e_g.html#ga79bde1b4a3e2351e00887e47781b966e',1,'turbojpeg.h']]],
|
||||
['tj_5fnumpf',['TJ_NUMPF',['../group___turbo_j_p_e_g.html#ga7010a4402f54a45ba822ad8675a4655e',1,'turbojpeg.h']]],
|
||||
['tj_5fnumsamp',['TJ_NUMSAMP',['../group___turbo_j_p_e_g.html#ga5ef3d169162ce77ce348e292a0b7477c',1,'turbojpeg.h']]],
|
||||
['tj_5fnumxop',['TJ_NUMXOP',['../group___turbo_j_p_e_g.html#ga0f6dbd18adf38b7d46ac547f0f4d562c',1,'turbojpeg.h']]],
|
||||
['tjalloc',['tjAlloc',['../group___turbo_j_p_e_g.html#ga5c9234bda6d993cdaffdd89bf81a00ff',1,'turbojpeg.h']]],
|
||||
['tjalloc',['tjAlloc',['../group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83',1,'turbojpeg.h']]],
|
||||
['tjalphaoffset',['tjAlphaOffset',['../group___turbo_j_p_e_g.html#ga5af0ab065feefd526debf1e20c43e837',1,'turbojpeg.h']]],
|
||||
['tjblueoffset',['tjBlueOffset',['../group___turbo_j_p_e_g.html#ga84e2e35d3f08025f976ec1ec53693dea',1,'turbojpeg.h']]],
|
||||
['tjbufsize',['tjBufSize',['../group___turbo_j_p_e_g.html#gaccc5bca7f12fcdcc302e6e1c6d4b311b',1,'turbojpeg.h']]],
|
||||
['tjbufsizeyuv',['tjBufSizeYUV',['../group___turbo_j_p_e_g.html#ga9d0cb06fd5052d21b6f2b382db8b219c',1,'turbojpeg.h']]],
|
||||
['tjcompress2',['tjCompress2',['../group___turbo_j_p_e_g.html#gaba62b7a98f960839b588579898495cf2',1,'turbojpeg.h']]],
|
||||
['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gada69cc6443d1bb493b40f1626259e5e9',1,'turbojpeg.h']]],
|
||||
['tjdecompressheader2',['tjDecompressHeader2',['../group___turbo_j_p_e_g.html#gac5675fceb7997b385516cdffdb34e6aa',1,'turbojpeg.h']]],
|
||||
['tjdecompresstoyuv',['tjDecompressToYUV',['../group___turbo_j_p_e_g.html#gad7810af095624a4016e72957a50f77d8',1,'turbojpeg.h']]],
|
||||
['tjdestroy',['tjDestroy',['../group___turbo_j_p_e_g.html#ga674adee917b95ad4a896f1ba39e12540',1,'turbojpeg.h']]],
|
||||
['tjencodeyuv2',['tjEncodeYUV2',['../group___turbo_j_p_e_g.html#ga0fa4e7b1943687c6a0c0304529c55d35',1,'turbojpeg.h']]],
|
||||
['tjbufsize',['tjBufSize',['../group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90',1,'turbojpeg.h']]],
|
||||
['tjbufsizeyuv2',['tjBufSizeYUV2',['../group___turbo_j_p_e_g.html#ga2be2b9969d4df9ecce9b05deed273194',1,'turbojpeg.h']]],
|
||||
['tjcompress2',['tjCompress2',['../group___turbo_j_p_e_g.html#gafbdce0112fd78fd38efae841443a9bcf',1,'turbojpeg.h']]],
|
||||
['tjcompressfromyuv',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#ga7622a459b79aa1007e005b58783f875b',1,'turbojpeg.h']]],
|
||||
['tjcompressfromyuvplanes',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#ga29ec5dfbd2d84b8724e951d6fa0d5d9e',1,'turbojpeg.h']]],
|
||||
['tjcs',['TJCS',['../group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720',1,'turbojpeg.h']]],
|
||||
['tjcs_5fcmyk',['TJCS_CMYK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53',1,'turbojpeg.h']]],
|
||||
['tjcs_5fgray',['TJCS_GRAY',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720ab3e7d6a87f695e45b81c1b5262b5a50a',1,'turbojpeg.h']]],
|
||||
['tjcs_5frgb',['TJCS_RGB',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555',1,'turbojpeg.h']]],
|
||||
['tjcs_5fycbcr',['TJCS_YCbCr',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75',1,'turbojpeg.h']]],
|
||||
['tjcs_5fycck',['TJCS_YCCK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e',1,'turbojpeg.h']]],
|
||||
['tjdecodeyuv',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga70abbf38f77a26fd6da8813bef96f695',1,'turbojpeg.h']]],
|
||||
['tjdecodeyuvplanes',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9',1,'turbojpeg.h']]],
|
||||
['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013',1,'turbojpeg.h']]],
|
||||
['tjdecompressheader3',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77',1,'turbojpeg.h']]],
|
||||
['tjdecompresstoyuv2',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga04d1e839ff9a0860dd1475cff78d3364',1,'turbojpeg.h']]],
|
||||
['tjdecompresstoyuvplanes',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540',1,'turbojpeg.h']]],
|
||||
['tjdestroy',['tjDestroy',['../group___turbo_j_p_e_g.html#ga75f355fa27225ba1a4ee392c852394d2',1,'turbojpeg.h']]],
|
||||
['tjencodeyuv3',['tjEncodeYUV3',['../group___turbo_j_p_e_g.html#gac519b922cdf446e97d0cdcba513636bf',1,'turbojpeg.h']]],
|
||||
['tjencodeyuvplanes',['tjEncodeYUVPlanes',['../group___turbo_j_p_e_g.html#gae2d04c72457fe7f4d60cf78ab1b1feb1',1,'turbojpeg.h']]],
|
||||
['tjerr',['TJERR',['../group___turbo_j_p_e_g.html#gafbc17cfa57d0d5d11fea35ac025950fe',1,'turbojpeg.h']]],
|
||||
['tjerr_5ffatal',['TJERR_FATAL',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950feafc9cceeada13122b09e4851e3788039a',1,'turbojpeg.h']]],
|
||||
['tjerr_5fwarning',['TJERR_WARNING',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950fea342dd6e2aedb47bb257b4e7568329b59',1,'turbojpeg.h']]],
|
||||
['tjflag_5faccuratedct',['TJFLAG_ACCURATEDCT',['../group___turbo_j_p_e_g.html#gacb233cfd722d66d1ccbf48a7de81f0e0',1,'turbojpeg.h']]],
|
||||
['tjflag_5fbottomup',['TJFLAG_BOTTOMUP',['../group___turbo_j_p_e_g.html#ga72ecf4ebe6eb702d3c6f5ca27455e1ec',1,'turbojpeg.h']]],
|
||||
['tjflag_5ffastdct',['TJFLAG_FASTDCT',['../group___turbo_j_p_e_g.html#gaabce235db80d3f698b27f36cbd453da2',1,'turbojpeg.h']]],
|
||||
['tjflag_5ffastupsample',['TJFLAG_FASTUPSAMPLE',['../group___turbo_j_p_e_g.html#ga4ee4506c81177a06f77e2504a22efd2d',1,'turbojpeg.h']]],
|
||||
['tjflag_5fforcemmx',['TJFLAG_FORCEMMX',['../group___turbo_j_p_e_g.html#ga4e872f11c82f241736fa8297920f24e5',1,'turbojpeg.h']]],
|
||||
['tjflag_5fforcesse',['TJFLAG_FORCESSE',['../group___turbo_j_p_e_g.html#gae17e63189e8cd730feed3efbd2454f38',1,'turbojpeg.h']]],
|
||||
['tjflag_5fforcesse2',['TJFLAG_FORCESSE2',['../group___turbo_j_p_e_g.html#ga8cf0bca96ea4d472563f4b0ebf8c48e7',1,'turbojpeg.h']]],
|
||||
['tjflag_5fforcesse3',['TJFLAG_FORCESSE3',['../group___turbo_j_p_e_g.html#gaf9d49066633404da4386d70820295dd2',1,'turbojpeg.h']]],
|
||||
['tjflag_5fnorealloc',['TJFLAG_NOREALLOC',['../group___turbo_j_p_e_g.html#ga8808d403c68b62aaa58a4c1e58e98963',1,'turbojpeg.h']]],
|
||||
['tjfree',['tjFree',['../group___turbo_j_p_e_g.html#ga8c4a1231dc06a450514c835f6471f137',1,'turbojpeg.h']]],
|
||||
['tjgeterrorstr',['tjGetErrorStr',['../group___turbo_j_p_e_g.html#ga9af79c908ec131b1ae8d52fe40375abf',1,'turbojpeg.h']]],
|
||||
['tjgetscalingfactors',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#ga6449044b9af402999ccf52f401333be8',1,'turbojpeg.h']]],
|
||||
['tjflag_5fprogressive',['TJFLAG_PROGRESSIVE',['../group___turbo_j_p_e_g.html#ga43b426750b46190a25d34a67ef76df1b',1,'turbojpeg.h']]],
|
||||
['tjflag_5fstoponwarning',['TJFLAG_STOPONWARNING',['../group___turbo_j_p_e_g.html#ga519cfa4ef6c18d9e5b455fdf59306a3a',1,'turbojpeg.h']]],
|
||||
['tjfree',['tjFree',['../group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b',1,'turbojpeg.h']]],
|
||||
['tjgeterrorcode',['tjGetErrorCode',['../group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410',1,'turbojpeg.h']]],
|
||||
['tjgeterrorstr2',['tjGetErrorStr2',['../group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa',1,'turbojpeg.h']]],
|
||||
['tjgetscalingfactors',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#gac3854476006b10787bd128f7ede48057',1,'turbojpeg.h']]],
|
||||
['tjgreenoffset',['tjGreenOffset',['../group___turbo_j_p_e_g.html#ga82d6e35da441112a411da41923c0ba2f',1,'turbojpeg.h']]],
|
||||
['tjhandle',['tjhandle',['../group___turbo_j_p_e_g.html#ga758d2634ecb4949de7815cba621f5763',1,'turbojpeg.h']]],
|
||||
['tjinitcompress',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga3d10c47fbe4a2489a2b30c931551d01a',1,'turbojpeg.h']]],
|
||||
['tjinitdecompress',['tjInitDecompress',['../group___turbo_j_p_e_g.html#gae5408179d041e2a2f7199c8283cf649e',1,'turbojpeg.h']]],
|
||||
['tjinittransform',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga3155b775bfbac9dbba869b95a0367902',1,'turbojpeg.h']]],
|
||||
['tjinitcompress',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga9d63a05fc6d813f4aae06107041a37e8',1,'turbojpeg.h']]],
|
||||
['tjinitdecompress',['tjInitDecompress',['../group___turbo_j_p_e_g.html#ga52300eac3f3d9ef4bab303bc244f62d3',1,'turbojpeg.h']]],
|
||||
['tjinittransform',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga928beff6ac248ceadf01089fc6b41957',1,'turbojpeg.h']]],
|
||||
['tjloadimage',['tjLoadImage',['../group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7',1,'turbojpeg.h']]],
|
||||
['tjmcuheight',['tjMCUHeight',['../group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf',1,'turbojpeg.h']]],
|
||||
['tjmcuwidth',['tjMCUWidth',['../group___turbo_j_p_e_g.html#ga9e61e7cd47a15a173283ba94e781308c',1,'turbojpeg.h']]],
|
||||
['tjpad',['TJPAD',['../group___turbo_j_p_e_g.html#ga0aba955473315e405295d978f0c16511',1,'turbojpeg.h']]],
|
||||
@@ -39,24 +57,31 @@ var searchData=
|
||||
['tjpf_5fbgr',['TJPF_BGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839',1,'turbojpeg.h']]],
|
||||
['tjpf_5fbgra',['TJPF_BGRA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aac037ff1845cf9b74bb81a3659c2b9fb4',1,'turbojpeg.h']]],
|
||||
['tjpf_5fbgrx',['TJPF_BGRX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8',1,'turbojpeg.h']]],
|
||||
['tjpf_5fcmyk',['TJPF_CMYK',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b',1,'turbojpeg.h']]],
|
||||
['tjpf_5fgray',['TJPF_GRAY',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a',1,'turbojpeg.h']]],
|
||||
['tjpf_5frgb',['TJPF_RGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7ce93230bff449518ce387c17e6ed37c',1,'turbojpeg.h']]],
|
||||
['tjpf_5frgba',['TJPF_RGBA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12',1,'turbojpeg.h']]],
|
||||
['tjpf_5frgbx',['TJPF_RGBX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01',1,'turbojpeg.h']]],
|
||||
['tjpf_5funknown',['TJPF_UNKNOWN',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed',1,'turbojpeg.h']]],
|
||||
['tjpf_5fxbgr',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',1,'turbojpeg.h']]],
|
||||
['tjpf_5fxrgb',['TJPF_XRGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84',1,'turbojpeg.h']]],
|
||||
['tjpixelsize',['tjPixelSize',['../group___turbo_j_p_e_g.html#gad77cf8fe5b2bfd3cb3f53098146abb4c',1,'turbojpeg.h']]],
|
||||
['tjplaneheight',['tjPlaneHeight',['../group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f',1,'turbojpeg.h']]],
|
||||
['tjplanesizeyuv',['tjPlaneSizeYUV',['../group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d',1,'turbojpeg.h']]],
|
||||
['tjplanewidth',['tjPlaneWidth',['../group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1',1,'turbojpeg.h']]],
|
||||
['tjredoffset',['tjRedOffset',['../group___turbo_j_p_e_g.html#gadd9b446742ac8a3923f7992c7988fea8',1,'turbojpeg.h']]],
|
||||
['tjregion',['tjregion',['../structtjregion.html',1,'']]],
|
||||
['tjsamp',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]],
|
||||
['tjsamp_5f411',['TJSAMP_411',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a28ec62575e5ea295c3fde3001dc628e2',1,'turbojpeg.h']]],
|
||||
['tjsamp_5f420',['TJSAMP_420',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737',1,'turbojpeg.h']]],
|
||||
['tjsamp_5f422',['TJSAMP_422',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a136130902cc578f11f32429b59368404',1,'turbojpeg.h']]],
|
||||
['tjsamp_5f440',['TJSAMP_440',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974',1,'turbojpeg.h']]],
|
||||
['tjsamp_5f444',['TJSAMP_444',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074afb8da4f44197837bdec0a4f593dacae3',1,'turbojpeg.h']]],
|
||||
['tjsamp_5fgray',['TJSAMP_GRAY',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a3f1c9504842ddc7a48d0f690754b6248',1,'turbojpeg.h']]],
|
||||
['tjsaveimage',['tjSaveImage',['../group___turbo_j_p_e_g.html#ga6f445b22d8933ae4815b3370a538d879',1,'turbojpeg.h']]],
|
||||
['tjscaled',['TJSCALED',['../group___turbo_j_p_e_g.html#ga84878bb65404204743aa18cac02781df',1,'turbojpeg.h']]],
|
||||
['tjscalingfactor',['tjscalingfactor',['../structtjscalingfactor.html',1,'']]],
|
||||
['tjtransform',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#gaa29f3189c41be12ec5dee7caec318a31',1,'tjtransform(): turbojpeg.h'],['../group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616',1,'tjTransform(tjhandle handle, unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms, int flags): turbojpeg.h']]],
|
||||
['tjtransform',['tjtransform',['../structtjtransform.html',1,'tjtransform'],['../group___turbo_j_p_e_g.html#gaa29f3189c41be12ec5dee7caec318a31',1,'tjtransform(): turbojpeg.h'],['../group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25',1,'tjTransform(tjhandle handle, const unsigned char *jpegBuf, unsigned long jpegSize, int n, unsigned char **dstBufs, unsigned long *dstSizes, tjtransform *transforms, int flags): turbojpeg.h']]],
|
||||
['tjxop',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]],
|
||||
['tjxop_5fhflip',['TJXOP_HFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aa0df69776caa30f0fa28e26332d311ce',1,'turbojpeg.h']]],
|
||||
['tjxop_5fnone',['TJXOP_NONE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866aad88c0366cd3f7d0eac9d7a3fa1c2c27',1,'turbojpeg.h']]],
|
||||
@@ -66,10 +91,12 @@ var searchData=
|
||||
['tjxop_5ftranspose',['TJXOP_TRANSPOSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a31060aed199f886afdd417f80499c32d',1,'turbojpeg.h']]],
|
||||
['tjxop_5ftransverse',['TJXOP_TRANSVERSE',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866af3b14d488aea6ece9e5b3df73a74d6a4',1,'turbojpeg.h']]],
|
||||
['tjxop_5fvflip',['TJXOP_VFLIP',['../group___turbo_j_p_e_g.html#gga2de531af4e7e6c4f124908376b354866a324eddfbec53b7e691f61e56929d0d5d',1,'turbojpeg.h']]],
|
||||
['tjxopt_5fcopynone',['TJXOPT_COPYNONE',['../group___turbo_j_p_e_g.html#ga153b468cfb905d0de61706c838986fe8',1,'turbojpeg.h']]],
|
||||
['tjxopt_5fcrop',['TJXOPT_CROP',['../group___turbo_j_p_e_g.html#ga9c771a757fc1294add611906b89ab2d2',1,'turbojpeg.h']]],
|
||||
['tjxopt_5fgray',['TJXOPT_GRAY',['../group___turbo_j_p_e_g.html#ga3acee7b48ade1b99e5588736007c2589',1,'turbojpeg.h']]],
|
||||
['tjxopt_5fnooutput',['TJXOPT_NOOUTPUT',['../group___turbo_j_p_e_g.html#gafbf992bbf6e006705886333703ffab31',1,'turbojpeg.h']]],
|
||||
['tjxopt_5fperfect',['TJXOPT_PERFECT',['../group___turbo_j_p_e_g.html#ga50e03cb5ed115330e212417429600b00',1,'turbojpeg.h']]],
|
||||
['tjxopt_5fprogressive',['TJXOPT_PROGRESSIVE',['../group___turbo_j_p_e_g.html#gad2371c80674584ecc1a7d75e564cf026',1,'turbojpeg.h']]],
|
||||
['tjxopt_5ftrim',['TJXOPT_TRIM',['../group___turbo_j_p_e_g.html#ga319826b7eb1583c0595bbe7b95428709',1,'turbojpeg.h']]],
|
||||
['turbojpeg',['TurboJPEG',['../group___turbo_j_p_e_g.html',1,'']]]
|
||||
];
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
var searchData=
|
||||
[
|
||||
['tjcs',['TJCS',['../group___turbo_j_p_e_g.html#ga4f83ad3368e0e29d1957be0efa7c3720',1,'turbojpeg.h']]],
|
||||
['tjerr',['TJERR',['../group___turbo_j_p_e_g.html#gafbc17cfa57d0d5d11fea35ac025950fe',1,'turbojpeg.h']]],
|
||||
['tjpf',['TJPF',['../group___turbo_j_p_e_g.html#gac916144e26c3817ac514e64ae5d12e2a',1,'turbojpeg.h']]],
|
||||
['tjsamp',['TJSAMP',['../group___turbo_j_p_e_g.html#ga1d047060ea80bb9820d540bb928e9074',1,'turbojpeg.h']]],
|
||||
['tjxop',['TJXOP',['../group___turbo_j_p_e_g.html#ga2de531af4e7e6c4f124908376b354866',1,'turbojpeg.h']]]
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
var searchData=
|
||||
[
|
||||
['tjcs_5fcmyk',['TJCS_CMYK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a6c8b636152ac8195b869587db315ee53',1,'turbojpeg.h']]],
|
||||
['tjcs_5fgray',['TJCS_GRAY',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720ab3e7d6a87f695e45b81c1b5262b5a50a',1,'turbojpeg.h']]],
|
||||
['tjcs_5frgb',['TJCS_RGB',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a677cb7ccb85c4038ac41964a2e09e555',1,'turbojpeg.h']]],
|
||||
['tjcs_5fycbcr',['TJCS_YCbCr',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a7389b8f65bb387ffedce3efd0d78ec75',1,'turbojpeg.h']]],
|
||||
['tjcs_5fycck',['TJCS_YCCK',['../group___turbo_j_p_e_g.html#gga4f83ad3368e0e29d1957be0efa7c3720a53839e0fe867b76b58d16b0a1a7c598e',1,'turbojpeg.h']]],
|
||||
['tjerr_5ffatal',['TJERR_FATAL',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950feafc9cceeada13122b09e4851e3788039a',1,'turbojpeg.h']]],
|
||||
['tjerr_5fwarning',['TJERR_WARNING',['../group___turbo_j_p_e_g.html#ggafbc17cfa57d0d5d11fea35ac025950fea342dd6e2aedb47bb257b4e7568329b59',1,'turbojpeg.h']]],
|
||||
['tjpf_5fabgr',['TJPF_ABGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa1ba1a7f1631dbeaa49a0a85fc4a40081',1,'turbojpeg.h']]],
|
||||
['tjpf_5fargb',['TJPF_ARGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aae8f846ed9d9de99b6e1dfe448848765c',1,'turbojpeg.h']]],
|
||||
['tjpf_5fbgr',['TJPF_BGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aab10624437fb8ef495a0b153e65749839',1,'turbojpeg.h']]],
|
||||
['tjpf_5fbgra',['TJPF_BGRA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aac037ff1845cf9b74bb81a3659c2b9fb4',1,'turbojpeg.h']]],
|
||||
['tjpf_5fbgrx',['TJPF_BGRX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa2a1fbf569ca79897eae886e3376ca4c8',1,'turbojpeg.h']]],
|
||||
['tjpf_5fcmyk',['TJPF_CMYK',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7f5100ec44c91994e243f1cf55553f8b',1,'turbojpeg.h']]],
|
||||
['tjpf_5fgray',['TJPF_GRAY',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa5431b54b015337705f13118073711a1a',1,'turbojpeg.h']]],
|
||||
['tjpf_5frgb',['TJPF_RGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa7ce93230bff449518ce387c17e6ed37c',1,'turbojpeg.h']]],
|
||||
['tjpf_5frgba',['TJPF_RGBA',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa88d2e88fab67f6503cf972e14851cc12',1,'turbojpeg.h']]],
|
||||
['tjpf_5frgbx',['TJPF_RGBX',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa83973bebb7e2dc6fa8bae89ff3f42e01',1,'turbojpeg.h']]],
|
||||
['tjpf_5funknown',['TJPF_UNKNOWN',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aa84c1a6cead7952998e2fb895844a21ed',1,'turbojpeg.h']]],
|
||||
['tjpf_5fxbgr',['TJPF_XBGR',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aaf6603b27147de47e212e75dac027b2af',1,'turbojpeg.h']]],
|
||||
['tjpf_5fxrgb',['TJPF_XRGB',['../group___turbo_j_p_e_g.html#ggac916144e26c3817ac514e64ae5d12e2aadae996905efcfa3b42a0bb3bea7f9d84',1,'turbojpeg.h']]],
|
||||
['tjsamp_5f411',['TJSAMP_411',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a28ec62575e5ea295c3fde3001dc628e2',1,'turbojpeg.h']]],
|
||||
['tjsamp_5f420',['TJSAMP_420',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a63085dbf683cfe39e513cdb6343e3737',1,'turbojpeg.h']]],
|
||||
['tjsamp_5f422',['TJSAMP_422',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074a136130902cc578f11f32429b59368404',1,'turbojpeg.h']]],
|
||||
['tjsamp_5f440',['TJSAMP_440',['../group___turbo_j_p_e_g.html#gga1d047060ea80bb9820d540bb928e9074accf740e6f3aa6ba20ba922cad13cb974',1,'turbojpeg.h']]],
|
||||
|
||||
@@ -1,19 +1,31 @@
|
||||
var searchData=
|
||||
[
|
||||
['tjalloc',['tjAlloc',['../group___turbo_j_p_e_g.html#ga5c9234bda6d993cdaffdd89bf81a00ff',1,'turbojpeg.h']]],
|
||||
['tjbufsize',['tjBufSize',['../group___turbo_j_p_e_g.html#gaccc5bca7f12fcdcc302e6e1c6d4b311b',1,'turbojpeg.h']]],
|
||||
['tjbufsizeyuv',['tjBufSizeYUV',['../group___turbo_j_p_e_g.html#ga9d0cb06fd5052d21b6f2b382db8b219c',1,'turbojpeg.h']]],
|
||||
['tjcompress2',['tjCompress2',['../group___turbo_j_p_e_g.html#gaba62b7a98f960839b588579898495cf2',1,'turbojpeg.h']]],
|
||||
['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gada69cc6443d1bb493b40f1626259e5e9',1,'turbojpeg.h']]],
|
||||
['tjdecompressheader2',['tjDecompressHeader2',['../group___turbo_j_p_e_g.html#gac5675fceb7997b385516cdffdb34e6aa',1,'turbojpeg.h']]],
|
||||
['tjdecompresstoyuv',['tjDecompressToYUV',['../group___turbo_j_p_e_g.html#gad7810af095624a4016e72957a50f77d8',1,'turbojpeg.h']]],
|
||||
['tjdestroy',['tjDestroy',['../group___turbo_j_p_e_g.html#ga674adee917b95ad4a896f1ba39e12540',1,'turbojpeg.h']]],
|
||||
['tjencodeyuv2',['tjEncodeYUV2',['../group___turbo_j_p_e_g.html#ga0fa4e7b1943687c6a0c0304529c55d35',1,'turbojpeg.h']]],
|
||||
['tjfree',['tjFree',['../group___turbo_j_p_e_g.html#ga8c4a1231dc06a450514c835f6471f137',1,'turbojpeg.h']]],
|
||||
['tjgeterrorstr',['tjGetErrorStr',['../group___turbo_j_p_e_g.html#ga9af79c908ec131b1ae8d52fe40375abf',1,'turbojpeg.h']]],
|
||||
['tjgetscalingfactors',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#ga6449044b9af402999ccf52f401333be8',1,'turbojpeg.h']]],
|
||||
['tjinitcompress',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga3d10c47fbe4a2489a2b30c931551d01a',1,'turbojpeg.h']]],
|
||||
['tjinitdecompress',['tjInitDecompress',['../group___turbo_j_p_e_g.html#gae5408179d041e2a2f7199c8283cf649e',1,'turbojpeg.h']]],
|
||||
['tjinittransform',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga3155b775bfbac9dbba869b95a0367902',1,'turbojpeg.h']]],
|
||||
['tjtransform',['tjTransform',['../group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616',1,'turbojpeg.h']]]
|
||||
['tjalloc',['tjAlloc',['../group___turbo_j_p_e_g.html#gaec627dd4c5f30b7a775a7aea3bec5d83',1,'turbojpeg.h']]],
|
||||
['tjbufsize',['tjBufSize',['../group___turbo_j_p_e_g.html#ga67ac12fee79073242cb216e07c9f1f90',1,'turbojpeg.h']]],
|
||||
['tjbufsizeyuv2',['tjBufSizeYUV2',['../group___turbo_j_p_e_g.html#ga2be2b9969d4df9ecce9b05deed273194',1,'turbojpeg.h']]],
|
||||
['tjcompress2',['tjCompress2',['../group___turbo_j_p_e_g.html#gafbdce0112fd78fd38efae841443a9bcf',1,'turbojpeg.h']]],
|
||||
['tjcompressfromyuv',['tjCompressFromYUV',['../group___turbo_j_p_e_g.html#ga7622a459b79aa1007e005b58783f875b',1,'turbojpeg.h']]],
|
||||
['tjcompressfromyuvplanes',['tjCompressFromYUVPlanes',['../group___turbo_j_p_e_g.html#ga29ec5dfbd2d84b8724e951d6fa0d5d9e',1,'turbojpeg.h']]],
|
||||
['tjdecodeyuv',['tjDecodeYUV',['../group___turbo_j_p_e_g.html#ga70abbf38f77a26fd6da8813bef96f695',1,'turbojpeg.h']]],
|
||||
['tjdecodeyuvplanes',['tjDecodeYUVPlanes',['../group___turbo_j_p_e_g.html#ga10e837c07fa9d25770565b237d3898d9',1,'turbojpeg.h']]],
|
||||
['tjdecompress2',['tjDecompress2',['../group___turbo_j_p_e_g.html#gae9eccef8b682a48f43a9117c231ed013',1,'turbojpeg.h']]],
|
||||
['tjdecompressheader3',['tjDecompressHeader3',['../group___turbo_j_p_e_g.html#ga0595681096bba7199cc6f3533cb25f77',1,'turbojpeg.h']]],
|
||||
['tjdecompresstoyuv2',['tjDecompressToYUV2',['../group___turbo_j_p_e_g.html#ga04d1e839ff9a0860dd1475cff78d3364',1,'turbojpeg.h']]],
|
||||
['tjdecompresstoyuvplanes',['tjDecompressToYUVPlanes',['../group___turbo_j_p_e_g.html#gaa59f901a5258ada5bd0185ad59368540',1,'turbojpeg.h']]],
|
||||
['tjdestroy',['tjDestroy',['../group___turbo_j_p_e_g.html#ga75f355fa27225ba1a4ee392c852394d2',1,'turbojpeg.h']]],
|
||||
['tjencodeyuv3',['tjEncodeYUV3',['../group___turbo_j_p_e_g.html#gac519b922cdf446e97d0cdcba513636bf',1,'turbojpeg.h']]],
|
||||
['tjencodeyuvplanes',['tjEncodeYUVPlanes',['../group___turbo_j_p_e_g.html#gae2d04c72457fe7f4d60cf78ab1b1feb1',1,'turbojpeg.h']]],
|
||||
['tjfree',['tjFree',['../group___turbo_j_p_e_g.html#gaea863d2da0cdb609563aabdf9196514b',1,'turbojpeg.h']]],
|
||||
['tjgeterrorcode',['tjGetErrorCode',['../group___turbo_j_p_e_g.html#ga414feeffbf860ebd31c745df203de410',1,'turbojpeg.h']]],
|
||||
['tjgeterrorstr2',['tjGetErrorStr2',['../group___turbo_j_p_e_g.html#ga1ead8574f9f39fbafc6b497124e7aafa',1,'turbojpeg.h']]],
|
||||
['tjgetscalingfactors',['tjGetScalingFactors',['../group___turbo_j_p_e_g.html#gac3854476006b10787bd128f7ede48057',1,'turbojpeg.h']]],
|
||||
['tjinitcompress',['tjInitCompress',['../group___turbo_j_p_e_g.html#ga9d63a05fc6d813f4aae06107041a37e8',1,'turbojpeg.h']]],
|
||||
['tjinitdecompress',['tjInitDecompress',['../group___turbo_j_p_e_g.html#ga52300eac3f3d9ef4bab303bc244f62d3',1,'turbojpeg.h']]],
|
||||
['tjinittransform',['tjInitTransform',['../group___turbo_j_p_e_g.html#ga928beff6ac248ceadf01089fc6b41957',1,'turbojpeg.h']]],
|
||||
['tjloadimage',['tjLoadImage',['../group___turbo_j_p_e_g.html#gaffbd83c375e79f5db4b5c5d8ad4466e7',1,'turbojpeg.h']]],
|
||||
['tjplaneheight',['tjPlaneHeight',['../group___turbo_j_p_e_g.html#ga1a209696c6a80748f20e134b3c64789f',1,'turbojpeg.h']]],
|
||||
['tjplanesizeyuv',['tjPlaneSizeYUV',['../group___turbo_j_p_e_g.html#gab4ab7b24f6e797d79abaaa670373961d',1,'turbojpeg.h']]],
|
||||
['tjplanewidth',['tjPlaneWidth',['../group___turbo_j_p_e_g.html#ga63fb66bb1e36c74008c4634360becbb1',1,'turbojpeg.h']]],
|
||||
['tjsaveimage',['tjSaveImage',['../group___turbo_j_p_e_g.html#ga6f445b22d8933ae4815b3370a538d879',1,'turbojpeg.h']]],
|
||||
['tjtransform',['tjTransform',['../group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25',1,'turbojpeg.h']]]
|
||||
];
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
var searchData=
|
||||
[
|
||||
['tjalphaoffset',['tjAlphaOffset',['../group___turbo_j_p_e_g.html#ga5af0ab065feefd526debf1e20c43e837',1,'turbojpeg.h']]],
|
||||
['tjblueoffset',['tjBlueOffset',['../group___turbo_j_p_e_g.html#ga84e2e35d3f08025f976ec1ec53693dea',1,'turbojpeg.h']]],
|
||||
['tjgreenoffset',['tjGreenOffset',['../group___turbo_j_p_e_g.html#ga82d6e35da441112a411da41923c0ba2f',1,'turbojpeg.h']]],
|
||||
['tjmcuheight',['tjMCUHeight',['../group___turbo_j_p_e_g.html#gabd247bb9fecb393eca57366feb8327bf',1,'turbojpeg.h']]],
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
@@ -23,7 +24,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TurboJPEG
|
||||
 <span id="projectnumber">1.2.1</span>
|
||||
 <span id="projectnumber">2.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
@@ -23,7 +24,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TurboJPEG
|
||||
 <span id="projectnumber">1.2.1</span>
|
||||
 <span id="projectnumber">2.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||||
</script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="doxygen-extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
@@ -23,7 +24,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">TurboJPEG
|
||||
 <span id="projectnumber">1.2.1</span>
|
||||
 <span id="projectnumber">2.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -128,11 +129,11 @@ Data Fields</h2></td></tr>
|
||||
<p>This allows for custom filters or other transformations to be applied in the frequency domain.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramname">coeffs</td><td>pointer to an array of transformed DCT coefficients. (NOTE: this pointer is not guaranteed to be valid once the callback returns, so applications wishing to hand off the DCT coefficients to another function or library should make a copy of them within the body of the callback.) </td></tr>
|
||||
<tr><td class="paramname">arrayRegion</td><td><a class="el" href="structtjregion.html" title="Cropping region.">tjregion</a> structure containing the width and height of the array pointed to by <code>coeffs</code> as well as its offset relative to the component plane. TurboJPEG implementations may choose to split each component plane into multiple DCT coefficient arrays and call the callback function once for each array. </td></tr>
|
||||
<tr><td class="paramname">planeRegion</td><td><a class="el" href="structtjregion.html" title="Cropping region.">tjregion</a> structure containing the width and height of the component plane to which <code>coeffs</code> belongs </td></tr>
|
||||
<tr><td class="paramname">componentID</td><td>ID number of the component plane to which <code>coeffs</code> belongs (Y, Cb, and Cr have, respectively, ID's of 0, 1, and 2 in typical JPEG images.) </td></tr>
|
||||
<tr><td class="paramname">transformID</td><td>ID number of the transformed image to which <code>coeffs</code> belongs. This is the same as the index of the transform in the <code>transforms</code> array that was passed to <a class="el" href="group___turbo_j_p_e_g.html#gae403193ceb4aafb7e0f56ab587b48616" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a>. </td></tr>
|
||||
<tr><td class="paramname">coeffs</td><td>pointer to an array of transformed DCT coefficients. (NOTE: this pointer is not guaranteed to be valid once the callback returns, so applications wishing to hand off the DCT coefficients to another function or library should make a copy of them within the body of the callback.)</td></tr>
|
||||
<tr><td class="paramname">arrayRegion</td><td><a class="el" href="structtjregion.html" title="Cropping region.">tjregion</a> structure containing the width and height of the array pointed to by <code>coeffs</code> as well as its offset relative to the component plane. TurboJPEG implementations may choose to split each component plane into multiple DCT coefficient arrays and call the callback function once for each array.</td></tr>
|
||||
<tr><td class="paramname">planeRegion</td><td><a class="el" href="structtjregion.html" title="Cropping region.">tjregion</a> structure containing the width and height of the component plane to which <code>coeffs</code> belongs</td></tr>
|
||||
<tr><td class="paramname">componentID</td><td>ID number of the component plane to which <code>coeffs</code> belongs (Y, Cb, and Cr have, respectively, ID's of 0, 1, and 2 in typical JPEG images.)</td></tr>
|
||||
<tr><td class="paramname">transformID</td><td>ID number of the transformed image to which <code>coeffs</code> belongs. This is the same as the index of the transform in the <code>transforms</code> array that was passed to <a class="el" href="group___turbo_j_p_e_g.html#ga9cb8abf4cc91881e04a0329b2270be25" title="Losslessly transform a JPEG image into another JPEG image.">tjTransform()</a>.</td></tr>
|
||||
<tr><td class="paramname">transform</td><td>a pointer to a <a class="el" href="structtjtransform.html" title="Lossless transform.">tjtransform</a> structure that specifies the parameters and/or cropping region for this transform</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
|
||||
3
doxygen-extra.css
Normal file
3
doxygen-extra.css
Normal file
@@ -0,0 +1,3 @@
|
||||
code {
|
||||
color: #4665A2;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
PROJECT_NAME = TurboJPEG
|
||||
PROJECT_NUMBER = 1.2.1
|
||||
PROJECT_NUMBER = 2.0
|
||||
OUTPUT_DIRECTORY = doc/
|
||||
USE_WINDOWS_ENCODING = NO
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
@@ -13,3 +13,4 @@ JAVADOC_AUTOBRIEF = YES
|
||||
MAX_INITIALIZER_LINES = 0
|
||||
ALWAYS_DETAILED_SEC = YES
|
||||
HTML_TIMESTAMP = NO
|
||||
HTML_EXTRA_STYLESHEET = doxygen-extra.css
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* example.c
|
||||
* example.txt
|
||||
*
|
||||
* This file illustrates how to use the IJG code as a subroutine library
|
||||
* to read or write JPEG image files. You should look at this code in
|
||||
@@ -13,6 +13,20 @@
|
||||
* routines in a different style if you prefer.
|
||||
*/
|
||||
|
||||
/* This example was part of the original libjpeg documentation and has been
|
||||
* unchanged since 1994. It is, as described in libjpeg.txt, "heavily
|
||||
* commented skeleton code for calling the JPEG library." It is not meant to
|
||||
* be compiled as a standalone program, since it has no main() function and
|
||||
* does not compress from/decompress to a real image buffer (corollary:
|
||||
* put_scanline_someplace() is not a real function.) First-time users of
|
||||
* libjpeg-turbo would be better served by looking at tjexample.c, which uses
|
||||
* the more straightforward TurboJPEG API, or at cjpeg.c and djpeg.c, which are
|
||||
* examples of libjpeg API usage that can be (and are) compiled into standalone
|
||||
* programs. Note that this example, as well as the examples in cjpeg.c and
|
||||
* djpeg.c, interleave disk I/O with JPEG compression/decompression, so none of
|
||||
* these examples is suitable for benchmarking purposes.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
@@ -58,7 +72,7 @@
|
||||
* RGB color and is described by:
|
||||
*/
|
||||
|
||||
extern JSAMPLE * image_buffer; /* Points to large array of R,G,B-order data */
|
||||
extern JSAMPLE *image_buffer; /* Points to large array of R,G,B-order data */
|
||||
extern int image_height; /* Number of rows in image */
|
||||
extern int image_width; /* Number of columns in image */
|
||||
|
||||
@@ -69,7 +83,7 @@ extern int image_width; /* Number of columns in image */
|
||||
*/
|
||||
|
||||
GLOBAL(void)
|
||||
write_JPEG_file (char * filename, int quality)
|
||||
write_JPEG_file(char *filename, int quality)
|
||||
{
|
||||
/* This struct contains the JPEG compression parameters and pointers to
|
||||
* working space (which is allocated as needed by the JPEG library).
|
||||
@@ -88,7 +102,7 @@ write_JPEG_file (char * filename, int quality)
|
||||
*/
|
||||
struct jpeg_error_mgr jerr;
|
||||
/* More stuff */
|
||||
FILE * outfile; /* target file */
|
||||
FILE *outfile; /* target file */
|
||||
JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */
|
||||
int row_stride; /* physical row width in image buffer */
|
||||
|
||||
@@ -158,8 +172,8 @@ write_JPEG_file (char * filename, int quality)
|
||||
* Here the array is only one element long, but you could pass
|
||||
* more than one scanline at a time if that's more convenient.
|
||||
*/
|
||||
row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride];
|
||||
(void) jpeg_write_scanlines(&cinfo, row_pointer, 1);
|
||||
row_pointer[0] = &image_buffer[cinfo.next_scanline * row_stride];
|
||||
(void)jpeg_write_scanlines(&cinfo, row_pointer, 1);
|
||||
}
|
||||
|
||||
/* Step 6: Finish compression */
|
||||
@@ -253,17 +267,17 @@ struct my_error_mgr {
|
||||
jmp_buf setjmp_buffer; /* for return to caller */
|
||||
};
|
||||
|
||||
typedef struct my_error_mgr * my_error_ptr;
|
||||
typedef struct my_error_mgr *my_error_ptr;
|
||||
|
||||
/*
|
||||
* Here's the routine that will replace the standard error_exit method:
|
||||
*/
|
||||
|
||||
METHODDEF(void)
|
||||
my_error_exit (j_common_ptr cinfo)
|
||||
my_error_exit(j_common_ptr cinfo)
|
||||
{
|
||||
/* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
|
||||
my_error_ptr myerr = (my_error_ptr) cinfo->err;
|
||||
my_error_ptr myerr = (my_error_ptr)cinfo->err;
|
||||
|
||||
/* Always display the message. */
|
||||
/* We could postpone this until after returning, if we chose. */
|
||||
@@ -281,7 +295,7 @@ my_error_exit (j_common_ptr cinfo)
|
||||
|
||||
|
||||
GLOBAL(int)
|
||||
read_JPEG_file (char * filename)
|
||||
read_JPEG_file(char *filename)
|
||||
{
|
||||
/* This struct contains the JPEG decompression parameters and pointers to
|
||||
* working space (which is allocated as needed by the JPEG library).
|
||||
@@ -293,7 +307,7 @@ read_JPEG_file (char * filename)
|
||||
*/
|
||||
struct my_error_mgr jerr;
|
||||
/* More stuff */
|
||||
FILE * infile; /* source file */
|
||||
FILE *infile; /* source file */
|
||||
JSAMPARRAY buffer; /* Output row buffer */
|
||||
int row_stride; /* physical row width in output buffer */
|
||||
|
||||
@@ -331,7 +345,7 @@ read_JPEG_file (char * filename)
|
||||
|
||||
/* Step 3: read file parameters with jpeg_read_header() */
|
||||
|
||||
(void) jpeg_read_header(&cinfo, TRUE);
|
||||
(void)jpeg_read_header(&cinfo, TRUE);
|
||||
/* We can ignore the return value from jpeg_read_header since
|
||||
* (a) suspension is not possible with the stdio data source, and
|
||||
* (b) we passed TRUE to reject a tables-only JPEG file as an error.
|
||||
@@ -346,7 +360,7 @@ read_JPEG_file (char * filename)
|
||||
|
||||
/* Step 5: Start decompressor */
|
||||
|
||||
(void) jpeg_start_decompress(&cinfo);
|
||||
(void)jpeg_start_decompress(&cinfo);
|
||||
/* We can ignore the return value since suspension is not possible
|
||||
* with the stdio data source.
|
||||
*/
|
||||
@@ -361,7 +375,7 @@ read_JPEG_file (char * filename)
|
||||
row_stride = cinfo.output_width * cinfo.output_components;
|
||||
/* Make a one-row-high sample array that will go away when done with image */
|
||||
buffer = (*cinfo.mem->alloc_sarray)
|
||||
((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
|
||||
((j_common_ptr)&cinfo, JPOOL_IMAGE, row_stride, 1);
|
||||
|
||||
/* Step 6: while (scan lines remain to be read) */
|
||||
/* jpeg_read_scanlines(...); */
|
||||
@@ -374,14 +388,14 @@ read_JPEG_file (char * filename)
|
||||
* Here the array is only one element long, but you could ask for
|
||||
* more than one scanline at a time if that's more convenient.
|
||||
*/
|
||||
(void) jpeg_read_scanlines(&cinfo, buffer, 1);
|
||||
(void)jpeg_read_scanlines(&cinfo, buffer, 1);
|
||||
/* Assume put_scanline_someplace wants a pointer and sample count. */
|
||||
put_scanline_someplace(buffer[0], row_stride);
|
||||
}
|
||||
|
||||
/* Step 7: Finish decompression */
|
||||
|
||||
(void) jpeg_finish_decompress(&cinfo);
|
||||
(void)jpeg_finish_decompress(&cinfo);
|
||||
/* We can ignore the return value since suspension is not possible
|
||||
* with the stdio data source.
|
||||
*/
|
||||
20
jaricom.c
20
jaricom.c
@@ -1,16 +1,19 @@
|
||||
/*
|
||||
* jaricom.c
|
||||
*
|
||||
* This file was part of the Independent JPEG Group's software:
|
||||
* Developed 1997-2009 by Guido Vollbeding.
|
||||
* This file is part of the Independent JPEG Group's software.
|
||||
* For conditions of distribution and use, see the accompanying README file.
|
||||
* libjpeg-turbo Modifications:
|
||||
* Copyright (C) 2015, 2018, D. R. Commander.
|
||||
* For conditions of distribution and use, see the accompanying README.ijg
|
||||
* file.
|
||||
*
|
||||
* This file contains probability estimation tables for common use in
|
||||
* arithmetic entropy encoding and decoding routines.
|
||||
*
|
||||
* This data represents Table D.2 in the JPEG spec (ISO/IEC IS 10918-1
|
||||
* and CCITT Recommendation ITU-T T.81) and Table 24 in the JBIG spec
|
||||
* (ISO/IEC IS 11544 and CCITT Recommendation ITU-T T.82).
|
||||
* This data represents Table D.2 in
|
||||
* Recommendation ITU-T T.81 (1992) | ISO/IEC 10918-1:1994 and Table 24 in
|
||||
* Recommendation ITU-T T.82 (1993) | ISO/IEC 11544:1993.
|
||||
*/
|
||||
|
||||
#define JPEG_INTERNALS
|
||||
@@ -18,7 +21,7 @@
|
||||
#include "jpeglib.h"
|
||||
|
||||
/* The following #define specifies the packing of the four components
|
||||
* into the compact INT32 representation.
|
||||
* into the compact JLONG representation.
|
||||
* Note that this formula must match the actual arithmetic encoder
|
||||
* and decoder implementation. The implementation has to be changed
|
||||
* if this formula is changed.
|
||||
@@ -26,9 +29,10 @@
|
||||
* implementation (jbig_tab.c).
|
||||
*/
|
||||
|
||||
#define V(i,a,b,c,d) (((INT32)a << 16) | ((INT32)c << 8) | ((INT32)d << 7) | b)
|
||||
#define V(i, a, b, c, d) \
|
||||
(((JLONG)a << 16) | ((JLONG)c << 8) | ((JLONG)d << 7) | b)
|
||||
|
||||
const INT32 jpeg_aritab[113+1] = {
|
||||
const JLONG jpeg_aritab[113 + 1] = {
|
||||
/*
|
||||
* Index, Qe_Value, Next_Index_LPS, Next_Index_MPS, Switch_MPS
|
||||
*/
|
||||
|
||||
@@ -1,55 +1,88 @@
|
||||
set(JAR_FILE turbojpeg.jar)
|
||||
set(MANIFEST_FILE ${CMAKE_CURRENT_SOURCE_DIR}/MANIFEST.MF)
|
||||
find_package(Java REQUIRED)
|
||||
find_package(JNI REQUIRED)
|
||||
|
||||
set(JAVA_CLASSNAMES org/libjpegturbo/turbojpeg/TJ
|
||||
org/libjpegturbo/turbojpeg/TJCompressor
|
||||
org/libjpegturbo/turbojpeg/TJCustomFilter
|
||||
org/libjpegturbo/turbojpeg/TJDecompressor
|
||||
org/libjpegturbo/turbojpeg/TJScalingFactor
|
||||
org/libjpegturbo/turbojpeg/TJTransform
|
||||
org/libjpegturbo/turbojpeg/TJTransformer
|
||||
TJUnitTest
|
||||
TJExample
|
||||
TJBench)
|
||||
|
||||
if(MSVC_IDE)
|
||||
set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
|
||||
else()
|
||||
set(OBJDIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
# Allow the Java compiler flags to be set using an environment variable
|
||||
if(NOT DEFINED CMAKE_JAVA_COMPILE_FLAGS AND DEFINED ENV{JAVAFLAGS})
|
||||
set(CMAKE_JAVA_COMPILE_FLAGS $ENV{JAVAFLAGS})
|
||||
endif()
|
||||
|
||||
include(UseJava)
|
||||
|
||||
set(CMAKE_JAVA_COMPILE_FLAGS "${CMAKE_JAVA_COMPILE_FLAGS} -J-Dfile.encoding=UTF8")
|
||||
message(STATUS "CMAKE_JAVA_COMPILE_FLAGS = ${CMAKE_JAVA_COMPILE_FLAGS}")
|
||||
string(REGEX REPLACE " " ";" CMAKE_JAVA_COMPILE_FLAGS "${CMAKE_JAVA_COMPILE_FLAGS}")
|
||||
|
||||
set(JAVAARGS "" CACHE STRING "Additional arguments to pass to java when running unit tests (example: -d32)")
|
||||
message(STATUS "JAVAARGS = ${JAVAARGS}")
|
||||
|
||||
set(JAVA_SOURCES org/libjpegturbo/turbojpeg/TJ.java
|
||||
org/libjpegturbo/turbojpeg/TJCompressor.java
|
||||
org/libjpegturbo/turbojpeg/TJCustomFilter.java
|
||||
org/libjpegturbo/turbojpeg/TJDecompressor.java
|
||||
org/libjpegturbo/turbojpeg/TJException.java
|
||||
org/libjpegturbo/turbojpeg/TJScalingFactor.java
|
||||
org/libjpegturbo/turbojpeg/TJTransform.java
|
||||
org/libjpegturbo/turbojpeg/TJTransformer.java
|
||||
org/libjpegturbo/turbojpeg/YUVImage.java
|
||||
TJUnitTest.java
|
||||
TJExample.java
|
||||
TJBench.java)
|
||||
|
||||
set(TURBOJPEG_DLL_NAME "turbojpeg")
|
||||
if(MINGW)
|
||||
set(TURBOJPEG_DLL_NAME "libturbojpeg")
|
||||
endif()
|
||||
configure_file(org/libjpegturbo/turbojpeg/TJLoader.java.in
|
||||
if(WIN32)
|
||||
configure_file(org/libjpegturbo/turbojpeg/TJLoader-win.java.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/org/libjpegturbo/turbojpeg/TJLoader.java)
|
||||
|
||||
set(JAVA_SOURCES "")
|
||||
set(JAVA_CLASSES "")
|
||||
set(JAVA_CLASSES_FULL "")
|
||||
foreach(class ${JAVA_CLASSNAMES})
|
||||
set(JAVA_SOURCES ${JAVA_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/${class}.java)
|
||||
set(JAVA_CLASSES ${JAVA_CLASSES} ${class}.class)
|
||||
set(JAVA_CLASSES_FULL ${JAVA_CLASSES_FULL} ${OBJDIR}/${class}.class)
|
||||
endforeach()
|
||||
|
||||
else()
|
||||
configure_file(org/libjpegturbo/turbojpeg/TJLoader-unix.java.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/org/libjpegturbo/turbojpeg/TJLoader.java)
|
||||
endif()
|
||||
set(JAVA_SOURCES ${JAVA_SOURCES}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/org/libjpegturbo/turbojpeg/TJLoader.java)
|
||||
set(JAVA_CLASSES ${JAVA_CLASSES}
|
||||
org/libjpegturbo/turbojpeg/TJLoader.class)
|
||||
set(JAVA_CLASSES_FULL ${JAVA_CLASSES_FULL}
|
||||
${OBJDIR}/org/libjpegturbo/turbojpeg/TJLoader.class)
|
||||
|
||||
string(REGEX REPLACE " " ";" JAVACFLAGS "${JAVACFLAGS}")
|
||||
add_custom_command(OUTPUT ${JAVA_CLASSES_FULL} DEPENDS ${JAVA_SOURCES}
|
||||
COMMAND ${JAVA_COMPILE} ARGS ${JAVACFLAGS} -d ${OBJDIR} ${JAVA_SOURCES})
|
||||
if(MSYS)
|
||||
# UGLY HACK ALERT: If we don't do this, then UseJava.cmake will separate
|
||||
# class path members with a semicolon, which is interpreted as a command
|
||||
# separator by the MSYS shell.
|
||||
set(CMAKE_HOST_SYSTEM_NAME_BAK ${CMAKE_HOST_SYSTEM_NAME})
|
||||
set(CMAKE_HOST_SYSTEM_NAME "MSYS")
|
||||
endif()
|
||||
add_jar(turbojpeg-java ${JAVA_SOURCES} OUTPUT_NAME turbojpeg
|
||||
ENTRY_POINT TJExample)
|
||||
if(MSYS)
|
||||
set(CMAKE_HOST_SYSTEM_NAME ${CMAKE_HOST_SYSTEM_NAME_BAK})
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${JAR_FILE} DEPENDS ${JAVA_CLASSES_FULL}
|
||||
${MANIFEST_FILE}
|
||||
COMMAND ${JAVA_ARCHIVE} cfm ${JAR_FILE} ${MANIFEST_FILE} ${JAVA_CLASSES}
|
||||
WORKING_DIRECTORY ${OBJDIR})
|
||||
add_custom_target(javadoc COMMAND
|
||||
javadoc -notimestamp -d ${CMAKE_CURRENT_SOURCE_DIR}/doc -sourcepath ${CMAKE_CURRENT_SOURCE_DIR} org.libjpegturbo.turbojpeg)
|
||||
set(JAVACLASSPATH ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/turbojpeg-java.dir)
|
||||
if(Java_VERSION_MAJOR GREATER 9)
|
||||
add_custom_target(javah
|
||||
COMMAND javac -h ${CMAKE_CURRENT_SOURCE_DIR} -classpath ${JAVACLASSPATH}
|
||||
-d ${CMAKE_CURRENT_BINARY_DIR}/__unused
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/org/libjpegturbo/turbojpeg/TJ.java
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/org/libjpegturbo/turbojpeg/TJCompressor.java
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/org/libjpegturbo/turbojpeg/TJDecompressor.java
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/org/libjpegturbo/turbojpeg/TJTransformer.java)
|
||||
else()
|
||||
add_custom_target(javah
|
||||
COMMAND javah -d ${CMAKE_CURRENT_SOURCE_DIR} -classpath ${JAVACLASSPATH} org.libjpegturbo.turbojpeg.TJ
|
||||
COMMAND javah -d ${CMAKE_CURRENT_SOURCE_DIR} -classpath ${JAVACLASSPATH} org.libjpegturbo.turbojpeg.TJCompressor
|
||||
COMMAND javah -d ${CMAKE_CURRENT_SOURCE_DIR} -classpath ${JAVACLASSPATH} org.libjpegturbo.turbojpeg.TJDecompressor
|
||||
COMMAND javah -d ${CMAKE_CURRENT_SOURCE_DIR} -classpath ${JAVACLASSPATH} org.libjpegturbo.turbojpeg.TJTransformer)
|
||||
endif()
|
||||
|
||||
add_custom_target(java ALL DEPENDS ${JAR_FILE})
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${JAR_FILE} DESTINATION classes)
|
||||
if(NOT DEFINED CMAKE_INSTALL_DEFAULT_JAVADIR)
|
||||
set(CMAKE_INSTALL_DEFAULT_JAVADIR "<CMAKE_INSTALL_DATAROOTDIR>/java")
|
||||
endif()
|
||||
GNUInstallDirs_set_install_dir(JAVADIR
|
||||
"The directory into which Java classes should be installed")
|
||||
GNUInstallDirs_get_absolute_install_dir(CMAKE_INSTALL_FULL_JAVADIR
|
||||
CMAKE_INSTALL_JAVADIR)
|
||||
set(CMAKE_INSTALL_JAVADIR ${CMAKE_INSTALL_JAVADIR} PARENT_SCOPE)
|
||||
set(CMAKE_INSTALL_FULL_JAVADIR ${CMAKE_INSTALL_FULL_JAVADIR} PARENT_SCOPE)
|
||||
report_directory(JAVADIR)
|
||||
install_jar(turbojpeg-java ${CMAKE_INSTALL_JAVADIR})
|
||||
mark_as_advanced(CLEAR CMAKE_INSTALL_JAVADIR)
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
JAVAROOT = .
|
||||
|
||||
org/libjpegturbo/turbojpeg/TJLoader.java: $(srcdir)/org/libjpegturbo/turbojpeg/TJLoader.java.tmpl
|
||||
mkdir -p org/libjpegturbo/turbojpeg; \
|
||||
cat $(srcdir)/org/libjpegturbo/turbojpeg/TJLoader.java.tmpl | \
|
||||
sed s@%{__libdir}@$(libdir)@g > org/libjpegturbo/turbojpeg/TJLoader.java
|
||||
|
||||
|
||||
JAVASOURCES = org/libjpegturbo/turbojpeg/TJ.java \
|
||||
org/libjpegturbo/turbojpeg/TJCompressor.java \
|
||||
org/libjpegturbo/turbojpeg/TJCustomFilter.java \
|
||||
org/libjpegturbo/turbojpeg/TJDecompressor.java \
|
||||
org/libjpegturbo/turbojpeg/TJScalingFactor.java \
|
||||
org/libjpegturbo/turbojpeg/TJTransform.java \
|
||||
org/libjpegturbo/turbojpeg/TJTransformer.java \
|
||||
TJExample.java \
|
||||
TJUnitTest.java \
|
||||
TJBench.java
|
||||
|
||||
JNIHEADERS = org_libjpegturbo_turbojpeg_TJ.h \
|
||||
org_libjpegturbo_turbojpeg_TJCompressor.h \
|
||||
org_libjpegturbo_turbojpeg_TJDecompressor.h \
|
||||
org_libjpegturbo_turbojpeg_TJTransformer.h
|
||||
|
||||
if WITH_JAVA
|
||||
|
||||
nodist_noinst_JAVA = ${JAVASOURCES} org/libjpegturbo/turbojpeg/TJLoader.java
|
||||
|
||||
JAVA_CLASSES = org/libjpegturbo/turbojpeg/TJ.class \
|
||||
org/libjpegturbo/turbojpeg/TJCompressor.class \
|
||||
org/libjpegturbo/turbojpeg/TJCustomFilter.class \
|
||||
org/libjpegturbo/turbojpeg/TJDecompressor.class \
|
||||
org/libjpegturbo/turbojpeg/TJLoader.class \
|
||||
org/libjpegturbo/turbojpeg/TJScalingFactor.class \
|
||||
org/libjpegturbo/turbojpeg/TJTransform.class \
|
||||
org/libjpegturbo/turbojpeg/TJTransformer.class \
|
||||
TJExample.class \
|
||||
TJUnitTest.class \
|
||||
TJBench.class
|
||||
|
||||
all: all-am turbojpeg.jar
|
||||
|
||||
turbojpeg.jar: $(JAVA_CLASSES) ${srcdir}/MANIFEST.MF
|
||||
$(JAR) cfm turbojpeg.jar ${srcdir}/MANIFEST.MF $(JAVA_CLASSES)
|
||||
|
||||
clean-local:
|
||||
rm -f turbojpeg.jar
|
||||
|
||||
install-exec-local: turbojpeg.jar
|
||||
mkdir -p $(DESTDIR)/$(datadir)/classes
|
||||
$(INSTALL) -m 644 turbojpeg.jar $(DESTDIR)/$(datadir)/classes/
|
||||
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)/$(datadir)/classes/turbojpeg.jar
|
||||
if [ -d $(DESTDIR)/$(datadir)/classes ]; then rmdir $(DESTDIR)/$(datadir)/classes; fi
|
||||
|
||||
headers: all
|
||||
javah -d ${srcdir} org.libjpegturbo.turbojpeg.TJ; \
|
||||
javah -d ${srcdir} org.libjpegturbo.turbojpeg.TJCompressor; \
|
||||
javah -d ${srcdir} org.libjpegturbo.turbojpeg.TJDecompressor; \
|
||||
javah -d ${srcdir} org.libjpegturbo.turbojpeg.TJTransformer
|
||||
|
||||
docs: all
|
||||
mkdir -p ${srcdir}/doc; \
|
||||
javadoc -notimestamp -d ${srcdir}/doc -sourcepath ${srcdir} org.libjpegturbo.turbojpeg
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST = MANIFEST.MF ${JAVASOURCES} ${JNIHEADERS} doc CMakeLists.txt \
|
||||
org/libjpegturbo/turbojpeg/TJLoader.java.tmpl \
|
||||
org/libjpegturbo/turbojpeg/TJLoader.java.in
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C)2011-2012, 2014 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2012, 2014-2015, 2017-2018 D. R. Commander.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -27,8 +28,8 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* This program demonstrates how to compress and decompress JPEG files using
|
||||
* the TurboJPEG JNI wrapper
|
||||
* This program demonstrates how to compress, decompress, and transform JPEG
|
||||
* images using the TurboJPEG Java API
|
||||
*/
|
||||
|
||||
import java.io.*;
|
||||
@@ -39,113 +40,161 @@ import javax.imageio.*;
|
||||
import javax.swing.*;
|
||||
import org.libjpegturbo.turbojpeg.*;
|
||||
|
||||
public class TJExample implements TJCustomFilter {
|
||||
|
||||
public static final String classname = new TJExample().getClass().getName();
|
||||
@SuppressWarnings("checkstyle:JavadocType")
|
||||
class TJExample implements TJCustomFilter {
|
||||
|
||||
private static void usage() throws Exception {
|
||||
System.out.println("\nUSAGE: java " + classname + " <Input file> <Output file> [options]\n");
|
||||
System.out.println("Input and output files can be any image format that the Java Image I/O");
|
||||
static final String CLASS_NAME =
|
||||
new TJExample().getClass().getName();
|
||||
|
||||
static final int DEFAULT_SUBSAMP = TJ.SAMP_444;
|
||||
static final int DEFAULT_QUALITY = 95;
|
||||
|
||||
|
||||
static final String[] SUBSAMP_NAME = {
|
||||
"4:4:4", "4:2:2", "4:2:0", "Grayscale", "4:4:0", "4:1:1"
|
||||
};
|
||||
|
||||
static final String[] COLORSPACE_NAME = {
|
||||
"RGB", "YCbCr", "GRAY", "CMYK", "YCCK"
|
||||
};
|
||||
|
||||
|
||||
/* DCT filter example. This produces a negative of the image. */
|
||||
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
public void customFilter(ShortBuffer coeffBuffer, Rectangle bufferRegion,
|
||||
Rectangle planeRegion, int componentIndex,
|
||||
int transformIndex, TJTransform transform)
|
||||
throws TJException {
|
||||
for (int i = 0; i < bufferRegion.width * bufferRegion.height; i++) {
|
||||
coeffBuffer.put(i, (short)(-coeffBuffer.get(i)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void usage() throws Exception {
|
||||
System.out.println("\nUSAGE: java [Java options] " + CLASS_NAME +
|
||||
" <Input image> <Output image> [options]\n");
|
||||
|
||||
System.out.println("Input and output images can be in any image format that the Java Image I/O");
|
||||
System.out.println("extensions understand. If either filename ends in a .jpg extension, then");
|
||||
System.out.println("TurboJPEG will be used to compress or decompress the file.\n");
|
||||
System.out.println("Options:\n");
|
||||
System.out.println("-scale M/N = if the input image is a JPEG file, scale the width/height of the");
|
||||
System.out.print(" output image by a factor of M/N (M/N = ");
|
||||
for (int i = 0; i < sf.length; i++) {
|
||||
System.out.print(sf[i].getNum() + "/" + sf[i].getDenom());
|
||||
if (sf.length == 2 && i != sf.length - 1)
|
||||
System.out.println("the TurboJPEG API will be used to compress or decompress the image.\n");
|
||||
|
||||
System.out.println("Compression Options (used if the output image is a JPEG image)");
|
||||
System.out.println("--------------------------------------------------------------\n");
|
||||
|
||||
System.out.println("-subsamp <444|422|420|gray> = Apply this level of chrominance subsampling when");
|
||||
System.out.println(" compressing the output image. The default is to use the same level of");
|
||||
System.out.println(" subsampling as in the input image, if the input image is also a JPEG");
|
||||
System.out.println(" image, or to use grayscale if the input image is a grayscale non-JPEG");
|
||||
System.out.println(" image, or to use " +
|
||||
SUBSAMP_NAME[DEFAULT_SUBSAMP] +
|
||||
" subsampling otherwise.\n");
|
||||
|
||||
System.out.println("-q <1-100> = Compress the output image with this JPEG quality level");
|
||||
System.out.println(" (default = " + DEFAULT_QUALITY + ").\n");
|
||||
|
||||
System.out.println("Decompression Options (used if the input image is a JPEG image)");
|
||||
System.out.println("---------------------------------------------------------------\n");
|
||||
|
||||
System.out.println("-scale M/N = Scale the input image by a factor of M/N when decompressing it.");
|
||||
System.out.print("(M/N = ");
|
||||
for (int i = 0; i < SCALING_FACTORS.length; i++) {
|
||||
System.out.print(SCALING_FACTORS[i].getNum() + "/" +
|
||||
SCALING_FACTORS[i].getDenom());
|
||||
if (SCALING_FACTORS.length == 2 && i != SCALING_FACTORS.length - 1)
|
||||
System.out.print(" or ");
|
||||
else if (sf.length > 2) {
|
||||
if (i != sf.length - 1)
|
||||
else if (SCALING_FACTORS.length > 2) {
|
||||
if (i != SCALING_FACTORS.length - 1)
|
||||
System.out.print(", ");
|
||||
if (i == sf.length - 2)
|
||||
if (i == SCALING_FACTORS.length - 2)
|
||||
System.out.print("or ");
|
||||
}
|
||||
}
|
||||
System.out.println(")\n");
|
||||
System.out.println("-samp <444|422|420|gray> = If the output image is a JPEG file, this specifies");
|
||||
System.out.println(" the level of chrominance subsampling to use when");
|
||||
System.out.println(" recompressing it. Default is to use the same level");
|
||||
System.out.println(" of subsampling as the input, if the input is a JPEG");
|
||||
System.out.println(" file, or 4:4:4 otherwise.\n");
|
||||
System.out.println("-q <1-100> = If the output image is a JPEG file, this specifies the JPEG");
|
||||
System.out.println(" quality to use when recompressing it (default = 95).\n");
|
||||
|
||||
System.out.println("-hflip, -vflip, -transpose, -transverse, -rot90, -rot180, -rot270 =");
|
||||
System.out.println(" If the input image is a JPEG file, perform the corresponding lossless");
|
||||
System.out.println(" transform prior to decompression (these options are mutually exclusive)\n");
|
||||
System.out.println("-grayscale = If the input image is a JPEG file, perform lossless grayscale");
|
||||
System.out.println(" conversion prior to decompression (can be combined with the other");
|
||||
System.out.println(" transforms above)\n");
|
||||
System.out.println("-crop X,Y,WxH = If the input image is a JPEG file, perform lossless cropping");
|
||||
System.out.println(" prior to decompression. X,Y specifies the upper left corner of the");
|
||||
System.out.println(" cropping region, and WxH specifies its width and height. X,Y must be");
|
||||
System.out.println(" evenly divible by the MCU block size (8x8 if the source image was");
|
||||
System.out.println(" compressed using no subsampling or grayscale, or 16x8 for 4:2:2 or 16x16");
|
||||
System.out.println(" for 4:2:0.)\n");
|
||||
System.out.println("-display = Display output image (Output file need not be specified in this");
|
||||
System.out.println(" Perform one of these lossless transform operations on the input image");
|
||||
System.out.println(" prior to decompressing it (these options are mutually exclusive.)\n");
|
||||
|
||||
System.out.println("-grayscale = Perform lossless grayscale conversion on the input image prior");
|
||||
System.out.println(" to decompressing it (can be combined with the other transform operations");
|
||||
System.out.println(" above.)\n");
|
||||
|
||||
System.out.println("-crop WxH+X+Y = Perform lossless cropping on the input image prior to");
|
||||
System.out.println(" decompressing it. X and Y specify the upper left corner of the cropping");
|
||||
System.out.println(" region, and W and H specify the width and height of the cropping region.");
|
||||
System.out.println(" X and Y must be evenly divible by the MCU block size (8x8 if the input");
|
||||
System.out.println(" image was compressed using no subsampling or grayscale, 16x8 if it was");
|
||||
System.out.println(" compressed using 4:2:2 subsampling, or 16x16 if it was compressed using");
|
||||
System.out.println(" 4:2:0 subsampling.)\n");
|
||||
|
||||
System.out.println("General Options");
|
||||
System.out.println("---------------\n");
|
||||
|
||||
System.out.println("-display = Display output image (Output filename need not be specified in this");
|
||||
System.out.println(" case.)\n");
|
||||
|
||||
System.out.println("-fastupsample = Use the fastest chrominance upsampling algorithm available in");
|
||||
System.out.println(" the underlying codec\n");
|
||||
System.out.println(" the underlying codec.\n");
|
||||
|
||||
System.out.println("-fastdct = Use the fastest DCT/IDCT algorithms available in the underlying");
|
||||
System.out.println(" codec\n");
|
||||
System.out.println(" codec.\n");
|
||||
|
||||
System.out.println("-accuratedct = Use the most accurate DCT/IDCT algorithms available in the");
|
||||
System.out.println(" underlying codec\n");
|
||||
System.out.println(" underlying codec.\n");
|
||||
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
private static final String[] sampName = {
|
||||
"4:4:4", "4:2:2", "4:2:0", "Grayscale", "4:4:0"
|
||||
};
|
||||
|
||||
public static void main(String[] argv) {
|
||||
|
||||
BufferedImage img = null;
|
||||
byte[] bmpBuf = null;
|
||||
TJTransform xform = new TJTransform();
|
||||
int flags = 0;
|
||||
|
||||
try {
|
||||
|
||||
sf = TJ.getScalingFactors();
|
||||
|
||||
if (argv.length < 2) {
|
||||
usage();
|
||||
}
|
||||
|
||||
TJScalingFactor scaleFactor = new TJScalingFactor(1, 1);
|
||||
String inFormat = "jpg", outFormat = "jpg";
|
||||
int outSubsamp = -1, outQual = 95;
|
||||
TJScalingFactor scalingFactor = new TJScalingFactor(1, 1);
|
||||
int outSubsamp = -1, outQual = -1;
|
||||
TJTransform xform = new TJTransform();
|
||||
boolean display = false;
|
||||
int flags = 0;
|
||||
int width, height;
|
||||
String inFormat = "jpg", outFormat = "jpg";
|
||||
BufferedImage img = null;
|
||||
byte[] imgBuf = null;
|
||||
|
||||
if (argv.length > 1) {
|
||||
for (int i = 1; i < argv.length; i++) {
|
||||
if (argv.length < 2)
|
||||
usage();
|
||||
|
||||
if (argv[1].substring(0, 2).equalsIgnoreCase("-d"))
|
||||
display = true;
|
||||
|
||||
/* Parse arguments. */
|
||||
for (int i = 2; i < argv.length; i++) {
|
||||
if (argv[i].length() < 2)
|
||||
continue;
|
||||
if (argv[i].length() > 2 &&
|
||||
argv[i].substring(0, 3).equalsIgnoreCase("-sc")) {
|
||||
else if (argv[i].length() > 2 &&
|
||||
argv[i].substring(0, 3).equalsIgnoreCase("-sc") &&
|
||||
i < argv.length - 1) {
|
||||
int match = 0;
|
||||
if (i < argv.length - 1) {
|
||||
String[] scaleArg = argv[++i].split("/");
|
||||
if (scaleArg.length == 2) {
|
||||
TJScalingFactor tempsf =
|
||||
new TJScalingFactor(Integer.parseInt(scaleArg[0]),
|
||||
Integer.parseInt(scaleArg[1]));
|
||||
for (int j = 0; j < sf.length; j++) {
|
||||
if (tempsf.equals(sf[j])) {
|
||||
scaleFactor = sf[j];
|
||||
for (int j = 0; j < SCALING_FACTORS.length; j++) {
|
||||
if (tempsf.equals(SCALING_FACTORS[j])) {
|
||||
scalingFactor = SCALING_FACTORS[j];
|
||||
match = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (match != 1) usage();
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-h") || argv[i].equalsIgnoreCase("-?"))
|
||||
if (match != 1)
|
||||
usage();
|
||||
if (argv[i].length() > 2 &&
|
||||
argv[i].substring(0, 3).equalsIgnoreCase("-sa")) {
|
||||
if (i < argv.length - 1) {
|
||||
} else if (argv[i].length() > 2 &&
|
||||
argv[i].substring(0, 3).equalsIgnoreCase("-su") &&
|
||||
i < argv.length - 1) {
|
||||
i++;
|
||||
if (argv[i].substring(0, 1).equalsIgnoreCase("g"))
|
||||
outSubsamp = TJ.SAMP_GRAY;
|
||||
@@ -157,75 +206,58 @@ public class TJExample implements TJCustomFilter {
|
||||
outSubsamp = TJ.SAMP_420;
|
||||
else
|
||||
usage();
|
||||
} else
|
||||
} else if (argv[i].substring(0, 2).equalsIgnoreCase("-q") &&
|
||||
i < argv.length - 1) {
|
||||
outQual = Integer.parseInt(argv[++i]);
|
||||
if (outQual < 1 || outQual > 100)
|
||||
usage();
|
||||
}
|
||||
if (argv[i].substring(0, 2).equalsIgnoreCase("-q")) {
|
||||
if (i < argv.length - 1) {
|
||||
int qual = Integer.parseInt(argv[++i]);
|
||||
if (qual >= 1 && qual <= 100)
|
||||
outQual = qual;
|
||||
else
|
||||
usage();
|
||||
} else
|
||||
usage();
|
||||
}
|
||||
if (argv[i].substring(0, 2).equalsIgnoreCase("-g"))
|
||||
} else if (argv[i].substring(0, 2).equalsIgnoreCase("-g"))
|
||||
xform.options |= TJTransform.OPT_GRAY;
|
||||
if (argv[i].equalsIgnoreCase("-hflip"))
|
||||
else if (argv[i].equalsIgnoreCase("-hflip"))
|
||||
xform.op = TJTransform.OP_HFLIP;
|
||||
if (argv[i].equalsIgnoreCase("-vflip"))
|
||||
else if (argv[i].equalsIgnoreCase("-vflip"))
|
||||
xform.op = TJTransform.OP_VFLIP;
|
||||
if (argv[i].equalsIgnoreCase("-transpose"))
|
||||
else if (argv[i].equalsIgnoreCase("-transpose"))
|
||||
xform.op = TJTransform.OP_TRANSPOSE;
|
||||
if (argv[i].equalsIgnoreCase("-transverse"))
|
||||
else if (argv[i].equalsIgnoreCase("-transverse"))
|
||||
xform.op = TJTransform.OP_TRANSVERSE;
|
||||
if (argv[i].equalsIgnoreCase("-rot90"))
|
||||
else if (argv[i].equalsIgnoreCase("-rot90"))
|
||||
xform.op = TJTransform.OP_ROT90;
|
||||
if (argv[i].equalsIgnoreCase("-rot180"))
|
||||
else if (argv[i].equalsIgnoreCase("-rot180"))
|
||||
xform.op = TJTransform.OP_ROT180;
|
||||
if (argv[i].equalsIgnoreCase("-rot270"))
|
||||
else if (argv[i].equalsIgnoreCase("-rot270"))
|
||||
xform.op = TJTransform.OP_ROT270;
|
||||
if (argv[i].equalsIgnoreCase("-custom"))
|
||||
else if (argv[i].equalsIgnoreCase("-custom"))
|
||||
xform.cf = new TJExample();
|
||||
else if (argv[i].length() > 2 &&
|
||||
argv[i].substring(0, 2).equalsIgnoreCase("-c")) {
|
||||
if (i >= argv.length - 1)
|
||||
argv[i].substring(0, 2).equalsIgnoreCase("-c") &&
|
||||
i < argv.length - 1) {
|
||||
String[] cropArg = argv[++i].split("[x\\+]");
|
||||
if (cropArg.length != 4)
|
||||
usage();
|
||||
String[] cropArg = argv[++i].split(",");
|
||||
if (cropArg.length != 3)
|
||||
xform.width = Integer.parseInt(cropArg[0]);
|
||||
xform.height = Integer.parseInt(cropArg[1]);
|
||||
xform.x = Integer.parseInt(cropArg[2]);
|
||||
xform.y = Integer.parseInt(cropArg[3]);
|
||||
if (xform.x < 0 || xform.y < 0 || xform.width < 1 ||
|
||||
xform.height < 1)
|
||||
usage();
|
||||
String[] dimArg = cropArg[2].split("[xX]");
|
||||
if (dimArg.length != 2)
|
||||
usage();
|
||||
int tempx = Integer.parseInt(cropArg[0]);
|
||||
int tempy = Integer.parseInt(cropArg[1]);
|
||||
int tempw = Integer.parseInt(dimArg[0]);
|
||||
int temph = Integer.parseInt(dimArg[1]);
|
||||
if (tempx < 0 || tempy < 0 || tempw < 0 || temph < 0)
|
||||
usage();
|
||||
xform.x = tempx;
|
||||
xform.y = tempy;
|
||||
xform.width = tempw;
|
||||
xform.height = temph;
|
||||
xform.options |= TJTransform.OPT_CROP;
|
||||
}
|
||||
if (argv[i].substring(0, 2).equalsIgnoreCase("-d"))
|
||||
} else if (argv[i].substring(0, 2).equalsIgnoreCase("-d"))
|
||||
display = true;
|
||||
if (argv[i].equalsIgnoreCase("-fastupsample")) {
|
||||
else if (argv[i].equalsIgnoreCase("-fastupsample")) {
|
||||
System.out.println("Using fast upsampling code");
|
||||
flags |= TJ.FLAG_FASTUPSAMPLE;
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-fastdct")) {
|
||||
} else if (argv[i].equalsIgnoreCase("-fastdct")) {
|
||||
System.out.println("Using fastest DCT/IDCT algorithm");
|
||||
flags |= TJ.FLAG_FASTDCT;
|
||||
}
|
||||
if (argv[i].equalsIgnoreCase("-accuratedct")) {
|
||||
} else if (argv[i].equalsIgnoreCase("-accuratedct")) {
|
||||
System.out.println("Using most accurate DCT/IDCT algorithm");
|
||||
flags |= TJ.FLAG_ACCURATEDCT;
|
||||
} else usage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Determine input and output image formats based on file extensions. */
|
||||
String[] inFileTokens = argv[0].split("\\.");
|
||||
if (inFileTokens.length > 1)
|
||||
inFormat = inFileTokens[inFileTokens.length - 1];
|
||||
@@ -238,61 +270,75 @@ public class TJExample implements TJCustomFilter {
|
||||
outFormat = outFileTokens[outFileTokens.length - 1];
|
||||
}
|
||||
|
||||
File file = new File(argv[0]);
|
||||
int width, height;
|
||||
|
||||
if (inFormat.equalsIgnoreCase("jpg")) {
|
||||
FileInputStream fis = new FileInputStream(file);
|
||||
int inputSize = fis.available();
|
||||
if (inputSize < 1) {
|
||||
/* Input image is a JPEG image. Decompress and/or transform it. */
|
||||
boolean doTransform = (xform.op != TJTransform.OP_NONE ||
|
||||
xform.options != 0 || xform.cf != null);
|
||||
|
||||
/* Read the JPEG file into memory. */
|
||||
File jpegFile = new File(argv[0]);
|
||||
FileInputStream fis = new FileInputStream(jpegFile);
|
||||
int jpegSize = fis.available();
|
||||
if (jpegSize < 1) {
|
||||
System.out.println("Input file contains no data");
|
||||
System.exit(1);
|
||||
}
|
||||
byte[] inputBuf = new byte[inputSize];
|
||||
fis.read(inputBuf);
|
||||
byte[] jpegBuf = new byte[jpegSize];
|
||||
fis.read(jpegBuf);
|
||||
fis.close();
|
||||
|
||||
TJDecompressor tjd;
|
||||
if (xform.op != TJTransform.OP_NONE || xform.options != 0 ||
|
||||
xform.cf != null) {
|
||||
TJTransformer tjt = new TJTransformer(inputBuf);
|
||||
TJTransform[] t = new TJTransform[1];
|
||||
t[0] = xform;
|
||||
t[0].options |= TJTransform.OPT_TRIM;
|
||||
TJDecompressor[] tjdx = tjt.transform(t, 0);
|
||||
tjd = tjdx[0];
|
||||
if (doTransform) {
|
||||
/* Transform it. */
|
||||
TJTransformer tjt = new TJTransformer(jpegBuf);
|
||||
TJTransform[] xforms = new TJTransform[1];
|
||||
xforms[0] = xform;
|
||||
xforms[0].options |= TJTransform.OPT_TRIM;
|
||||
TJDecompressor[] tjds = tjt.transform(xforms, 0);
|
||||
tjd = tjds[0];
|
||||
tjt.close();
|
||||
} else
|
||||
tjd = new TJDecompressor(inputBuf);
|
||||
tjd = new TJDecompressor(jpegBuf);
|
||||
|
||||
width = tjd.getWidth();
|
||||
height = tjd.getHeight();
|
||||
int inSubsamp = tjd.getSubsamp();
|
||||
System.out.println("Source Image: " + width + " x " + height +
|
||||
" pixels, " + sampName[inSubsamp] + " subsampling");
|
||||
if (outSubsamp < 0)
|
||||
outSubsamp = inSubsamp;
|
||||
int inColorspace = tjd.getColorspace();
|
||||
|
||||
if (outFormat.equalsIgnoreCase("jpg") &&
|
||||
(xform.op != TJTransform.OP_NONE || xform.options != 0) &&
|
||||
scaleFactor.isOne()) {
|
||||
file = new File(argv[1]);
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
System.out.println((doTransform ? "Transformed" : "Input") +
|
||||
" Image (jpg): " + width + " x " + height +
|
||||
" pixels, " + SUBSAMP_NAME[inSubsamp] +
|
||||
" subsampling, " + COLORSPACE_NAME[inColorspace]);
|
||||
|
||||
if (outFormat.equalsIgnoreCase("jpg") && doTransform &&
|
||||
scalingFactor.isOne() && outSubsamp < 0 && outQual < 0) {
|
||||
/* Input image has been transformed, and no re-compression options
|
||||
have been selected. Write the transformed image to disk and
|
||||
exit. */
|
||||
File outFile = new File(argv[1]);
|
||||
FileOutputStream fos = new FileOutputStream(outFile);
|
||||
fos.write(tjd.getJPEGBuf(), 0, tjd.getJPEGSize());
|
||||
fos.close();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
width = scaleFactor.getScaled(width);
|
||||
height = scaleFactor.getScaled(height);
|
||||
/* Scaling and/or a non-JPEG output image format and/or compression
|
||||
options have been selected, so we need to decompress the
|
||||
input/transformed image. */
|
||||
width = scalingFactor.getScaled(width);
|
||||
height = scalingFactor.getScaled(height);
|
||||
if (outSubsamp < 0)
|
||||
outSubsamp = inSubsamp;
|
||||
|
||||
if (!outFormat.equalsIgnoreCase("jpg"))
|
||||
img = tjd.decompress(width, height, BufferedImage.TYPE_INT_RGB,
|
||||
flags);
|
||||
else
|
||||
bmpBuf = tjd.decompress(width, 0, height, TJ.PF_BGRX, flags);
|
||||
imgBuf = tjd.decompress(width, 0, height, TJ.PF_BGRX, flags);
|
||||
tjd.close();
|
||||
} else {
|
||||
img = ImageIO.read(file);
|
||||
/* Input image is not a JPEG image. Load it into memory. */
|
||||
img = ImageIO.read(new File(argv[0]));
|
||||
if (img == null)
|
||||
throw new Exception("Input image type not supported.");
|
||||
width = img.getWidth();
|
||||
@@ -301,61 +347,59 @@ public class TJExample implements TJCustomFilter {
|
||||
if (img.getType() == BufferedImage.TYPE_BYTE_GRAY)
|
||||
outSubsamp = TJ.SAMP_GRAY;
|
||||
else
|
||||
outSubsamp = TJ.SAMP_444;
|
||||
outSubsamp = DEFAULT_SUBSAMP;
|
||||
}
|
||||
System.out.println("Input Image: " + width + " x " + height +
|
||||
" pixels");
|
||||
}
|
||||
System.gc();
|
||||
if (!display)
|
||||
System.out.print("Dest. Image (" + outFormat + "): " + width + " x " +
|
||||
height + " pixels");
|
||||
System.out.print("Output Image (" + outFormat + "): " + width +
|
||||
" x " + height + " pixels");
|
||||
|
||||
if (display) {
|
||||
/* Display the uncompressed image */
|
||||
ImageIcon icon = new ImageIcon(img);
|
||||
JLabel label = new JLabel(icon, JLabel.CENTER);
|
||||
JOptionPane.showMessageDialog(null, label, "Output Image",
|
||||
JOptionPane.PLAIN_MESSAGE);
|
||||
} else if (outFormat.equalsIgnoreCase("jpg")) {
|
||||
System.out.println(", " + sampName[outSubsamp] +
|
||||
/* Output image format is JPEG. Compress the uncompressed image. */
|
||||
if (outQual < 0)
|
||||
outQual = DEFAULT_QUALITY;
|
||||
System.out.println(", " + SUBSAMP_NAME[outSubsamp] +
|
||||
" subsampling, quality = " + outQual);
|
||||
TJCompressor tjc = new TJCompressor();
|
||||
int jpegSize;
|
||||
byte[] jpegBuf;
|
||||
|
||||
TJCompressor tjc = new TJCompressor();
|
||||
tjc.setSubsamp(outSubsamp);
|
||||
tjc.setJPEGQuality(outQual);
|
||||
if (img != null)
|
||||
jpegBuf = tjc.compress(img, flags);
|
||||
else {
|
||||
tjc.setSourceImage(bmpBuf, 0, 0, width, 0, height, TJ.PF_BGRX);
|
||||
jpegBuf = tjc.compress(flags);
|
||||
}
|
||||
jpegSize = tjc.getCompressedSize();
|
||||
tjc.setSourceImage(img, 0, 0, 0, 0);
|
||||
else
|
||||
tjc.setSourceImage(imgBuf, 0, 0, width, 0, height, TJ.PF_BGRX);
|
||||
byte[] jpegBuf = tjc.compress(flags);
|
||||
int jpegSize = tjc.getCompressedSize();
|
||||
tjc.close();
|
||||
|
||||
file = new File(argv[1]);
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
/* Write the JPEG image to disk. */
|
||||
File outFile = new File(argv[1]);
|
||||
FileOutputStream fos = new FileOutputStream(outFile);
|
||||
fos.write(jpegBuf, 0, jpegSize);
|
||||
fos.close();
|
||||
} else {
|
||||
/* Output image format is not JPEG. Save the uncompressed image
|
||||
directly to disk. */
|
||||
System.out.print("\n");
|
||||
file = new File(argv[1]);
|
||||
ImageIO.write(img, outFormat, file);
|
||||
File outFile = new File(argv[1]);
|
||||
ImageIO.write(img, outFormat, outFile);
|
||||
}
|
||||
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
public void customFilter(ShortBuffer coeffBuffer, Rectangle bufferRegion,
|
||||
Rectangle planeRegion, int componentIndex,
|
||||
int transformIndex, TJTransform transform)
|
||||
throws Exception {
|
||||
for (int i = 0; i < bufferRegion.width * bufferRegion.height; i++) {
|
||||
coeffBuffer.put(i, (short)(-coeffBuffer.get(i)));
|
||||
}
|
||||
}
|
||||
|
||||
static TJScalingFactor[] sf = null;
|
||||
static final TJScalingFactor[] SCALING_FACTORS =
|
||||
TJ.getScalingFactors();
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011-2012, 2014 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2018 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -37,98 +37,90 @@ import javax.imageio.*;
|
||||
import java.nio.*;
|
||||
import org.libjpegturbo.turbojpeg.*;
|
||||
|
||||
public class TJUnitTest {
|
||||
@SuppressWarnings("checkstyle:JavadocType")
|
||||
final class TJUnitTest {
|
||||
|
||||
private static final String classname =
|
||||
private TJUnitTest() {}
|
||||
|
||||
static final String CLASS_NAME =
|
||||
new TJUnitTest().getClass().getName();
|
||||
|
||||
private static void usage() {
|
||||
System.out.println("\nUSAGE: java " + classname + " [options]\n");
|
||||
System.out.println("Options:\n");
|
||||
System.out.println("-yuv = test YUV encoding/decoding support\n");
|
||||
static void usage() {
|
||||
System.out.println("\nUSAGE: java " + CLASS_NAME + " [options]\n");
|
||||
System.out.println("Options:");
|
||||
System.out.println("-yuv = test YUV encoding/decoding support");
|
||||
System.out.println("-noyuvpad = do not pad each line of each Y, U, and V plane to the nearest");
|
||||
System.out.println(" 4-byte boundary");
|
||||
System.out.println("-bi = test BufferedImage support\n");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
private static final String[] subNameLong = {
|
||||
"4:4:4", "4:2:2", "4:2:0", "GRAY", "4:4:0"
|
||||
static final String[] SUBNAME_LONG = {
|
||||
"4:4:4", "4:2:2", "4:2:0", "GRAY", "4:4:0", "4:1:1"
|
||||
};
|
||||
private static final String[] subName = {
|
||||
"444", "422", "420", "GRAY", "440"
|
||||
static final String[] SUBNAME = {
|
||||
"444", "422", "420", "GRAY", "440", "411"
|
||||
};
|
||||
|
||||
private static final String[] pixFormatStr = {
|
||||
static final String[] PIXFORMATSTR = {
|
||||
"RGB", "BGR", "RGBX", "BGRX", "XBGR", "XRGB", "Grayscale",
|
||||
"RGBA", "BGRA", "ABGR", "ARGB"
|
||||
"RGBA", "BGRA", "ABGR", "ARGB", "CMYK"
|
||||
};
|
||||
|
||||
private static final int[] alphaOffset = {
|
||||
-1, -1, -1, -1, -1, -1, -1, 3, 3, 0, 0
|
||||
};
|
||||
|
||||
private static final int[] _3byteFormats = {
|
||||
static final int[] FORMATS_3BYTE = {
|
||||
TJ.PF_RGB, TJ.PF_BGR
|
||||
};
|
||||
private static final int[] _3byteFormatsBI = {
|
||||
static final int[] FORMATS_3BYTEBI = {
|
||||
BufferedImage.TYPE_3BYTE_BGR
|
||||
};
|
||||
private static final int[] _4byteFormats = {
|
||||
TJ.PF_RGBX, TJ.PF_BGRX, TJ.PF_XBGR, TJ.PF_XRGB
|
||||
static final int[] FORMATS_4BYTE = {
|
||||
TJ.PF_RGBX, TJ.PF_BGRX, TJ.PF_XBGR, TJ.PF_XRGB, TJ.PF_CMYK
|
||||
};
|
||||
private static final int[] _4byteFormatsBI = {
|
||||
static final int[] FORMATS_4BYTEBI = {
|
||||
BufferedImage.TYPE_INT_BGR, BufferedImage.TYPE_INT_RGB,
|
||||
BufferedImage.TYPE_4BYTE_ABGR, BufferedImage.TYPE_4BYTE_ABGR_PRE,
|
||||
BufferedImage.TYPE_INT_ARGB, BufferedImage.TYPE_INT_ARGB_PRE
|
||||
};
|
||||
private static final int[] onlyGray = {
|
||||
static final int[] FORMATS_GRAY = {
|
||||
TJ.PF_GRAY
|
||||
};
|
||||
private static final int[] onlyGrayBI = {
|
||||
static final int[] FORMATS_GRAYBI = {
|
||||
BufferedImage.TYPE_BYTE_GRAY
|
||||
};
|
||||
private static final int[] onlyRGB = {
|
||||
static final int[] FORMATS_RGB = {
|
||||
TJ.PF_RGB
|
||||
};
|
||||
|
||||
private static final int YUVENCODE = 1;
|
||||
private static final int YUVDECODE = 2;
|
||||
private static int yuv = 0;
|
||||
private static boolean doYUV = false;
|
||||
private static int pad = 4;
|
||||
private static boolean bi = false;
|
||||
|
||||
private static int exitStatus = 0;
|
||||
|
||||
private static int biTypePF(int biType) {
|
||||
static int biTypePF(int biType) {
|
||||
ByteOrder byteOrder = ByteOrder.nativeOrder();
|
||||
switch(biType) {
|
||||
switch (biType) {
|
||||
case BufferedImage.TYPE_3BYTE_BGR:
|
||||
return TJ.PF_BGR;
|
||||
case BufferedImage.TYPE_4BYTE_ABGR:
|
||||
case BufferedImage.TYPE_4BYTE_ABGR_PRE:
|
||||
return TJ.PF_XBGR;
|
||||
return TJ.PF_ABGR;
|
||||
case BufferedImage.TYPE_BYTE_GRAY:
|
||||
return TJ.PF_GRAY;
|
||||
case BufferedImage.TYPE_INT_BGR:
|
||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
||||
return TJ.PF_XBGR;
|
||||
else
|
||||
return TJ.PF_RGBX;
|
||||
case BufferedImage.TYPE_INT_RGB:
|
||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
||||
return TJ.PF_XRGB;
|
||||
else
|
||||
return TJ.PF_BGRX;
|
||||
case BufferedImage.TYPE_INT_ARGB:
|
||||
case BufferedImage.TYPE_INT_ARGB_PRE:
|
||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
||||
return TJ.PF_ARGB;
|
||||
else
|
||||
return TJ.PF_BGRA;
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private static String biTypeStr(int biType) {
|
||||
switch(biType) {
|
||||
static String biTypeStr(int biType) {
|
||||
switch (biType) {
|
||||
case BufferedImage.TYPE_3BYTE_BGR:
|
||||
return "3BYTE_BGR";
|
||||
case BufferedImage.TYPE_4BYTE_ABGR:
|
||||
@@ -145,25 +137,22 @@ public class TJUnitTest {
|
||||
return "INT_ARGB";
|
||||
case BufferedImage.TYPE_INT_ARGB_PRE:
|
||||
return "INT_ARGB_PRE";
|
||||
}
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
private static double getTime() {
|
||||
return (double)System.nanoTime() / 1.0e9;
|
||||
}
|
||||
|
||||
private static void initBuf(byte[] buf, int w, int pitch, int h, int pf,
|
||||
int flags) throws Exception {
|
||||
static void initBuf(byte[] buf, int w, int pitch, int h, int pf, int flags)
|
||||
throws Exception {
|
||||
int roffset = TJ.getRedOffset(pf);
|
||||
int goffset = TJ.getGreenOffset(pf);
|
||||
int boffset = TJ.getBlueOffset(pf);
|
||||
int aoffset = alphaOffset[pf];
|
||||
int aoffset = TJ.getAlphaOffset(pf);
|
||||
int ps = TJ.getPixelSize(pf);
|
||||
int index, row, col, halfway = 16;
|
||||
|
||||
Arrays.fill(buf, (byte)0);
|
||||
if (pf == TJ.PF_GRAY) {
|
||||
Arrays.fill(buf, (byte)0);
|
||||
for (row = 0; row < h; row++) {
|
||||
for (col = 0; col < w; col++) {
|
||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||
@@ -178,6 +167,27 @@ public class TJUnitTest {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (pf == TJ.PF_CMYK) {
|
||||
Arrays.fill(buf, (byte)255);
|
||||
for (row = 0; row < h; row++) {
|
||||
for (col = 0; col < w; col++) {
|
||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||
index = (h - row - 1) * w + col;
|
||||
else
|
||||
index = row * w + col;
|
||||
if (((row / 8) + (col / 8)) % 2 == 0) {
|
||||
if (row >= halfway) buf[index * ps + 3] = 0;
|
||||
} else {
|
||||
buf[index * ps + 2] = 0;
|
||||
if (row < halfway)
|
||||
buf[index * ps + 1] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Arrays.fill(buf, (byte)0);
|
||||
for (row = 0; row < h; row++) {
|
||||
for (col = 0; col < w; col++) {
|
||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||
@@ -201,12 +211,12 @@ public class TJUnitTest {
|
||||
}
|
||||
}
|
||||
|
||||
private static void initIntBuf(int[] buf, int w, int pitch, int h, int pf,
|
||||
int flags) throws Exception {
|
||||
static void initIntBuf(int[] buf, int w, int pitch, int h, int pf, int flags)
|
||||
throws Exception {
|
||||
int rshift = TJ.getRedOffset(pf) * 8;
|
||||
int gshift = TJ.getGreenOffset(pf) * 8;
|
||||
int bshift = TJ.getBlueOffset(pf) * 8;
|
||||
int ashift = alphaOffset[pf] * 8;
|
||||
int ashift = TJ.getAlphaOffset(pf) * 8;
|
||||
int index, row, col, halfway = 16;
|
||||
|
||||
Arrays.fill(buf, 0);
|
||||
@@ -233,10 +243,10 @@ public class TJUnitTest {
|
||||
}
|
||||
}
|
||||
|
||||
private static void initImg(BufferedImage img, int pf, int flags)
|
||||
throws Exception {
|
||||
static void initImg(BufferedImage img, int pf, int flags) throws Exception {
|
||||
WritableRaster wr = img.getRaster();
|
||||
int imgType = img.getType();
|
||||
|
||||
if (imgType == BufferedImage.TYPE_INT_RGB ||
|
||||
imgType == BufferedImage.TYPE_INT_BGR ||
|
||||
imgType == BufferedImage.TYPE_INT_ARGB ||
|
||||
@@ -256,7 +266,7 @@ public class TJUnitTest {
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkVal(int row, int col, int v, String vname, int cv)
|
||||
static void checkVal(int row, int col, int v, String vname, int cv)
|
||||
throws Exception {
|
||||
v = (v < 0) ? v + 256 : v;
|
||||
if (v < cv - 1 || v > cv + 1) {
|
||||
@@ -265,7 +275,7 @@ public class TJUnitTest {
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkVal0(int row, int col, int v, String vname)
|
||||
static void checkVal0(int row, int col, int v, String vname)
|
||||
throws Exception {
|
||||
v = (v < 0) ? v + 256 : v;
|
||||
if (v > 1) {
|
||||
@@ -274,7 +284,7 @@ public class TJUnitTest {
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkVal255(int row, int col, int v, String vname)
|
||||
static void checkVal255(int row, int col, int v, String vname)
|
||||
throws Exception {
|
||||
v = (v < 0) ? v + 256 : v;
|
||||
if (v < 254) {
|
||||
@@ -283,19 +293,54 @@ public class TJUnitTest {
|
||||
}
|
||||
}
|
||||
|
||||
private static int checkBuf(byte[] buf, int w, int pitch, int h, int pf,
|
||||
int subsamp, TJScalingFactor sf, int flags)
|
||||
throws Exception {
|
||||
static int checkBuf(byte[] buf, int w, int pitch, int h, int pf, int subsamp,
|
||||
TJScalingFactor sf, int flags) throws Exception {
|
||||
int roffset = TJ.getRedOffset(pf);
|
||||
int goffset = TJ.getGreenOffset(pf);
|
||||
int boffset = TJ.getBlueOffset(pf);
|
||||
int aoffset = alphaOffset[pf];
|
||||
int aoffset = TJ.getAlphaOffset(pf);
|
||||
int ps = TJ.getPixelSize(pf);
|
||||
int index, row, col, retval = 1;
|
||||
int halfway = 16 * sf.getNum() / sf.getDenom();
|
||||
int blockSize = 8 * sf.getNum() / sf.getDenom();
|
||||
|
||||
try {
|
||||
|
||||
if (pf == TJ.PF_GRAY)
|
||||
roffset = goffset = boffset = 0;
|
||||
|
||||
if (pf == TJ.PF_CMYK) {
|
||||
for (row = 0; row < h; row++) {
|
||||
for (col = 0; col < w; col++) {
|
||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||
index = (h - row - 1) * w + col;
|
||||
else
|
||||
index = row * w + col;
|
||||
byte c = buf[index * ps];
|
||||
byte m = buf[index * ps + 1];
|
||||
byte y = buf[index * ps + 2];
|
||||
byte k = buf[index * ps + 3];
|
||||
checkVal255(row, col, c, "C");
|
||||
if (((row / blockSize) + (col / blockSize)) % 2 == 0) {
|
||||
checkVal255(row, col, m, "M");
|
||||
checkVal255(row, col, y, "Y");
|
||||
if (row < halfway)
|
||||
checkVal255(row, col, k, "K");
|
||||
else
|
||||
checkVal0(row, col, k, "K");
|
||||
} else {
|
||||
checkVal0(row, col, y, "Y");
|
||||
checkVal255(row, col, k, "K");
|
||||
if (row < halfway)
|
||||
checkVal0(row, col, m, "M");
|
||||
else
|
||||
checkVal255(row, col, m, "M");
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (row = 0; row < halfway; row++) {
|
||||
for (col = 0; col < w; col++) {
|
||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||
@@ -340,7 +385,7 @@ public class TJUnitTest {
|
||||
checkVal255(row, col, a, "A");
|
||||
}
|
||||
}
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
System.out.println("\n" + e.getMessage());
|
||||
retval = 0;
|
||||
}
|
||||
@@ -348,6 +393,17 @@ public class TJUnitTest {
|
||||
if (retval == 0) {
|
||||
for (row = 0; row < h; row++) {
|
||||
for (col = 0; col < w; col++) {
|
||||
if (pf == TJ.PF_CMYK) {
|
||||
int c = buf[pitch * row + col * ps];
|
||||
int m = buf[pitch * row + col * ps + 1];
|
||||
int y = buf[pitch * row + col * ps + 2];
|
||||
int k = buf[pitch * row + col * ps + 3];
|
||||
if (c < 0) c += 256;
|
||||
if (m < 0) m += 256;
|
||||
if (y < 0) y += 256;
|
||||
if (k < 0) k += 256;
|
||||
System.out.format("%3d/%3d/%3d/%3d ", c, m, y, k);
|
||||
} else {
|
||||
int r = buf[pitch * row + col * ps + roffset];
|
||||
int g = buf[pitch * row + col * ps + goffset];
|
||||
int b = buf[pitch * row + col * ps + boffset];
|
||||
@@ -356,19 +412,20 @@ public class TJUnitTest {
|
||||
if (b < 0) b += 256;
|
||||
System.out.format("%3d/%3d/%3d ", r, g, b);
|
||||
}
|
||||
}
|
||||
System.out.print("\n");
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
private static int checkIntBuf(int[] buf, int w, int pitch, int h, int pf,
|
||||
static int checkIntBuf(int[] buf, int w, int pitch, int h, int pf,
|
||||
int subsamp, TJScalingFactor sf, int flags)
|
||||
throws Exception {
|
||||
int rshift = TJ.getRedOffset(pf) * 8;
|
||||
int gshift = TJ.getGreenOffset(pf) * 8;
|
||||
int bshift = TJ.getBlueOffset(pf) * 8;
|
||||
int ashift = alphaOffset[pf] * 8;
|
||||
int ashift = TJ.getAlphaOffset(pf) * 8;
|
||||
int index, row, col, retval = 1;
|
||||
int halfway = 16 * sf.getNum() / sf.getDenom();
|
||||
int blockSize = 8 * sf.getNum() / sf.getDenom();
|
||||
@@ -418,7 +475,7 @@ public class TJUnitTest {
|
||||
checkVal255(row, col, a, "A");
|
||||
}
|
||||
}
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
System.out.println("\n" + e.getMessage());
|
||||
retval = 0;
|
||||
}
|
||||
@@ -440,7 +497,7 @@ public class TJUnitTest {
|
||||
return retval;
|
||||
}
|
||||
|
||||
private static int checkImg(BufferedImage img, int pf, int subsamp,
|
||||
static int checkImg(BufferedImage img, int pf, int subsamp,
|
||||
TJScalingFactor sf, int flags) throws Exception {
|
||||
WritableRaster wr = img.getRaster();
|
||||
int imgType = img.getType();
|
||||
@@ -465,21 +522,22 @@ public class TJUnitTest {
|
||||
}
|
||||
}
|
||||
|
||||
private static int PAD(int v, int p) {
|
||||
static int pad(int v, int p) {
|
||||
return ((v + (p) - 1) & (~((p) - 1)));
|
||||
}
|
||||
|
||||
private static int checkBufYUV(byte[] buf, int size, int w, int h,
|
||||
int subsamp) throws Exception {
|
||||
static int checkBufYUV(byte[] buf, int size, int w, int h, int subsamp,
|
||||
TJScalingFactor sf) throws Exception {
|
||||
int row, col;
|
||||
int hsf = TJ.getMCUWidth(subsamp) / 8, vsf = TJ.getMCUHeight(subsamp) / 8;
|
||||
int pw = PAD(w, hsf), ph = PAD(h, vsf);
|
||||
int pw = pad(w, hsf), ph = pad(h, vsf);
|
||||
int cw = pw / hsf, ch = ph / vsf;
|
||||
int ypitch = PAD(pw, 4), uvpitch = PAD(cw, 4);
|
||||
int ypitch = pad(pw, pad), uvpitch = pad(cw, pad);
|
||||
int retval = 1;
|
||||
int correctsize = ypitch * ph +
|
||||
(subsamp == TJ.SAMP_GRAY ? 0 : uvpitch * ch * 2);
|
||||
int halfway = 16;
|
||||
int halfway = 16 * sf.getNum() / sf.getDenom();
|
||||
int blockSize = 8 * sf.getNum() / sf.getDenom();
|
||||
|
||||
try {
|
||||
if (size != correctsize)
|
||||
@@ -489,7 +547,7 @@ public class TJUnitTest {
|
||||
for (row = 0; row < ph; row++) {
|
||||
for (col = 0; col < pw; col++) {
|
||||
byte y = buf[ypitch * row + col];
|
||||
if (((row / 8) + (col / 8)) % 2 == 0) {
|
||||
if (((row / blockSize) + (col / blockSize)) % 2 == 0) {
|
||||
if (row < halfway)
|
||||
checkVal255(row, col, y, "Y");
|
||||
else
|
||||
@@ -503,12 +561,12 @@ public class TJUnitTest {
|
||||
}
|
||||
}
|
||||
if (subsamp != TJ.SAMP_GRAY) {
|
||||
halfway = 16 / vsf;
|
||||
halfway = 16 / vsf * sf.getNum() / sf.getDenom();
|
||||
for (row = 0; row < ch; row++) {
|
||||
for (col = 0; col < cw; col++) {
|
||||
byte u = buf[ypitch * ph + (uvpitch * row + col)],
|
||||
v = buf[ypitch * ph + uvpitch * ch + (uvpitch * row + col)];
|
||||
if (((row * vsf / 8) + (col * hsf / 8)) % 2 == 0) {
|
||||
if (((row * vsf / blockSize) + (col * hsf / blockSize)) % 2 == 0) {
|
||||
checkVal(row, col, u, "U", 128);
|
||||
checkVal(row, col, v, "V", 128);
|
||||
} else {
|
||||
@@ -523,7 +581,7 @@ public class TJUnitTest {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
System.out.println("\n" + e.getMessage());
|
||||
retval = 0;
|
||||
}
|
||||
@@ -560,140 +618,105 @@ public class TJUnitTest {
|
||||
return retval;
|
||||
}
|
||||
|
||||
private static void writeJPEG(byte[] jpegBuf, int jpegBufSize,
|
||||
String filename) throws Exception {
|
||||
static void writeJPEG(byte[] jpegBuf, int jpegBufSize, String filename)
|
||||
throws Exception {
|
||||
File file = new File(filename);
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
fos.write(jpegBuf, 0, jpegBufSize);
|
||||
fos.close();
|
||||
}
|
||||
|
||||
private static int compTest(TJCompressor tjc, byte[] dstBuf, int w,
|
||||
int h, int pf, String baseName, int subsamp,
|
||||
int jpegQual, int flags) throws Exception {
|
||||
String tempstr;
|
||||
static int compTest(TJCompressor tjc, byte[] dstBuf, int w, int h, int pf,
|
||||
String baseName, int subsamp, int jpegQual, int flags)
|
||||
throws Exception {
|
||||
String tempStr;
|
||||
byte[] srcBuf = null;
|
||||
BufferedImage img = null;
|
||||
String pfStr;
|
||||
double t;
|
||||
String pfStr, pfStrLong;
|
||||
String buStr = (flags & TJ.FLAG_BOTTOMUP) != 0 ? "BU" : "TD";
|
||||
String buStrLong = (flags & TJ.FLAG_BOTTOMUP) != 0 ?
|
||||
"Bottom-Up" : "Top-Down ";
|
||||
int size = 0, ps, imgType = pf;
|
||||
|
||||
if (bi) {
|
||||
pf = biTypePF(imgType);
|
||||
pfStr = biTypeStr(imgType);
|
||||
} else
|
||||
pfStr = pixFormatStr[pf];
|
||||
pfStrLong = pfStr + " (" + PIXFORMATSTR[pf] + ")";
|
||||
} else {
|
||||
pfStr = PIXFORMATSTR[pf];
|
||||
pfStrLong = pfStr;
|
||||
}
|
||||
ps = TJ.getPixelSize(pf);
|
||||
|
||||
System.out.print(pfStr + " ");
|
||||
if (bi)
|
||||
System.out.print("(" + pixFormatStr[pf] + ") ");
|
||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||
System.out.print("Bottom-Up");
|
||||
else
|
||||
System.out.print("Top-Down ");
|
||||
System.out.print(" -> " + subNameLong[subsamp] + " ");
|
||||
if (yuv == YUVENCODE)
|
||||
System.out.print("YUV ... ");
|
||||
else
|
||||
System.out.print("Q" + jpegQual + " ... ");
|
||||
|
||||
if (bi) {
|
||||
img = new BufferedImage(w, h, imgType);
|
||||
initImg(img, pf, flags);
|
||||
tempstr = baseName + "_enc_" + pfStr + "_" +
|
||||
(((flags & TJ.FLAG_BOTTOMUP) != 0) ? "BU" : "TD") + "_" +
|
||||
subName[subsamp] + "_Q" + jpegQual + ".png";
|
||||
File file = new File(tempstr);
|
||||
tempStr = baseName + "_enc_" + pfStr + "_" + buStr + "_" +
|
||||
SUBNAME[subsamp] + "_Q" + jpegQual + ".png";
|
||||
File file = new File(tempStr);
|
||||
ImageIO.write(img, "png", file);
|
||||
tjc.setSourceImage(img, 0, 0, 0, 0);
|
||||
} else {
|
||||
srcBuf = new byte[w * h * ps + 1];
|
||||
initBuf(srcBuf, w, w * ps, h, pf, flags);
|
||||
tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, pf);
|
||||
}
|
||||
Arrays.fill(dstBuf, (byte)0);
|
||||
|
||||
t = getTime();
|
||||
tjc.setSubsamp(subsamp);
|
||||
tjc.setJPEGQuality(jpegQual);
|
||||
if (bi) {
|
||||
if (yuv == YUVENCODE)
|
||||
tjc.encodeYUV(img, dstBuf, flags);
|
||||
else
|
||||
tjc.compress(img, dstBuf, flags);
|
||||
} else {
|
||||
tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, pf);
|
||||
if (yuv == YUVENCODE)
|
||||
tjc.encodeYUV(dstBuf, flags);
|
||||
else
|
||||
tjc.compress(dstBuf, flags);
|
||||
}
|
||||
size = tjc.getCompressedSize();
|
||||
t = getTime() - t;
|
||||
|
||||
if (yuv == YUVENCODE)
|
||||
tempstr = baseName + "_enc_" + pfStr + "_" +
|
||||
(((flags & TJ.FLAG_BOTTOMUP) != 0) ? "BU" : "TD") + "_" +
|
||||
subName[subsamp] + ".yuv";
|
||||
else
|
||||
tempstr = baseName + "_enc_" + pfStr + "_" +
|
||||
(((flags & TJ.FLAG_BOTTOMUP) != 0) ? "BU" : "TD") + "_" +
|
||||
subName[subsamp] + "_Q" + jpegQual + ".jpg";
|
||||
writeJPEG(dstBuf, size, tempstr);
|
||||
|
||||
if (yuv == YUVENCODE) {
|
||||
if (checkBufYUV(dstBuf, size, w, h, subsamp) == 1)
|
||||
System.out.print("Passed.");
|
||||
if (doYUV) {
|
||||
System.out.format("%s %s -> YUV %s ... ", pfStrLong, buStrLong,
|
||||
SUBNAME_LONG[subsamp]);
|
||||
YUVImage yuvImage = tjc.encodeYUV(pad, flags);
|
||||
if (checkBufYUV(yuvImage.getBuf(), yuvImage.getSize(), w, h, subsamp,
|
||||
new TJScalingFactor(1, 1)) == 1)
|
||||
System.out.print("Passed.\n");
|
||||
else {
|
||||
System.out.print("FAILED!");
|
||||
System.out.print("FAILED!\n");
|
||||
exitStatus = -1;
|
||||
}
|
||||
} else
|
||||
System.out.print("Done.");
|
||||
System.out.format(" %.6f ms\n", t * 1000.);
|
||||
System.out.println(" Result in " + tempstr);
|
||||
|
||||
System.out.format("YUV %s %s -> JPEG Q%d ... ", SUBNAME_LONG[subsamp],
|
||||
buStrLong, jpegQual);
|
||||
tjc.setSourceImage(yuvImage);
|
||||
} else {
|
||||
System.out.format("%s %s -> %s Q%d ... ", pfStrLong, buStrLong,
|
||||
SUBNAME_LONG[subsamp], jpegQual);
|
||||
}
|
||||
tjc.compress(dstBuf, flags);
|
||||
size = tjc.getCompressedSize();
|
||||
|
||||
tempStr = baseName + "_enc_" + pfStr + "_" + buStr + "_" +
|
||||
SUBNAME[subsamp] + "_Q" + jpegQual + ".jpg";
|
||||
writeJPEG(dstBuf, size, tempStr);
|
||||
System.out.println("Done.\n Result in " + tempStr);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
private static void decompTest(TJDecompressor tjd, byte[] jpegBuf,
|
||||
int jpegSize, int w, int h, int pf,
|
||||
String baseName, int subsamp, int flags,
|
||||
TJScalingFactor sf) throws Exception {
|
||||
String pfStr, tempstr;
|
||||
double t;
|
||||
static void decompTest(TJDecompressor tjd, byte[] jpegBuf, int jpegSize,
|
||||
int w, int h, int pf, String baseName, int subsamp,
|
||||
int flags, TJScalingFactor sf) throws Exception {
|
||||
String pfStr, pfStrLong, tempStr;
|
||||
String buStrLong = (flags & TJ.FLAG_BOTTOMUP) != 0 ?
|
||||
"Bottom-Up" : "Top-Down ";
|
||||
int scaledWidth = sf.getScaled(w);
|
||||
int scaledHeight = sf.getScaled(h);
|
||||
int temp1, temp2, imgType = pf;
|
||||
BufferedImage img = null;
|
||||
byte[] dstBuf = null;
|
||||
|
||||
if (yuv == YUVENCODE) return;
|
||||
|
||||
if (bi) {
|
||||
pf = biTypePF(imgType);
|
||||
pfStr = biTypeStr(imgType);
|
||||
} else
|
||||
pfStr = pixFormatStr[pf];
|
||||
|
||||
System.out.print("JPEG -> ");
|
||||
if (yuv == YUVDECODE)
|
||||
System.out.print("YUV " + subNameLong[subsamp] + " ... ");
|
||||
else {
|
||||
System.out.print(pfStr + " ");
|
||||
if (bi)
|
||||
System.out.print("(" + pixFormatStr[pf] + ") ");
|
||||
if ((flags & TJ.FLAG_BOTTOMUP) != 0)
|
||||
System.out.print("Bottom-Up ");
|
||||
else
|
||||
System.out.print("Top-Down ");
|
||||
if (!sf.isOne())
|
||||
System.out.print(sf.getNum() + "/" + sf.getDenom() + " ... ");
|
||||
else
|
||||
System.out.print("... ");
|
||||
pfStrLong = pfStr + " (" + PIXFORMATSTR[pf] + ")";
|
||||
} else {
|
||||
pfStr = PIXFORMATSTR[pf];
|
||||
pfStrLong = pfStr;
|
||||
}
|
||||
|
||||
t = getTime();
|
||||
tjd.setJPEGImage(jpegBuf, jpegSize);
|
||||
tjd.setSourceImage(jpegBuf, jpegSize);
|
||||
if (tjd.getWidth() != w || tjd.getHeight() != h ||
|
||||
tjd.getSubsamp() != subsamp)
|
||||
throw new Exception("Incorrect JPEG header");
|
||||
@@ -705,70 +728,79 @@ public class TJUnitTest {
|
||||
if (temp1 != scaledWidth || temp2 != scaledHeight)
|
||||
throw new Exception("Scaled size mismatch");
|
||||
|
||||
if (yuv == YUVDECODE)
|
||||
dstBuf = tjd.decompressToYUV(flags);
|
||||
if (doYUV) {
|
||||
System.out.format("JPEG -> YUV %s ", SUBNAME_LONG[subsamp]);
|
||||
if (!sf.isOne())
|
||||
System.out.format("%d/%d ... ", sf.getNum(), sf.getDenom());
|
||||
else System.out.print("... ");
|
||||
YUVImage yuvImage = tjd.decompressToYUV(scaledWidth, pad, scaledHeight,
|
||||
flags);
|
||||
if (checkBufYUV(yuvImage.getBuf(), yuvImage.getSize(), scaledWidth,
|
||||
scaledHeight, subsamp, sf) == 1)
|
||||
System.out.print("Passed.\n");
|
||||
else {
|
||||
System.out.print("FAILED!\n"); exitStatus = -1;
|
||||
}
|
||||
|
||||
System.out.format("YUV %s -> %s %s ... ", SUBNAME_LONG[subsamp],
|
||||
pfStrLong, buStrLong);
|
||||
tjd.setSourceImage(yuvImage);
|
||||
} else {
|
||||
System.out.format("JPEG -> %s %s ", pfStrLong, buStrLong);
|
||||
if (!sf.isOne())
|
||||
System.out.format("%d/%d ... ", sf.getNum(), sf.getDenom());
|
||||
else System.out.print("... ");
|
||||
}
|
||||
if (bi)
|
||||
img = tjd.decompress(scaledWidth, scaledHeight, imgType, flags);
|
||||
else
|
||||
dstBuf = tjd.decompress(scaledWidth, 0, scaledHeight, pf, flags);
|
||||
}
|
||||
t = getTime() - t;
|
||||
|
||||
if (bi) {
|
||||
tempstr = baseName + "_dec_" + pfStr + "_" +
|
||||
tempStr = baseName + "_dec_" + pfStr + "_" +
|
||||
(((flags & TJ.FLAG_BOTTOMUP) != 0) ? "BU" : "TD") + "_" +
|
||||
subName[subsamp] + "_" +
|
||||
SUBNAME[subsamp] + "_" +
|
||||
(double)sf.getNum() / (double)sf.getDenom() + "x" + ".png";
|
||||
File file = new File(tempstr);
|
||||
File file = new File(tempStr);
|
||||
ImageIO.write(img, "png", file);
|
||||
}
|
||||
|
||||
if (yuv == YUVDECODE) {
|
||||
if (checkBufYUV(dstBuf, dstBuf.length, w, h, subsamp) == 1)
|
||||
System.out.print("Passed.");
|
||||
else {
|
||||
System.out.print("FAILED!"); exitStatus = -1;
|
||||
}
|
||||
} else {
|
||||
if ((bi && checkImg(img, pf, subsamp, sf, flags) == 1) ||
|
||||
(!bi && checkBuf(dstBuf, scaledWidth,
|
||||
scaledWidth * TJ.getPixelSize(pf), scaledHeight, pf,
|
||||
subsamp, sf, flags) == 1))
|
||||
System.out.print("Passed.");
|
||||
System.out.print("Passed.\n");
|
||||
else {
|
||||
System.out.print("FAILED!");
|
||||
System.out.print("FAILED!\n");
|
||||
exitStatus = -1;
|
||||
}
|
||||
}
|
||||
System.out.format(" %.6f ms\n", t * 1000.);
|
||||
}
|
||||
|
||||
private static void decompTest(TJDecompressor tjd, byte[] jpegBuf,
|
||||
int jpegSize, int w, int h, int pf,
|
||||
String baseName, int subsamp,
|
||||
static void decompTest(TJDecompressor tjd, byte[] jpegBuf, int jpegSize,
|
||||
int w, int h, int pf, String baseName, int subsamp,
|
||||
int flags) throws Exception {
|
||||
int i;
|
||||
if ((subsamp == TJ.SAMP_444 || subsamp == TJ.SAMP_GRAY) && yuv == 0) {
|
||||
TJScalingFactor[] sf = TJ.getScalingFactors();
|
||||
for (i = 0; i < sf.length; i++)
|
||||
for (i = 0; i < sf.length; i++) {
|
||||
int num = sf[i].getNum();
|
||||
int denom = sf[i].getDenom();
|
||||
if (subsamp == TJ.SAMP_444 || subsamp == TJ.SAMP_GRAY ||
|
||||
(subsamp == TJ.SAMP_411 && num == 1 &&
|
||||
(denom == 2 || denom == 1)) ||
|
||||
(subsamp != TJ.SAMP_411 && num == 1 &&
|
||||
(denom == 4 || denom == 2 || denom == 1)))
|
||||
decompTest(tjd, jpegBuf, jpegSize, w, h, pf, baseName, subsamp,
|
||||
flags, sf[i]);
|
||||
} else
|
||||
decompTest(tjd, jpegBuf, jpegSize, w, h, pf, baseName, subsamp,
|
||||
flags, new TJScalingFactor(1, 1));
|
||||
}
|
||||
}
|
||||
|
||||
private static void doTest(int w, int h, int[] formats, int subsamp,
|
||||
String baseName) throws Exception {
|
||||
static void doTest(int w, int h, int[] formats, int subsamp, String baseName)
|
||||
throws Exception {
|
||||
TJCompressor tjc = null;
|
||||
TJDecompressor tjd = null;
|
||||
int size;
|
||||
byte[] dstBuf;
|
||||
|
||||
if (yuv == YUVENCODE)
|
||||
dstBuf = new byte[TJ.bufSizeYUV(w, h, subsamp)];
|
||||
else
|
||||
dstBuf = new byte[TJ.bufSize(w, h, subsamp)];
|
||||
|
||||
try {
|
||||
@@ -776,30 +808,27 @@ public class TJUnitTest {
|
||||
tjd = new TJDecompressor();
|
||||
|
||||
for (int pf : formats) {
|
||||
if (pf < 0) continue;
|
||||
for (int i = 0; i < 2; i++) {
|
||||
int flags = 0;
|
||||
if (subsamp == TJ.SAMP_422 || subsamp == TJ.SAMP_420 ||
|
||||
subsamp == TJ.SAMP_440)
|
||||
subsamp == TJ.SAMP_440 || subsamp == TJ.SAMP_411)
|
||||
flags |= TJ.FLAG_FASTUPSAMPLE;
|
||||
if (i == 1) {
|
||||
if (yuv == YUVDECODE) {
|
||||
tjc.close();
|
||||
tjd.close();
|
||||
return;
|
||||
} else
|
||||
if (i == 1)
|
||||
flags |= TJ.FLAG_BOTTOMUP;
|
||||
}
|
||||
size = compTest(tjc, dstBuf, w, h, pf, baseName, subsamp, 100,
|
||||
flags);
|
||||
decompTest(tjd, dstBuf, size, w, h, pf, baseName, subsamp, flags);
|
||||
if (pf >= TJ.PF_RGBX && pf <= TJ.PF_XRGB && !bi)
|
||||
if (pf >= TJ.PF_RGBX && pf <= TJ.PF_XRGB && !bi) {
|
||||
System.out.print("\n");
|
||||
decompTest(tjd, dstBuf, size, w, h, pf + (TJ.PF_RGBA - TJ.PF_RGBX),
|
||||
baseName, subsamp, flags);
|
||||
}
|
||||
System.out.print("\n");
|
||||
}
|
||||
}
|
||||
System.out.print("--------------------\n\n");
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
if (tjc != null) tjc.close();
|
||||
if (tjd != null) tjd.close();
|
||||
throw e;
|
||||
@@ -808,9 +837,10 @@ public class TJUnitTest {
|
||||
if (tjd != null) tjd.close();
|
||||
}
|
||||
|
||||
private static void bufSizeTest() throws Exception {
|
||||
static void bufSizeTest() throws Exception {
|
||||
int w, h, i, subsamp;
|
||||
byte[] srcBuf, dstBuf;
|
||||
byte[] srcBuf, dstBuf = null;
|
||||
YUVImage dstImage = null;
|
||||
TJCompressor tjc = null;
|
||||
Random r = new Random();
|
||||
|
||||
@@ -824,8 +854,8 @@ public class TJUnitTest {
|
||||
if (h % 100 == 0)
|
||||
System.out.format("%04d x %04d\b\b\b\b\b\b\b\b\b\b\b", w, h);
|
||||
srcBuf = new byte[w * h * 4];
|
||||
if (yuv == YUVENCODE)
|
||||
dstBuf = new byte[TJ.bufSizeYUV(w, h, subsamp)];
|
||||
if (doYUV)
|
||||
dstImage = new YUVImage(w, pad, h, subsamp);
|
||||
else
|
||||
dstBuf = new byte[TJ.bufSize(w, h, subsamp)];
|
||||
for (i = 0; i < w * h * 4; i++) {
|
||||
@@ -834,29 +864,32 @@ public class TJUnitTest {
|
||||
tjc.setSourceImage(srcBuf, 0, 0, w, 0, h, TJ.PF_BGRX);
|
||||
tjc.setSubsamp(subsamp);
|
||||
tjc.setJPEGQuality(100);
|
||||
if (yuv == YUVENCODE)
|
||||
tjc.encodeYUV(dstBuf, 0);
|
||||
if (doYUV)
|
||||
tjc.encodeYUV(dstImage, 0);
|
||||
else
|
||||
tjc.compress(dstBuf, 0);
|
||||
|
||||
srcBuf = new byte[h * w * 4];
|
||||
if (yuv == YUVENCODE)
|
||||
dstBuf = new byte[TJ.bufSizeYUV(h, w, subsamp)];
|
||||
if (doYUV)
|
||||
dstImage = new YUVImage(h, pad, w, subsamp);
|
||||
else
|
||||
dstBuf = new byte[TJ.bufSize(h, w, subsamp)];
|
||||
for (i = 0; i < h * w * 4; i++) {
|
||||
srcBuf[i] = (byte)(r.nextInt(2) * 255);
|
||||
}
|
||||
tjc.setSourceImage(srcBuf, 0, 0, h, 0, w, TJ.PF_BGRX);
|
||||
if (yuv == YUVENCODE)
|
||||
tjc.encodeYUV(dstBuf, 0);
|
||||
if (doYUV)
|
||||
tjc.encodeYUV(dstImage, 0);
|
||||
else
|
||||
tjc.compress(dstBuf, 0);
|
||||
}
|
||||
dstImage = null;
|
||||
dstBuf = null;
|
||||
System.gc();
|
||||
}
|
||||
}
|
||||
System.out.println("Done. ");
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
if (tjc != null) tjc.close();
|
||||
throw e;
|
||||
}
|
||||
@@ -866,59 +899,59 @@ public class TJUnitTest {
|
||||
public static void main(String[] argv) {
|
||||
try {
|
||||
String testName = "javatest";
|
||||
boolean doyuv = false;
|
||||
for (int i = 0; i < argv.length; i++) {
|
||||
if (argv[i].equalsIgnoreCase("-yuv"))
|
||||
doyuv = true;
|
||||
if (argv[i].substring(0, 1).equalsIgnoreCase("-h") ||
|
||||
argv[i].equalsIgnoreCase("-?"))
|
||||
usage();
|
||||
if (argv[i].equalsIgnoreCase("-bi")) {
|
||||
doYUV = true;
|
||||
else if (argv[i].equalsIgnoreCase("-noyuvpad"))
|
||||
pad = 1;
|
||||
else if (argv[i].equalsIgnoreCase("-bi")) {
|
||||
bi = true;
|
||||
testName = "javabitest";
|
||||
} else
|
||||
usage();
|
||||
}
|
||||
}
|
||||
if (doyuv) yuv = YUVENCODE;
|
||||
doTest(35, 39, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_444,
|
||||
if (doYUV)
|
||||
FORMATS_4BYTE[4] = -1;
|
||||
doTest(35, 39, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_444,
|
||||
testName);
|
||||
doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_444,
|
||||
doTest(39, 41, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_444,
|
||||
testName);
|
||||
doTest(41, 35, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_422,
|
||||
doTest(41, 35, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_422,
|
||||
testName);
|
||||
doTest(35, 39, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_422,
|
||||
doTest(35, 39, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_422,
|
||||
testName);
|
||||
doTest(39, 41, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_420,
|
||||
doTest(39, 41, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_420,
|
||||
testName);
|
||||
doTest(41, 35, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_420,
|
||||
doTest(41, 35, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_420,
|
||||
testName);
|
||||
doTest(35, 39, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_440,
|
||||
doTest(35, 39, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_440,
|
||||
testName);
|
||||
doTest(39, 41, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_440,
|
||||
doTest(39, 41, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_440,
|
||||
testName);
|
||||
doTest(35, 39, bi ? onlyGrayBI : onlyGray, TJ.SAMP_GRAY, testName);
|
||||
doTest(39, 41, bi ? _3byteFormatsBI : _3byteFormats, TJ.SAMP_GRAY,
|
||||
doTest(41, 35, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_411,
|
||||
testName);
|
||||
doTest(41, 35, bi ? _4byteFormatsBI : _4byteFormats, TJ.SAMP_GRAY,
|
||||
doTest(35, 39, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_411,
|
||||
testName);
|
||||
doTest(39, 41, bi ? FORMATS_GRAYBI : FORMATS_GRAY, TJ.SAMP_GRAY,
|
||||
testName);
|
||||
doTest(41, 35, bi ? FORMATS_3BYTEBI : FORMATS_3BYTE, TJ.SAMP_GRAY,
|
||||
testName);
|
||||
FORMATS_4BYTE[4] = -1;
|
||||
doTest(35, 39, bi ? FORMATS_4BYTEBI : FORMATS_4BYTE, TJ.SAMP_GRAY,
|
||||
testName);
|
||||
if (!bi)
|
||||
bufSizeTest();
|
||||
if (doyuv && !bi) {
|
||||
if (doYUV && !bi) {
|
||||
System.out.print("\n--------------------\n\n");
|
||||
yuv = YUVDECODE;
|
||||
doTest(48, 48, onlyRGB, TJ.SAMP_444, "javatest_yuv0");
|
||||
doTest(35, 39, onlyRGB, TJ.SAMP_444, "javatest_yuv1");
|
||||
doTest(48, 48, onlyRGB, TJ.SAMP_422, "javatest_yuv0");
|
||||
doTest(39, 41, onlyRGB, TJ.SAMP_422, "javatest_yuv1");
|
||||
doTest(48, 48, onlyRGB, TJ.SAMP_420, "javatest_yuv0");
|
||||
doTest(41, 35, onlyRGB, TJ.SAMP_420, "javatest_yuv1");
|
||||
doTest(48, 48, onlyRGB, TJ.SAMP_440, "javatest_yuv0");
|
||||
doTest(35, 39, onlyRGB, TJ.SAMP_440, "javatest_yuv1");
|
||||
doTest(48, 48, onlyRGB, TJ.SAMP_GRAY, "javatest_yuv0");
|
||||
doTest(35, 39, onlyRGB, TJ.SAMP_GRAY, "javatest_yuv1");
|
||||
doTest(48, 48, onlyGray, TJ.SAMP_GRAY, "javatest_yuv0");
|
||||
doTest(39, 41, onlyGray, TJ.SAMP_GRAY, "javatest_yuv1");
|
||||
doTest(48, 48, FORMATS_RGB, TJ.SAMP_444, "javatest_yuv0");
|
||||
doTest(48, 48, FORMATS_RGB, TJ.SAMP_422, "javatest_yuv0");
|
||||
doTest(48, 48, FORMATS_RGB, TJ.SAMP_420, "javatest_yuv0");
|
||||
doTest(48, 48, FORMATS_RGB, TJ.SAMP_440, "javatest_yuv0");
|
||||
doTest(48, 48, FORMATS_RGB, TJ.SAMP_411, "javatest_yuv0");
|
||||
doTest(48, 48, FORMATS_RGB, TJ.SAMP_GRAY, "javatest_yuv0");
|
||||
doTest(48, 48, FORMATS_GRAY, TJ.SAMP_GRAY, "javatest_yuv0");
|
||||
}
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
exitStatus = -1;
|
||||
}
|
||||
|
||||
@@ -1,41 +1,24 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
All Classes
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white">
|
||||
<FONT size="+1" CLASS="FrameHeadingFont">
|
||||
<B>All Classes</B></FONT>
|
||||
<BR>
|
||||
|
||||
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJ</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><I>TJCustomFilter</I></A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>All Classes</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar">All Classes</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJ</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><i>TJCustomFilter</i></a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJException</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">YUVImage</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,41 +1,24 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
All Classes
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white">
|
||||
<FONT size="+1" CLASS="FrameHeadingFont">
|
||||
<B>All Classes</B></FONT>
|
||||
<BR>
|
||||
|
||||
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
|
||||
<TR>
|
||||
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><I>TJCustomFilter</I></A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>
|
||||
<BR>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</A>
|
||||
<BR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>All Classes</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar">All Classes</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><i>TJCustomFilter</i></a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,414 +1,532 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Constant Field Values
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Constant Field Values</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Constant Field Values";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?constant-values.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
|
||||
<li><a href="constant-values.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H1>
|
||||
Constant Field Values</H1>
|
||||
</CENTER>
|
||||
<HR SIZE="4" NOSHADE>
|
||||
<B>Contents</B><UL>
|
||||
<LI><A HREF="#org.libjpegturbo">org.libjpegturbo.*</A>
|
||||
</UL>
|
||||
|
||||
<A NAME="org.libjpegturbo"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left"><FONT SIZE="+2">
|
||||
org.libjpegturbo.*</FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="3">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>4096</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP">FLAG_BOTTOMUP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTDCT">FLAG_FASTDCT</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2048</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>256</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">FLAG_FORCEMMX</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>8</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE">FLAG_FORCESSE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>16</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2">FLAG_FORCESSE2</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>32</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3">FLAG_FORCESSE3</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>128</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.NUMPF"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#NUMPF">NUMPF</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>11</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.NUMSAMP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#NUMSAMP">NUMSAMP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>5</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_ABGR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>9</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_ARGB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>10</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_BGR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_BGRA"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>8</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_BGRX"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>3</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_GRAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>6</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_RGB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>0</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_RGBA"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>7</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_RGBX"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_XBGR"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.PF_XRGB"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>5</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_420"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_422"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_440"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_444"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>0</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJ.html#SAMP_GRAY">SAMP_GRAY</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>3</CODE></TD>
|
||||
</TR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
<P>
|
||||
|
||||
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="3">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.NUMOP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#NUMOP">NUMOP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>8</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_HFLIP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_HFLIP">OP_HFLIP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_NONE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_NONE">OP_NONE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>0</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT180"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT180">OP_ROT180</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>6</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT270"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT270">OP_ROT270</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>7</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT90"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT90">OP_ROT90</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>5</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSPOSE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_TRANSPOSE">OP_TRANSPOSE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>3</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSVERSE"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_TRANSVERSE">OP_TRANSVERSE</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OP_VFLIP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OP_VFLIP">OP_VFLIP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_CROP"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_CROP">OPT_CROP</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>4</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_GRAY"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_GRAY">OPT_GRAY</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>8</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_NOOUTPUT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_NOOUTPUT">OPT_NOOUTPUT</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>16</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_PERFECT"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT">OPT_PERFECT</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>1</CODE></TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform.OPT_TRIM"><!-- --></A><TD ALIGN="right"><FONT SIZE="-1">
|
||||
<CODE>public static final int</CODE></FONT></TD>
|
||||
<TD ALIGN="left"><CODE><A HREF="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_TRIM">OPT_TRIM</A></CODE></TD>
|
||||
<TD ALIGN="right"><CODE>2</CODE></TD>
|
||||
</TR>
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 title="Constant Field Values" class="title">Constant Field Values</h1>
|
||||
<h2 title="Contents">Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#org.libjpegturbo">org.libjpegturbo.*</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="constantValuesContainer"><a name="org.libjpegturbo">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h2 title="org.libjpegturbo">org.libjpegturbo.*</h2>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
|
||||
<caption><span>org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th scope="col">Constant Field</th>
|
||||
<th class="colLast" scope="col">Value</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_CMYK">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_CMYK">CS_CMYK</a></code></td>
|
||||
<td class="colLast"><code>3</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_GRAY">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_GRAY">CS_GRAY</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_RGB">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_RGB">CS_RGB</a></code></td>
|
||||
<td class="colLast"><code>0</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_YCbCr">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_YCbCr">CS_YCbCr</a></code></td>
|
||||
<td class="colLast"><code>1</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.CS_YCCK">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#CS_YCCK">CS_YCCK</a></code></td>
|
||||
<td class="colLast"><code>4</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.ERR_FATAL">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#ERR_FATAL">ERR_FATAL</a></code></td>
|
||||
<td class="colLast"><code>1</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.ERR_WARNING">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#ERR_WARNING">ERR_WARNING</a></code></td>
|
||||
<td class="colLast"><code>0</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_ACCURATEDCT">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_ACCURATEDCT">FLAG_ACCURATEDCT</a></code></td>
|
||||
<td class="colLast"><code>4096</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_BOTTOMUP">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP">FLAG_BOTTOMUP</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTDCT">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTDCT">FLAG_FASTDCT</a></code></td>
|
||||
<td class="colLast"><code>2048</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FASTUPSAMPLE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FASTUPSAMPLE">FLAG_FASTUPSAMPLE</a></code></td>
|
||||
<td class="colLast"><code>256</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">FLAG_FORCEMMX</a></code></td>
|
||||
<td class="colLast"><code>8</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE">FLAG_FORCESSE</a></code></td>
|
||||
<td class="colLast"><code>16</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2">FLAG_FORCESSE2</a></code></td>
|
||||
<td class="colLast"><code>32</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3">FLAG_FORCESSE3</a></code></td>
|
||||
<td class="colLast"><code>128</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_PROGRESSIVE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_PROGRESSIVE">FLAG_PROGRESSIVE</a></code></td>
|
||||
<td class="colLast"><code>16384</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.FLAG_STOPONWARNING">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_STOPONWARNING">FLAG_STOPONWARNING</a></code></td>
|
||||
<td class="colLast"><code>8192</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMCS">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMCS">NUMCS</a></code></td>
|
||||
<td class="colLast"><code>5</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMERR">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMERR">NUMERR</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMPF">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMPF">NUMPF</a></code></td>
|
||||
<td class="colLast"><code>12</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.NUMSAMP">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#NUMSAMP">NUMSAMP</a></code></td>
|
||||
<td class="colLast"><code>6</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_ABGR">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_ABGR">PF_ABGR</a></code></td>
|
||||
<td class="colLast"><code>9</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_ARGB">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_ARGB">PF_ARGB</a></code></td>
|
||||
<td class="colLast"><code>10</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGR">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGR">PF_BGR</a></code></td>
|
||||
<td class="colLast"><code>1</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGRA">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRA">PF_BGRA</a></code></td>
|
||||
<td class="colLast"><code>8</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_BGRX">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_BGRX">PF_BGRX</a></code></td>
|
||||
<td class="colLast"><code>3</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_CMYK">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_CMYK">PF_CMYK</a></code></td>
|
||||
<td class="colLast"><code>11</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_GRAY">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_GRAY">PF_GRAY</a></code></td>
|
||||
<td class="colLast"><code>6</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGB">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGB">PF_RGB</a></code></td>
|
||||
<td class="colLast"><code>0</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGBA">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBA">PF_RGBA</a></code></td>
|
||||
<td class="colLast"><code>7</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_RGBX">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_RGBX">PF_RGBX</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_XBGR">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_XBGR">PF_XBGR</a></code></td>
|
||||
<td class="colLast"><code>4</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.PF_XRGB">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#PF_XRGB">PF_XRGB</a></code></td>
|
||||
<td class="colLast"><code>5</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_411">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_411">SAMP_411</a></code></td>
|
||||
<td class="colLast"><code>5</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_420">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_420">SAMP_420</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_422">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_422">SAMP_422</a></code></td>
|
||||
<td class="colLast"><code>1</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_440">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_440">SAMP_440</a></code></td>
|
||||
<td class="colLast"><code>4</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_444">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_444">SAMP_444</a></code></td>
|
||||
<td class="colLast"><code>0</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJ.SAMP_GRAY">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJ.html#SAMP_GRAY">SAMP_GRAY</a></code></td>
|
||||
<td class="colLast"><code>3</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<table border="0" cellpadding="3" cellspacing="0" summary="Constant Field Values table, listing constant fields, and values">
|
||||
<caption><span>org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th scope="col">Constant Field</th>
|
||||
<th class="colLast" scope="col">Value</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.NUMOP">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#NUMOP">NUMOP</a></code></td>
|
||||
<td class="colLast"><code>8</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_HFLIP">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_HFLIP">OP_HFLIP</a></code></td>
|
||||
<td class="colLast"><code>1</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_NONE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_NONE">OP_NONE</a></code></td>
|
||||
<td class="colLast"><code>0</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT180">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT180">OP_ROT180</a></code></td>
|
||||
<td class="colLast"><code>6</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT270">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT270">OP_ROT270</a></code></td>
|
||||
<td class="colLast"><code>7</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_ROT90">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_ROT90">OP_ROT90</a></code></td>
|
||||
<td class="colLast"><code>5</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSPOSE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_TRANSPOSE">OP_TRANSPOSE</a></code></td>
|
||||
<td class="colLast"><code>3</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_TRANSVERSE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_TRANSVERSE">OP_TRANSVERSE</a></code></td>
|
||||
<td class="colLast"><code>4</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OP_VFLIP">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OP_VFLIP">OP_VFLIP</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_COPYNONE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_COPYNONE">OPT_COPYNONE</a></code></td>
|
||||
<td class="colLast"><code>64</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_CROP">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_CROP">OPT_CROP</a></code></td>
|
||||
<td class="colLast"><code>4</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_GRAY">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_GRAY">OPT_GRAY</a></code></td>
|
||||
<td class="colLast"><code>8</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_NOOUTPUT">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_NOOUTPUT">OPT_NOOUTPUT</a></code></td>
|
||||
<td class="colLast"><code>16</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_PERFECT">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PERFECT">OPT_PERFECT</a></code></td>
|
||||
<td class="colLast"><code>1</code></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_PROGRESSIVE">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_PROGRESSIVE">OPT_PROGRESSIVE</a></code></td>
|
||||
<td class="colLast"><code>32</code></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a name="org.libjpegturbo.turbojpeg.TJTransform.OPT_TRIM">
|
||||
<!-- -->
|
||||
</a><code>public static final int</code></td>
|
||||
<td><code><a href="org/libjpegturbo/turbojpeg/TJTransform.html#OPT_TRIM">OPT_TRIM</a></code></td>
|
||||
<td class="colLast"><code>2</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?constant-values.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="constant-values.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
|
||||
<li><a href="constant-values.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,178 +1,252 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Deprecated List
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Deprecated List</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Deprecated List";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?deprecated-list.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="deprecated-list.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li class="navBarCell1Rev">Deprecated</li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
|
||||
<li><a href="deprecated-list.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H2>
|
||||
<B>Deprecated API</B></H2>
|
||||
</CENTER>
|
||||
<HR SIZE="4" NOSHADE>
|
||||
<B>Contents</B><UL>
|
||||
<LI><A HREF="#method">Deprecated Methods</A>
|
||||
<LI><A HREF="#constructor">Deprecated Constructors</A>
|
||||
</UL>
|
||||
|
||||
<A NAME="method"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Deprecated Methods</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompress(byte[], int, int, int, int, int)</A>
|
||||
<BR>
|
||||
<I>Use
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)"><CODE>TJDecompressor.decompress(byte[], int, int, int, int, int, int, int)</CODE></A> instead.</I> </TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int)">org.libjpegturbo.turbojpeg.TJCompressor.setSourceImage(byte[], int, int, int, int)</A>
|
||||
<BR>
|
||||
<I>Use
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[], int, int, int, int, int, int)"><CODE>TJCompressor.setSourceImage(byte[], int, int, int, int, int, int)</CODE></A> instead.</I> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
<A NAME="constructor"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Deprecated Constructors</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int)">org.libjpegturbo.turbojpeg.TJCompressor(byte[], int, int, int, int)</A>
|
||||
<BR>
|
||||
<I>Use
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[], int, int, int, int, int, int)"><CODE>TJCompressor.TJCompressor(byte[], int, int, int, int, int, int)</CODE></A> instead.</I> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 title="Deprecated API" class="title">Deprecated API</h1>
|
||||
<h2 title="Contents">Contents</h2>
|
||||
<ul>
|
||||
<li><a href="#field">Deprecated Fields</a></li>
|
||||
<li><a href="#method">Deprecated Methods</a></li>
|
||||
<li><a href="#constructor">Deprecated Constructors</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="contentContainer"><a name="field">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table border="0" cellpadding="3" cellspacing="0" summary="Deprecated Fields table, listing deprecated fields, and an explanation">
|
||||
<caption><span>Deprecated Fields</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Field and Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCEMMX">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCEMMX</a></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE</a></td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE2">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE2</a></td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#FLAG_FORCESSE3">org.libjpegturbo.turbojpeg.TJ.FLAG_FORCESSE3</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="method">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table border="0" cellpadding="3" cellspacing="0" summary="Deprecated Methods table, listing deprecated methods, and an explanation">
|
||||
<caption><span>Deprecated Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int)">org.libjpegturbo.turbojpeg.TJ.bufSizeYUV(int, int, int)</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage,%20byte[],%20int)">org.libjpegturbo.turbojpeg.TJCompressor.compress(BufferedImage, byte[], int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(byte[],%20int)"><code>TJCompressor.compress(byte[], int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(java.awt.image.BufferedImage,%20int)">org.libjpegturbo.turbojpeg.TJCompressor.compress(BufferedImage, int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#compress(int)"><code>TJCompressor.compress(int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompress(byte[], int, int, int, int, int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJDecompressor.decompress(byte[], int, int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[],%20int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompressToYUV(byte[], int)</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>TJDecompressor.decompressToYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">org.libjpegturbo.turbojpeg.TJDecompressor.decompressToYUV(int)</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)"><code>TJDecompressor.decompressToYUV(int, int, int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage,%20byte[],%20int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(BufferedImage, byte[], int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)"><code>TJCompressor.encodeYUV(byte[], int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(java.awt.image.BufferedImage,%20int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(BufferedImage, int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(java.awt.image.BufferedImage,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(BufferedImage, int, int, int, int)</code></a> and
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>TJCompressor.encodeYUV(int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(byte[],%20int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(byte[], int)</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)"><code>TJCompressor.encodeYUV(YUVImage, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int)">org.libjpegturbo.turbojpeg.TJCompressor.encodeYUV(int)</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJCompressor.html#encodeYUV(int,%20int)"><code>TJCompressor.encodeYUV(int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[],%20int)">org.libjpegturbo.turbojpeg.TJDecompressor.setJPEGImage(byte[], int)</a>
|
||||
<div class="block"><i>Use <a href="org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)"><code>TJDecompressor.setSourceImage(byte[], int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int)">org.libjpegturbo.turbojpeg.TJCompressor.setSourceImage(byte[], int, int, int, int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#setSourceImage(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor.setSourceImage(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="constructor">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table border="0" cellpadding="3" cellspacing="0" summary="Deprecated Constructors table, listing deprecated constructors, and an explanation">
|
||||
<caption><span>Deprecated Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int)">org.libjpegturbo.turbojpeg.TJCompressor(byte[], int, int, int, int)</a>
|
||||
<div class="block"><i>Use
|
||||
<a href="org/libjpegturbo/turbojpeg/TJCompressor.html#TJCompressor(byte[],%20int,%20int,%20int,%20int,%20int,%20int)"><code>TJCompressor.TJCompressor(byte[], int, int, int, int, int, int)</code></a> instead.</i></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Deprecated</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?deprecated-list.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="deprecated-list.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li class="navBarCell1Rev">Deprecated</li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
|
||||
<li><a href="deprecated-list.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,207 +1,210 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
API Help
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>API Help</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="API Help";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?help-doc.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="help-doc.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li class="navBarCell1Rev">Help</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
|
||||
<li><a href="help-doc.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H1>
|
||||
How This API Document Is Organized</H1>
|
||||
</CENTER>
|
||||
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.<H3>
|
||||
Package</H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:<UL>
|
||||
<LI>Interfaces (italic)<LI>Classes<LI>Enums<LI>Exceptions<LI>Errors<LI>Annotation Types</UL>
|
||||
</BLOCKQUOTE>
|
||||
<H3>
|
||||
Class/Interface</H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:<UL>
|
||||
<LI>Class inheritance diagram<LI>Direct Subclasses<LI>All Known Subinterfaces<LI>All Known Implementing Classes<LI>Class/interface declaration<LI>Class/interface description
|
||||
<P>
|
||||
<LI>Nested Class Summary<LI>Field Summary<LI>Constructor Summary<LI>Method Summary
|
||||
<P>
|
||||
<LI>Field Detail<LI>Constructor Detail<LI>Method Detail</UL>
|
||||
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</BLOCKQUOTE>
|
||||
</BLOCKQUOTE>
|
||||
<H3>
|
||||
Annotation Type</H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
Each annotation type has its own separate page with the following sections:<UL>
|
||||
<LI>Annotation Type declaration<LI>Annotation Type description<LI>Required Element Summary<LI>Optional Element Summary<LI>Element Detail</UL>
|
||||
</BLOCKQUOTE>
|
||||
</BLOCKQUOTE>
|
||||
<H3>
|
||||
Enum</H3>
|
||||
<BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
Each enum has its own separate page with the following sections:<UL>
|
||||
<LI>Enum declaration<LI>Enum description<LI>Enum Constant Summary<LI>Enum Constant Detail</UL>
|
||||
</BLOCKQUOTE>
|
||||
<H3>
|
||||
Tree (Class Hierarchy)</H3>
|
||||
<BLOCKQUOTE>
|
||||
There is a <A HREF="overview-tree.html">Class Hierarchy</A> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.<UL>
|
||||
<LI>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.<LI>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</UL>
|
||||
</BLOCKQUOTE>
|
||||
<H3>
|
||||
Deprecated API</H3>
|
||||
<BLOCKQUOTE>
|
||||
The <A HREF="deprecated-list.html">Deprecated API</A> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</BLOCKQUOTE>
|
||||
<H3>
|
||||
Index</H3>
|
||||
<BLOCKQUOTE>
|
||||
The <A HREF="index-all.html">Index</A> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</BLOCKQUOTE>
|
||||
<H3>
|
||||
Prev/Next</H3>
|
||||
These links take you to the next or previous class, interface, package, or related page.<H3>
|
||||
Frames/No Frames</H3>
|
||||
These links show and hide the HTML frames. All pages are available with or without frames.
|
||||
<P>
|
||||
<H3>
|
||||
Serialized Form</H3>
|
||||
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
|
||||
<P>
|
||||
<H3>
|
||||
Constant Field Values</H3>
|
||||
The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.
|
||||
<P>
|
||||
<FONT SIZE="-1">
|
||||
<EM>
|
||||
This help file applies to API documentation generated using the standard doclet.</EM>
|
||||
</FONT>
|
||||
<BR>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 class="title">How This API Document Is Organized</h1>
|
||||
<div class="subTitle">This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.</div>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h2>Package</h2>
|
||||
<p>Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:</p>
|
||||
<ul>
|
||||
<li>Interfaces (italic)</li>
|
||||
<li>Classes</li>
|
||||
<li>Enums</li>
|
||||
<li>Exceptions</li>
|
||||
<li>Errors</li>
|
||||
<li>Annotation Types</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Class/Interface</h2>
|
||||
<p>Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:</p>
|
||||
<ul>
|
||||
<li>Class inheritance diagram</li>
|
||||
<li>Direct Subclasses</li>
|
||||
<li>All Known Subinterfaces</li>
|
||||
<li>All Known Implementing Classes</li>
|
||||
<li>Class/interface declaration</li>
|
||||
<li>Class/interface description</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Nested Class Summary</li>
|
||||
<li>Field Summary</li>
|
||||
<li>Constructor Summary</li>
|
||||
<li>Method Summary</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Field Detail</li>
|
||||
<li>Constructor Detail</li>
|
||||
<li>Method Detail</li>
|
||||
</ul>
|
||||
<p>Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Annotation Type</h2>
|
||||
<p>Each annotation type has its own separate page with the following sections:</p>
|
||||
<ul>
|
||||
<li>Annotation Type declaration</li>
|
||||
<li>Annotation Type description</li>
|
||||
<li>Required Element Summary</li>
|
||||
<li>Optional Element Summary</li>
|
||||
<li>Element Detail</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Enum</h2>
|
||||
<p>Each enum has its own separate page with the following sections:</p>
|
||||
<ul>
|
||||
<li>Enum declaration</li>
|
||||
<li>Enum description</li>
|
||||
<li>Enum Constant Summary</li>
|
||||
<li>Enum Constant Detail</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Tree (Class Hierarchy)</h2>
|
||||
<p>There is a <a href="overview-tree.html">Class Hierarchy</a> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.</p>
|
||||
<ul>
|
||||
<li>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.</li>
|
||||
<li>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Deprecated API</h2>
|
||||
<p>The <a href="deprecated-list.html">Deprecated API</a> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Index</h2>
|
||||
<p>The <a href="index-all.html">Index</a> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Prev/Next</h2>
|
||||
<p>These links take you to the next or previous class, interface, package, or related page.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Frames/No Frames</h2>
|
||||
<p>These links show and hide the HTML frames. All pages are available with or without frames.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>All Classes</h2>
|
||||
<p>The <a href="allclasses-noframe.html">All Classes</a> link shows all classes and interfaces except non-static nested types.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Serialized Form</h2>
|
||||
<p>Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>Constant Field Values</h2>
|
||||
<p>The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<em>This help file applies to API documentation generated using the standard doclet.</em></div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Help</B></FONT> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?help-doc.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="help-doc.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li class="navBarCell1Rev">Help</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
|
||||
<li><a href="help-doc.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,17 +1,22 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Generated Documentation (Untitled)
|
||||
</TITLE>
|
||||
<SCRIPT type="text/javascript">
|
||||
targetPage = "" + window.location.search;
|
||||
if (targetPage != "" && targetPage != "undefined")
|
||||
targetPage = targetPage.substring(1);
|
||||
if (targetPage.indexOf(":") != -1 || (targetPage != "" && !validURL(targetPage)))
|
||||
targetPage = "undefined";
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Generated Documentation (Untitled)</title>
|
||||
<script type="text/javascript">
|
||||
tmpTargetPage = "" + window.location.search;
|
||||
if (tmpTargetPage != "" && tmpTargetPage != "undefined")
|
||||
tmpTargetPage = tmpTargetPage.substring(1);
|
||||
if (tmpTargetPage.indexOf(":") != -1 || (tmpTargetPage != "" && !validURL(tmpTargetPage)))
|
||||
tmpTargetPage = "undefined";
|
||||
targetPage = tmpTargetPage;
|
||||
function validURL(url) {
|
||||
try {
|
||||
url = decodeURIComponent(url);
|
||||
}
|
||||
catch (error) {
|
||||
return false;
|
||||
}
|
||||
var pos = url.indexOf(".html");
|
||||
if (pos == -1 || pos != url.length - 5)
|
||||
return false;
|
||||
@@ -23,7 +28,8 @@ Generated Documentation (Untitled)
|
||||
if ('a' <= ch && ch <= 'z' ||
|
||||
'A' <= ch && ch <= 'Z' ||
|
||||
ch == '$' ||
|
||||
ch == '_') {
|
||||
ch == '_' ||
|
||||
ch.charCodeAt(0) > 127) {
|
||||
allowNumber = true;
|
||||
allowSep = true;
|
||||
} else if ('0' <= ch && ch <= '9'
|
||||
@@ -49,21 +55,17 @@ Generated Documentation (Untitled)
|
||||
if (targetPage != "" && targetPage != "undefined")
|
||||
top.classFrame.location = top.targetPage;
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
</HEAD>
|
||||
<FRAMESET cols="20%,80%" title="" onLoad="top.loadFrames()">
|
||||
<FRAME src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)">
|
||||
<FRAME src="org/libjpegturbo/turbojpeg/package-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes">
|
||||
<NOFRAMES>
|
||||
<H2>
|
||||
Frame Alert</H2>
|
||||
|
||||
<P>
|
||||
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
|
||||
<BR>
|
||||
Link to<A HREF="org/libjpegturbo/turbojpeg/package-summary.html">Non-frame version.</A>
|
||||
</NOFRAMES>
|
||||
</FRAMESET>
|
||||
</HTML>
|
||||
</script>
|
||||
</head>
|
||||
<frameset cols="20%,80%" title="Documentation frame" onload="top.loadFrames()">
|
||||
<frame src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)">
|
||||
<frame src="org/libjpegturbo/turbojpeg/package-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes">
|
||||
<noframes>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<h2>Frame Alert</h2>
|
||||
<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="org/libjpegturbo/turbojpeg/package-summary.html">Non-frame version</a>.</p>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,238 +1,241 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
TJCustomFilter
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TJCustomFilter</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="TJCustomFilter";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TJCustomFilter.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJCustomFilter.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>
|
||||
<FONT SIZE="-1">
|
||||
org.libjpegturbo.turbojpeg</FONT>
|
||||
<BR>
|
||||
Interface TJCustomFilter</H2>
|
||||
<HR>
|
||||
<DL>
|
||||
<DT><PRE>public interface <B>TJCustomFilter</B></DL>
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
Custom filter callback interface
|
||||
<P>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
|
||||
<div class="header">
|
||||
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||
<h2 title="Interface TJCustomFilter" class="title">Interface TJCustomFilter</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public interface <span class="strong">TJCustomFilter</span></pre>
|
||||
<div class="block">Custom filter callback interface</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> void</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html#customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)">customFilter</A></B>(java.nio.ShortBuffer coeffBuffer,
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html#customFilter(java.nio.ShortBuffer,%20java.awt.Rectangle,%20java.awt.Rectangle,%20int,%20int,%20org.libjpegturbo.turbojpeg.TJTransform)">customFilter</a></strong>(java.nio.ShortBuffer coeffBuffer,
|
||||
java.awt.Rectangle bufferRegion,
|
||||
java.awt.Rectangle planeRegion,
|
||||
int componentID,
|
||||
int transformID,
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A> transform)</CODE>
|
||||
|
||||
<BR>
|
||||
A callback function that can be used to modify the DCT coefficients after
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)</code>
|
||||
<div class="block">A callback function that can be used to modify the DCT coefficients after
|
||||
they are losslessly transformed but before they are transcoded to a new
|
||||
JPEG image.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
JPEG image.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)"><!-- --></A><H3>
|
||||
customFilter</H3>
|
||||
<PRE>
|
||||
void <B>customFilter</B>(java.nio.ShortBuffer coeffBuffer,
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="customFilter(java.nio.ShortBuffer, java.awt.Rectangle, java.awt.Rectangle, int, int, org.libjpegturbo.turbojpeg.TJTransform)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>customFilter</h4>
|
||||
<pre>void customFilter(java.nio.ShortBuffer coeffBuffer,
|
||||
java.awt.Rectangle bufferRegion,
|
||||
java.awt.Rectangle planeRegion,
|
||||
int componentID,
|
||||
int transformID,
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A> transform)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>A callback function that can be used to modify the DCT coefficients after
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a> transform)
|
||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||
<div class="block">A callback function that can be used to modify the DCT coefficients after
|
||||
they are losslessly transformed but before they are transcoded to a new
|
||||
JPEG image. This allows for custom filters or other transformations to be
|
||||
applied in the frequency domain.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>coeffBuffer</CODE> - a buffer containing transformed DCT coefficients.
|
||||
applied in the frequency domain.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>coeffBuffer</code> - a buffer containing transformed DCT coefficients.
|
||||
(NOTE: this buffer is not guaranteed to be valid once the callback
|
||||
returns, so applications wishing to hand off the DCT coefficients to
|
||||
another function or library should make a copy of them within the body of
|
||||
the callback.)<DD><CODE>bufferRegion</CODE> - rectangle containing the width and height of
|
||||
the callback.)</dd><dd><code>bufferRegion</code> - rectangle containing the width and height of
|
||||
<code>coeffBuffer</code> as well as its offset relative to the component
|
||||
plane. TurboJPEG implementations may choose to split each component plane
|
||||
into multiple DCT coefficient buffers and call the callback function once
|
||||
for each buffer.<DD><CODE>planeRegion</CODE> - rectangle containing the width and height of the
|
||||
component plane to which <code>coeffBuffer</code> belongs<DD><CODE>componentID</CODE> - ID number of the component plane to which
|
||||
for each buffer.</dd><dd><code>planeRegion</code> - rectangle containing the width and height of the
|
||||
component plane to which <code>coeffBuffer</code> belongs</dd><dd><code>componentID</code> - ID number of the component plane to which
|
||||
<code>coeffBuffer</code> belongs (Y, Cb, and Cr have, respectively, ID's
|
||||
of 0, 1, and 2 in typical JPEG images.)<DD><CODE>transformID</CODE> - ID number of the transformed image to which
|
||||
of 0, 1, and 2 in typical JPEG images.)</dd><dd><code>transformID</code> - ID number of the transformed image to which
|
||||
<code>coeffBuffer</code> belongs. This is the same as the index of the
|
||||
transform in the <code>transforms</code> array that was passed to <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><CODE>TJTransformer.transform()</CODE></A>.<DD><CODE>transform</CODE> - a <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJTransform</CODE></A> instance that specifies the
|
||||
parameters and/or cropping region for this transform
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DD>
|
||||
</DL>
|
||||
transform in the <code>transforms</code> array that was passed to <a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)"><code>TJTransformer.transform()</code></a>.</dd><dd><code>transform</code> - a <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instance that specifies the
|
||||
parameters and/or cropping region for this transform</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<HR>
|
||||
|
||||
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TJCustomFilter.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJCustomFilter.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJCustomFilter.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li>Constr | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
340
java/doc/org/libjpegturbo/turbojpeg/TJException.html
Normal file
340
java/doc/org/libjpegturbo/turbojpeg/TJException.html
Normal file
@@ -0,0 +1,340 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TJException</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="TJException";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJException.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJException.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||
<h2 title="Class TJException" class="title">Class TJException</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Throwable</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Exception</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>java.io.IOException</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>org.libjpegturbo.turbojpeg.TJException</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd>java.io.Serializable</dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="strong">TJException</span>
|
||||
extends java.io.IOException</pre>
|
||||
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../serialized-form.html#org.libjpegturbo.turbojpeg.TJException">Serialized Form</a></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException()">TJException</a></strong>()</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.String)">TJException</a></strong>(java.lang.String message)</code> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.String,%20int)">TJException</a></strong>(java.lang.String message,
|
||||
int code)</code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.String,%20java.lang.Throwable)">TJException</a></strong>(java.lang.String message,
|
||||
java.lang.Throwable cause)</code> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#TJException(java.lang.Throwable)">TJException</a></strong>(java.lang.Throwable cause)</code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJException.html#getErrorCode()">getErrorCode</a></strong>()</code>
|
||||
<div class="block">Returns a code (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.ERR_*</code></a>) indicating the severity of the
|
||||
last error.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Throwable">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Throwable</h3>
|
||||
<code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="TJException()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>TJException</h4>
|
||||
<pre>public TJException()</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="TJException(java.lang.String, java.lang.Throwable)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>TJException</h4>
|
||||
<pre>public TJException(java.lang.String message,
|
||||
java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="TJException(java.lang.String)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>TJException</h4>
|
||||
<pre>public TJException(java.lang.String message)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="TJException(java.lang.String, int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>TJException</h4>
|
||||
<pre>public TJException(java.lang.String message,
|
||||
int code)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="TJException(java.lang.Throwable)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>TJException</h4>
|
||||
<pre>public TJException(java.lang.Throwable cause)</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="getErrorCode()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>getErrorCode</h4>
|
||||
<pre>public int getErrorCode()</pre>
|
||||
<div class="block">Returns a code (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.ERR_*</code></a>) indicating the severity of the
|
||||
last error.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>a code (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><code>TJ.ERR_*</code></a>) indicating the severity of the
|
||||
last error.</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJException.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJException.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,356 +1,343 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
TJScalingFactor
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TJScalingFactor</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="TJScalingFactor";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJScalingFactor.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TJScalingFactor.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJScalingFactor.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJScalingFactor.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>
|
||||
<FONT SIZE="-1">
|
||||
org.libjpegturbo.turbojpeg</FONT>
|
||||
<BR>
|
||||
Class TJScalingFactor</H2>
|
||||
<PRE>
|
||||
java.lang.Object
|
||||
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.libjpegturbo.turbojpeg.TJScalingFactor</B>
|
||||
</PRE>
|
||||
<HR>
|
||||
<DL>
|
||||
<DT><PRE>public class <B>TJScalingFactor</B><DT>extends java.lang.Object</DL>
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
Fractional scaling factor
|
||||
<P>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
|
||||
<div class="header">
|
||||
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||
<h2 title="Class TJScalingFactor" class="title">Class TJScalingFactor</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>org.libjpegturbo.turbojpeg.TJScalingFactor</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="strong">TJScalingFactor</span>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">Fractional scaling factor</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#TJScalingFactor(int, int)">TJScalingFactor</A></B>(int num,
|
||||
int denom)</CODE>
|
||||
|
||||
<BR>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#TJScalingFactor(int,%20int)">TJScalingFactor</a></strong>(int num,
|
||||
int denom)</code>
|
||||
<div class="block">Create a TurboJPEG scaling factor instance.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> boolean</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">equals</A></B>(<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A> other)</CODE>
|
||||
|
||||
<BR>
|
||||
Returns true or false, depending on whether this instance and
|
||||
<code>other</code> have the same numerator and denominator.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> int</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getDenom()">getDenom</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns denominator</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> int</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getNum()">getNum</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns numerator</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> int</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)">getScaled</A></B>(int dimension)</CODE>
|
||||
|
||||
<BR>
|
||||
Returns the scaled value of <code>dimension</code>.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> boolean</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#isOne()">isOne</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns true or false, depending on whether this instance is equal to
|
||||
1/1.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>boolean</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">equals</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a> other)</code>
|
||||
<div class="block">Returns true or false, depending on whether this instance and
|
||||
<code>other</code> have the same numerator and denominator.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getDenom()">getDenom</a></strong>()</code>
|
||||
<div class="block">Returns denominator</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getNum()">getNum</a></strong>()</code>
|
||||
<div class="block">Returns numerator</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#getScaled(int)">getScaled</a></strong>(int dimension)</code>
|
||||
<div class="block">Returns the scaled value of <code>dimension</code>.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>boolean</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html#isOne()">isOne</a></strong>()</code>
|
||||
<div class="block">Returns true or false, depending on whether this instance is equal to
|
||||
1/1.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
||||
<B>Constructor Detail</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="TJScalingFactor(int, int)"><!-- --></A><H3>
|
||||
TJScalingFactor</H3>
|
||||
<PRE>
|
||||
public <B>TJScalingFactor</B>(int num,
|
||||
int denom)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DL>
|
||||
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DL>
|
||||
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="TJScalingFactor(int, int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>TJScalingFactor</h4>
|
||||
<pre>public TJScalingFactor(int num,
|
||||
int denom)</pre>
|
||||
<div class="block">Create a TurboJPEG scaling factor instance.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>num</code> - numerator</dd><dd><code>denom</code> - denominator</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="getNum()"><!-- --></A><H3>
|
||||
getNum</H3>
|
||||
<PRE>
|
||||
public int <B>getNum</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Returns numerator
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>numerator</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getDenom()"><!-- --></A><H3>
|
||||
getDenom</H3>
|
||||
<PRE>
|
||||
public int <B>getDenom</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Returns denominator
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>denominator</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getScaled(int)"><!-- --></A><H3>
|
||||
getScaled</H3>
|
||||
<PRE>
|
||||
public int <B>getScaled</B>(int dimension)</PRE>
|
||||
<DL>
|
||||
<DD>Returns the scaled value of <code>dimension</code>. This function
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="getNum()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getNum</h4>
|
||||
<pre>public int getNum()</pre>
|
||||
<div class="block">Returns numerator</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>numerator</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getDenom()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getDenom</h4>
|
||||
<pre>public int getDenom()</pre>
|
||||
<div class="block">Returns denominator</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>denominator</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getScaled(int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getScaled</h4>
|
||||
<pre>public int getScaled(int dimension)</pre>
|
||||
<div class="block">Returns the scaled value of <code>dimension</code>. This function
|
||||
performs the integer equivalent of
|
||||
<code>ceil(dimension * scalingFactor)</code>.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>the scaled value of <code>dimension</code></DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="equals(org.libjpegturbo.turbojpeg.TJScalingFactor)"><!-- --></A><H3>
|
||||
equals</H3>
|
||||
<PRE>
|
||||
public boolean <B>equals</B>(<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A> other)</PRE>
|
||||
<DL>
|
||||
<DD>Returns true or false, depending on whether this instance and
|
||||
<code>other</code> have the same numerator and denominator.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>true or false, depending on whether this instance and
|
||||
<code>other</code> have the same numerator and denominator</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="isOne()"><!-- --></A><H3>
|
||||
isOne</H3>
|
||||
<PRE>
|
||||
public boolean <B>isOne</B>()</PRE>
|
||||
<DL>
|
||||
<DD>Returns true or false, depending on whether this instance is equal to
|
||||
1/1.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>true or false, depending on whether this instance is equal to
|
||||
1/1</DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<code>ceil(dimension * scalingFactor)</code>.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dimension</code> - width or height to multiply by this scaling factor</dd>
|
||||
<dt><span class="strong">Returns:</span></dt><dd>the scaled value of <code>dimension</code>.</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="equals(org.libjpegturbo.turbojpeg.TJScalingFactor)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>equals</h4>
|
||||
<pre>public boolean equals(<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a> other)</pre>
|
||||
<div class="block">Returns true or false, depending on whether this instance and
|
||||
<code>other</code> have the same numerator and denominator.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>other</code> - the scaling factor against which to compare this one</dd>
|
||||
<dt><span class="strong">Returns:</span></dt><dd>true or false, depending on whether this instance and
|
||||
<code>other</code> have the same numerator and denominator.</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="isOne()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>isOne</h4>
|
||||
<pre>public boolean isOne()</pre>
|
||||
<div class="block">Returns true or false, depending on whether this instance is equal to
|
||||
1/1.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>true or false, depending on whether this instance is equal to
|
||||
1/1.</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<HR>
|
||||
|
||||
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>NEXT CLASS</B></A></FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJScalingFactor.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TJScalingFactor.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJScalingFactor.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJScalingFactor.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,301 +1,299 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
TJTransformer
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>TJTransformer</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="TJTransformer";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
||||
NEXT CLASS</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TJTransformer.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJTransformer.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">Field</a> | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<H2>
|
||||
<FONT SIZE="-1">
|
||||
org.libjpegturbo.turbojpeg</FONT>
|
||||
<BR>
|
||||
Class TJTransformer</H2>
|
||||
<PRE>
|
||||
java.lang.Object
|
||||
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJDecompressor</A>
|
||||
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>org.libjpegturbo.turbojpeg.TJTransformer</B>
|
||||
</PRE>
|
||||
<HR>
|
||||
<DL>
|
||||
<DT><PRE>public class <B>TJTransformer</B><DT>extends <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></DL>
|
||||
</PRE>
|
||||
|
||||
<P>
|
||||
TurboJPEG lossless transformer
|
||||
<P>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
<div class="header">
|
||||
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||
<h2 title="Class TJTransformer" class="title">Class TJTransformer</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJDecompressor</a></li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>org.libjpegturbo.turbojpeg.TJTransformer</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<dl>
|
||||
<dt>All Implemented Interfaces:</dt>
|
||||
<dd>java.io.Closeable, java.lang.AutoCloseable</dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="strong">TJTransformer</span>
|
||||
extends <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></pre>
|
||||
<div class="block">TurboJPEG lossless transformer</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
|
||||
<A NAME="field_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Field Summary</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left"><B>Fields inherited from class org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></B></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#handle">handle</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBuf">jpegBuf</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegHeight">jpegHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegSubsamp">jpegSubsamp</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegWidth">jpegWidth</A></CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="field_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Field Summary</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Fields inherited from class org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></h3>
|
||||
<code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#handle">handle</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBuf">jpegBuf</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegBufSize">jpegBufSize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegColorspace">jpegColorspace</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegHeight">jpegHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegSubsamp">jpegSubsamp</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#jpegWidth">jpegWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#yuvImage">yuvImage</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
|
||||
<A NAME="constructor_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Constructor Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer()">TJTransformer</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Create a TurboJPEG lossless transformer instance.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[])">TJTransformer</A></B>(byte[] jpegImage)</CODE>
|
||||
|
||||
<BR>
|
||||
Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
image stored in <code>jpegImage</code> with the newly created instance.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[], int)">TJTransformer</A></B>(byte[] jpegImage,
|
||||
int imageSize)</CODE>
|
||||
|
||||
<BR>
|
||||
Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer()">TJTransformer</a></strong>()</code>
|
||||
<div class="block">Create a TurboJPEG lossless transformer instance.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[])">TJTransformer</a></strong>(byte[] jpegImage)</code>
|
||||
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#TJTransformer(byte[],%20int)">TJTransformer</a></strong>(byte[] jpegImage,
|
||||
int imageSize)</code>
|
||||
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
image of length <code>imageSize</code> bytes stored in
|
||||
<code>jpegImage</code> with the newly created instance.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<code>jpegImage</code> with the newly created instance.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
|
||||
<A NAME="method_summary"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Method Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> int[]</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes</A></B>()</CODE>
|
||||
|
||||
<BR>
|
||||
Returns an array containing the sizes of the transformed JPEG images
|
||||
generated by the most recent transform operation.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> void</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)">transform</A></B>(byte[][] dstBufs,
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>[] transforms,
|
||||
int flags)</CODE>
|
||||
|
||||
<BR>
|
||||
Losslessly transform the JPEG image associated with this transformer
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>int[]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#getTransformedSizes()">getTransformedSizes</a></strong>()</code>
|
||||
<div class="block">Returns an array containing the sizes of the transformed JPEG images
|
||||
generated by the most recent transform operation.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(byte[][],%20org.libjpegturbo.turbojpeg.TJTransform[],%20int)">transform</a></strong>(byte[][] dstBufs,
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||
int flags)</code>
|
||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||
instance into one or more JPEG images stored in the given destination
|
||||
buffers.</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
||||
<CODE> <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>[]</CODE></FONT></TD>
|
||||
<TD><CODE><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(org.libjpegturbo.turbojpeg.TJTransform[], int)">transform</A></B>(<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>[] transforms,
|
||||
int flags)</CODE>
|
||||
|
||||
<BR>
|
||||
Losslessly transform the JPEG image associated with this transformer
|
||||
instance and return an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJDecompressor</CODE></A> instances, each of
|
||||
which has a transformed JPEG image associated with it.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left"><B>Methods inherited from class org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></B></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#close()">close</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[], int, int, int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[], int, int, int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int, int, int, int, int)">decompress</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[], int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int, int)">getScaledHeight</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int, int)">getScaledWidth</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</A>, <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[], int)">setJPEGImage</A></CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
|
||||
buffers.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html#transform(org.libjpegturbo.turbojpeg.TJTransform[],%20int)">transform</a></strong>(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||
int flags)</code>
|
||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||
instance and return an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
||||
which has a transformed JPEG image associated with it.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></h3>
|
||||
<code><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#close()">close</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(java.awt.image.BufferedImage,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(byte[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int[],%20int,%20int,%20int,%20int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompress(int,%20int,%20int,%20int,%20int)">decompress</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(byte[],%20int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int[],%20int,%20int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(int,%20int,%20int,%20int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#decompressToYUV(org.libjpegturbo.turbojpeg.YUVImage,%20int)">decompressToYUV</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#finalize()">finalize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getColorspace()">getColorspace</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getHeight()">getHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGBuf()">getJPEGBuf</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getJPEGSize()">getJPEGSize</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledHeight(int,%20int)">getScaledHeight</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getScaledWidth(int,%20int)">getScaledWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getSubsamp()">getSubsamp</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#getWidth()">getWidth</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setJPEGImage(byte[],%20int)">setJPEGImage</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(byte[],%20int)">setSourceImage</a>, <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html#setSourceImage(org.libjpegturbo.turbojpeg.YUVImage)">setSourceImage</a></code></li>
|
||||
</ul>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
|
||||
<A NAME="constructor_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
||||
<B>Constructor Detail</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="TJTransformer()"><!-- --></A><H3>
|
||||
TJTransformer</H3>
|
||||
<PRE>
|
||||
public <B>TJTransformer</B>()
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Create a TurboJPEG lossless transformer instance.
|
||||
<P>
|
||||
<DL>
|
||||
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="TJTransformer(byte[])"><!-- --></A><H3>
|
||||
TJTransformer</H3>
|
||||
<PRE>
|
||||
public <B>TJTransformer</B>(byte[] jpegImage)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
image stored in <code>jpegImage</code> with the newly created instance.
|
||||
<P>
|
||||
<DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer (size of the JPEG image is assumed to
|
||||
be the length of the array)
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="TJTransformer(byte[], int)"><!-- --></A><H3>
|
||||
TJTransformer</H3>
|
||||
<PRE>
|
||||
public <B>TJTransformer</B>(byte[] jpegImage,
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="TJTransformer()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>TJTransformer</h4>
|
||||
<pre>public TJTransformer()
|
||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||
<div class="block">Create a TurboJPEG lossless transformer instance.</div>
|
||||
<dl><dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="TJTransformer(byte[])">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>TJTransformer</h4>
|
||||
<pre>public TJTransformer(byte[] jpegImage)
|
||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
image stored in <code>jpegImage</code> with the newly created instance.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer (size of the JPEG image is assumed to
|
||||
be the length of the array.) This buffer is not modified.</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="TJTransformer(byte[], int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>TJTransformer</h4>
|
||||
<pre>public TJTransformer(byte[] jpegImage,
|
||||
int imageSize)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||
<div class="block">Create a TurboJPEG lossless transformer instance and associate the JPEG
|
||||
image of length <code>imageSize</code> bytes stored in
|
||||
<code>jpegImage</code> with the newly created instance.
|
||||
<P>
|
||||
<DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>jpegImage</CODE> - JPEG image buffer<DD><CODE>imageSize</CODE> - size of the JPEG image (in bytes)
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DL>
|
||||
|
||||
<code>jpegImage</code> with the newly created instance.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>jpegImage</code> - JPEG image buffer. This buffer is not modified.</dd><dd><code>imageSize</code> - size of the JPEG image (in bytes)</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
|
||||
<A NAME="method_detail"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
||||
<B>Method Detail</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<A NAME="transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)"><!-- --></A><H3>
|
||||
transform</H3>
|
||||
<PRE>
|
||||
public void <B>transform</B>(byte[][] dstBufs,
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>[] transforms,
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="transform(byte[][], org.libjpegturbo.turbojpeg.TJTransform[], int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>transform</h4>
|
||||
<pre>public void transform(byte[][] dstBufs,
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||
int flags)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Losslessly transform the JPEG image associated with this transformer
|
||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||
instance into one or more JPEG images stored in the given destination
|
||||
buffers. Lossless transforms work by moving the raw coefficients from one
|
||||
JPEG image structure to another without altering the values of the
|
||||
@@ -306,123 +304,118 @@ public void <B>transform</B>(byte[][] dstBufs,
|
||||
size of the destination image. Thus, this method provides a means of
|
||||
generating multiple transformed images from the same source or of applying
|
||||
multiple transformations simultaneously, in order to eliminate the need to
|
||||
read the source coefficients multiple times.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>dstBufs</CODE> - an array of image buffers. <code>dstbufs[i]</code> will
|
||||
read the source coefficients multiple times.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstBufs</code> - an array of image buffers. <code>dstbufs[i]</code> will
|
||||
receive a JPEG image that has been transformed using the parameters in
|
||||
<code>transforms[i]</code>. Use <A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int, int, int)"><CODE>TJ.bufSize(int, int, int)</CODE></A> to determine the
|
||||
<code>transforms[i]</code>. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSize(int,%20int,%20int)"><code>TJ.bufSize(int, int, int)</code></a> to determine the
|
||||
maximum size for each buffer based on the transformed or cropped width and
|
||||
height and the level of subsampling used in the source image.<DD><CODE>transforms</CODE> - an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJTransform</CODE></A> instances, each of
|
||||
height and the level of subsampling used in the source image.</dd><dd><code>transforms</code> - an array of <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instances, each of
|
||||
which specifies the transform parameters and/or cropping region for the
|
||||
corresponding transformed output image<DD><CODE>flags</CODE> - the bitwise OR of one or more of
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A>
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="transform(org.libjpegturbo.turbojpeg.TJTransform[], int)"><!-- --></A><H3>
|
||||
transform</H3>
|
||||
<PRE>
|
||||
public <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A>[] <B>transform</B>(<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A>[] transforms,
|
||||
corresponding transformed output image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="transform(org.libjpegturbo.turbojpeg.TJTransform[], int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>transform</h4>
|
||||
<pre>public <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a>[] transform(<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a>[] transforms,
|
||||
int flags)
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Losslessly transform the JPEG image associated with this transformer
|
||||
instance and return an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJDecompressor</CODE></A> instances, each of
|
||||
which has a transformed JPEG image associated with it.
|
||||
<P>
|
||||
<DD><DL>
|
||||
<DT><B>Parameters:</B><DD><CODE>transforms</CODE> - an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJTransform</CODE></A> instances, each of
|
||||
throws <a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></pre>
|
||||
<div class="block">Losslessly transform the JPEG image associated with this transformer
|
||||
instance and return an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
||||
which has a transformed JPEG image associated with it.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>transforms</code> - an array of <a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><code>TJTransform</code></a> instances, each of
|
||||
which specifies the transform parameters and/or cropping region for the
|
||||
corresponding transformed output image<DD><CODE>flags</CODE> - the bitwise OR of one or more of
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><CODE>TJ.FLAG_*</CODE></A>
|
||||
<DT><B>Returns:</B><DD>an array of <A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><CODE>TJDecompressor</CODE></A> instances, each of
|
||||
which has a transformed JPEG image associated with it
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DD>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
<A NAME="getTransformedSizes()"><!-- --></A><H3>
|
||||
getTransformedSizes</H3>
|
||||
<PRE>
|
||||
public int[] <B>getTransformedSizes</B>()
|
||||
throws java.lang.Exception</PRE>
|
||||
<DL>
|
||||
<DD>Returns an array containing the sizes of the transformed JPEG images
|
||||
generated by the most recent transform operation.
|
||||
<P>
|
||||
<DD><DL>
|
||||
|
||||
<DT><B>Returns:</B><DD>an array containing the sizes of the transformed JPEG images
|
||||
generated by the most recent transform operation
|
||||
<DT><B>Throws:</B>
|
||||
<DD><CODE>java.lang.Exception</CODE></DL>
|
||||
</DD>
|
||||
</DL>
|
||||
corresponding transformed output image</dd><dd><code>flags</code> - the bitwise OR of one or more of
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#FLAG_BOTTOMUP"><code>TJ.FLAG_*</code></a></dd>
|
||||
<dt><span class="strong">Returns:</span></dt><dd>an array of <a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><code>TJDecompressor</code></a> instances, each of
|
||||
which has a transformed JPEG image associated with it.</dd>
|
||||
<dt><span class="strong">Throws:</span></dt>
|
||||
<dd><code><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></code></dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getTransformedSizes()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>getTransformedSizes</h4>
|
||||
<pre>public int[] getTransformedSizes()</pre>
|
||||
<div class="block">Returns an array containing the sizes of the transformed JPEG images
|
||||
generated by the most recent transform operation.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>an array containing the sizes of the transformed JPEG images
|
||||
generated by the most recent transform operation.</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<HR>
|
||||
|
||||
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>PREV CLASS</B></A>
|
||||
NEXT CLASS</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="TJTransformer.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Next Class</span></a></li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/TJTransformer.html" target="_top">Frames</a></li>
|
||||
<li><a href="TJTransformer.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
||||
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
||||
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#fields_inherited_from_class_org.libjpegturbo.turbojpeg.TJDecompressor">Field</a> | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li>Field | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
765
java/doc/org/libjpegturbo/turbojpeg/YUVImage.html
Normal file
765
java/doc/org/libjpegturbo/turbojpeg/YUVImage.html
Normal file
@@ -0,0 +1,765 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>YUVImage</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="YUVImage";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li>Next Class</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/YUVImage.html" target="_top">Frames</a></li>
|
||||
<li><a href="YUVImage.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field_summary">Field</a> | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field_detail">Field</a> | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<div class="subTitle">org.libjpegturbo.turbojpeg</div>
|
||||
<h2 title="Class YUVImage" class="title">Class YUVImage</h2>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="inheritance">
|
||||
<li>java.lang.Object</li>
|
||||
<li>
|
||||
<ul class="inheritance">
|
||||
<li>org.libjpegturbo.turbojpeg.YUVImage</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="description">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<hr>
|
||||
<br>
|
||||
<pre>public class <span class="strong">YUVImage</span>
|
||||
extends java.lang.Object</pre>
|
||||
<div class="block">This class encapsulates a YUV planar image and the metadata
|
||||
associated with it. The TurboJPEG API allows both the JPEG compression and
|
||||
decompression pipelines to be split into stages: YUV encode, compress from
|
||||
YUV, decompress to YUV, and YUV decode. A <code>YUVImage</code> instance
|
||||
serves as the destination image for YUV encode and decompress-to-YUV
|
||||
operations and as the source image for compress-from-YUV and YUV decode
|
||||
operations.
|
||||
<p>
|
||||
Technically, the JPEG format uses the YCbCr colorspace (which technically is
|
||||
not a "colorspace" but rather a "color transform"), but per the convention
|
||||
of the digital video community, the TurboJPEG API uses "YUV" to refer to an
|
||||
image format consisting of Y, Cb, and Cr image planes.
|
||||
<p>
|
||||
Each plane is simply a 2D array of bytes, each byte representing the value
|
||||
of one of the components (Y, Cb, or Cr) at a particular location in the
|
||||
image. The width and height of each plane are determined by the image
|
||||
width, height, and level of chrominance subsampling. The luminance plane
|
||||
width is the image width padded to the nearest multiple of the horizontal
|
||||
subsampling factor (2 in the case of 4:2:0 and 4:2:2, 4 in the case of
|
||||
4:1:1, 1 in the case of 4:4:4 or grayscale.) Similarly, the luminance plane
|
||||
height is the image height padded to the nearest multiple of the vertical
|
||||
subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4
|
||||
or grayscale.) The chrominance plane width is equal to the luminance plane
|
||||
width divided by the horizontal subsampling factor, and the chrominance
|
||||
plane height is equal to the luminance plane height divided by the vertical
|
||||
subsampling factor.
|
||||
<p>
|
||||
For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is
|
||||
used, then the luminance plane would be 36 x 35 bytes, and each of the
|
||||
chrominance planes would be 18 x 35 bytes. If you specify a line padding of
|
||||
4 bytes on top of this, then the luminance plane would be 36 x 35 bytes, and
|
||||
each of the chrominance planes would be 20 x 35 bytes.</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="summary">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- =========== FIELD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="field_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Field Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
||||
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Field and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>protected long</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#handle">handle</a></strong></code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>protected int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvHeight">yuvHeight</a></strong></code> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>protected int[]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvOffsets">yuvOffsets</a></strong></code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>protected int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvPad">yuvPad</a></strong></code> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>protected byte[][]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvPlanes">yuvPlanes</a></strong></code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>protected int[]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvStrides">yuvStrides</a></strong></code> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>protected int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvSubsamp">yuvSubsamp</a></strong></code> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>protected int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#yuvWidth">yuvWidth</a></strong></code> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
||||
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colOne" scope="col">Constructor and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[][],%20int[],%20int,%20int[],%20int,%20int)">YUVImage</a></strong>(byte[][] planes,
|
||||
int[] offsets,
|
||||
int width,
|
||||
int[] strides,
|
||||
int height,
|
||||
int subsamp)</code>
|
||||
<div class="block">Create a new <code>YUVImage</code> instance from a set of existing image
|
||||
planes.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(byte[],%20int,%20int,%20int,%20int)">YUVImage</a></strong>(byte[] yuvImage,
|
||||
int width,
|
||||
int pad,
|
||||
int height,
|
||||
int subsamp)</code>
|
||||
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image
|
||||
buffer.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int,%20int[],%20int,%20int)">YUVImage</a></strong>(int width,
|
||||
int[] strides,
|
||||
int height,
|
||||
int subsamp)</code>
|
||||
<div class="block">Create a new <code>YUVImage</code> instance backed by separate image
|
||||
planes, and allocate memory for the image planes.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colOne"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#YUVImage(int,%20int,%20int,%20int)">YUVImage</a></strong>(int width,
|
||||
int pad,
|
||||
int height,
|
||||
int subsamp)</code>
|
||||
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image
|
||||
buffer, and allocate memory for the image buffer.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_summary">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Summary</h3>
|
||||
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
||||
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Modifier and Type</th>
|
||||
<th class="colLast" scope="col">Method and Description</th>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>byte[]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getBuf()">getBuf</a></strong>()</code>
|
||||
<div class="block">Returns the YUV image buffer (if this image is stored in a unified
|
||||
buffer rather than separate image planes.)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getHeight()">getHeight</a></strong>()</code>
|
||||
<div class="block">Returns the height of the YUV image (or subregion.)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>int[]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getOffsets()">getOffsets</a></strong>()</code>
|
||||
<div class="block">Returns the offsets (in bytes) of each plane within the planes of a larger
|
||||
YUV image.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getPad()">getPad</a></strong>()</code>
|
||||
<div class="block">Returns the line padding used in the YUV image buffer (if this image is
|
||||
stored in a unified buffer rather than separate image planes.)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>byte[][]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getPlanes()">getPlanes</a></strong>()</code>
|
||||
<div class="block">Returns the YUV image planes.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getSize()">getSize</a></strong>()</code>
|
||||
<div class="block">Returns the size (in bytes) of the YUV image buffer (if this image is
|
||||
stored in a unified buffer rather than separate image planes.)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>int[]</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getStrides()">getStrides</a></strong>()</code>
|
||||
<div class="block">Returns the number of bytes per line of each plane in the YUV image.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getSubsamp()">getSubsamp</a></strong>()</code>
|
||||
<div class="block">Returns the level of chrominance subsampling used in the YUV image.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>int</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#getWidth()">getWidth</a></strong>()</code>
|
||||
<div class="block">Returns the width of the YUV image (or subregion.)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[][],%20int[],%20int,%20int[],%20int,%20int)">setBuf</a></strong>(byte[][] planes,
|
||||
int[] offsets,
|
||||
int width,
|
||||
int[] strides,
|
||||
int height,
|
||||
int subsamp)</code>
|
||||
<div class="block">Assign a set of image planes to this <code>YUVImage</code> instance.</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><code>void</code></td>
|
||||
<td class="colLast"><code><strong><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html#setBuf(byte[],%20int,%20int,%20int,%20int)">setBuf</a></strong>(byte[] yuvImage,
|
||||
int width,
|
||||
int pad,
|
||||
int height,
|
||||
int subsamp)</code>
|
||||
<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Methods inherited from class java.lang.Object</h3>
|
||||
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="details">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<!-- ============ FIELD DETAIL =========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="field_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Field Detail</h3>
|
||||
<a name="handle">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>handle</h4>
|
||||
<pre>protected long handle</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="yuvPlanes">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>yuvPlanes</h4>
|
||||
<pre>protected byte[][] yuvPlanes</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="yuvOffsets">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>yuvOffsets</h4>
|
||||
<pre>protected int[] yuvOffsets</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="yuvStrides">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>yuvStrides</h4>
|
||||
<pre>protected int[] yuvStrides</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="yuvPad">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>yuvPad</h4>
|
||||
<pre>protected int yuvPad</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="yuvWidth">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>yuvWidth</h4>
|
||||
<pre>protected int yuvWidth</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="yuvHeight">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>yuvHeight</h4>
|
||||
<pre>protected int yuvHeight</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="yuvSubsamp">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>yuvSubsamp</h4>
|
||||
<pre>protected int yuvSubsamp</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="constructor_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Constructor Detail</h3>
|
||||
<a name="YUVImage(int, int[], int, int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>YUVImage</h4>
|
||||
<pre>public YUVImage(int width,
|
||||
int[] strides,
|
||||
int height,
|
||||
int subsamp)</pre>
|
||||
<div class="block">Create a new <code>YUVImage</code> instance backed by separate image
|
||||
planes, and allocate memory for the image planes.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
||||
per line in the corresponding plane of the YUV image. Setting the stride
|
||||
for any plane to 0 is the same as setting it to the plane width (see
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a>.) If <code>strides</code> is null, then the
|
||||
strides for all planes will be set to their respective plane widths. When
|
||||
using this constructor, the stride for each plane must be equal to or
|
||||
greater than the plane width.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
|
||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="YUVImage(int, int, int, int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>YUVImage</h4>
|
||||
<pre>public YUVImage(int width,
|
||||
int pad,
|
||||
int height,
|
||||
int subsamp)</pre>
|
||||
<div class="block">Create a new <code>YUVImage</code> instance backed by a unified image
|
||||
buffer, and allocate memory for the image buffer.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - Each line of each plane in the YUV image buffer will be padded
|
||||
to this number of bytes (must be a power of 2.)</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling to be used in the YUV
|
||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="YUVImage(byte[][], int[], int, int[], int, int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>YUVImage</h4>
|
||||
<pre>public YUVImage(byte[][] planes,
|
||||
int[] offsets,
|
||||
int width,
|
||||
int[] strides,
|
||||
int height,
|
||||
int subsamp)</pre>
|
||||
<div class="block">Create a new <code>YUVImage</code> instance from a set of existing image
|
||||
planes.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||
image planes (or just the Y plane, if the image is grayscale.) These
|
||||
planes can be contiguous or non-contiguous in memory. Plane
|
||||
<code>i</code> should be at least <code>offsets[i] +
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)"><code>TJ.planeSizeYUV</code></a>(i, width, strides[i], height, subsamp)</code>
|
||||
bytes in size.</dd><dd><code>offsets</code> - If this <code>YUVImage</code> instance represents a
|
||||
subregion of a larger image, then <code>offsets[i]</code> specifies the
|
||||
offset (in bytes) of the subregion within plane <code>i</code> of the
|
||||
larger image. Setting this to null is the same as setting the offsets for
|
||||
all planes to 0.</dd><dd><code>width</code> - width (in pixels) of the new YUV image (or subregion)</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
||||
per line in the corresponding plane of the YUV image. Setting the stride
|
||||
for any plane to 0 is the same as setting it to the plane width (see
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a>.) If <code>strides</code> is null, then the
|
||||
strides for all planes will be set to their respective plane widths. You
|
||||
can adjust the strides in order to add an arbitrary amount of line padding
|
||||
to each plane or to specify that this <code>YUVImage</code> instance is a
|
||||
subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||
be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the new YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="YUVImage(byte[], int, int, int, int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>YUVImage</h4>
|
||||
<pre>public YUVImage(byte[] yuvImage,
|
||||
int width,
|
||||
int pad,
|
||||
int height,
|
||||
int subsamp)</pre>
|
||||
<div class="block">Create a new <code>YUVImage</code> instance from an existing unified image
|
||||
buffer.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
||||
image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for
|
||||
this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
||||
sequentially in the buffer (see <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a> for a description
|
||||
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
|
||||
instance, if each line in each plane of the buffer is padded to the
|
||||
nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="method_detail">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Method Detail</h3>
|
||||
<a name="setBuf(byte[][], int[], int, int[], int, int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setBuf</h4>
|
||||
<pre>public void setBuf(byte[][] planes,
|
||||
int[] offsets,
|
||||
int width,
|
||||
int[] strides,
|
||||
int height,
|
||||
int subsamp)</pre>
|
||||
<div class="block">Assign a set of image planes to this <code>YUVImage</code> instance.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>planes</code> - an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||
image planes (or just the Y plane, if the image is grayscale.) These
|
||||
planes can be contiguous or non-contiguous in memory. Plane
|
||||
<code>i</code> should be at least <code>offsets[i] +
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#planeSizeYUV(int,%20int,%20int,%20int,%20int)"><code>TJ.planeSizeYUV</code></a>(i, width, strides[i], height, subsamp)</code>
|
||||
bytes in size.</dd><dd><code>offsets</code> - If this <code>YUVImage</code> instance represents a
|
||||
subregion of a larger image, then <code>offsets[i]</code> specifies the
|
||||
offset (in bytes) of the subregion within plane <code>i</code> of the
|
||||
larger image. Setting this to null is the same as setting the offsets for
|
||||
all planes to 0.</dd><dd><code>width</code> - width (in pixels) of the YUV image (or subregion)</dd><dd><code>strides</code> - an array of integers, each specifying the number of bytes
|
||||
per line in the corresponding plane of the YUV image. Setting the stride
|
||||
for any plane to 0 is the same as setting it to the plane width (see
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a>.) If <code>strides</code> is null, then the
|
||||
strides for all planes will be set to their respective plane widths. You
|
||||
can adjust the strides in order to add an arbitrary amount of line padding
|
||||
to each plane or to specify that this <code>YUVImage</code> image is a
|
||||
subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||
be set to the plane width of plane <code>i</code> in the larger image.)</dd><dd><code>height</code> - height (in pixels) of the YUV image (or subregion)</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="setBuf(byte[], int, int, int, int)">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>setBuf</h4>
|
||||
<pre>public void setBuf(byte[] yuvImage,
|
||||
int width,
|
||||
int pad,
|
||||
int height,
|
||||
int subsamp)</pre>
|
||||
<div class="block">Assign a unified image buffer to this <code>YUVImage</code> instance.</div>
|
||||
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>yuvImage</code> - image buffer that contains or will contain YUV planar
|
||||
image data. Use <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#bufSizeYUV(int,%20int,%20int,%20int)"><code>TJ.bufSizeYUV(int, int, int, int)</code></a> to determine the minimum size for
|
||||
this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
||||
sequentially in the buffer (see <a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><code>above</code></a> for a description
|
||||
of the image format.)</dd><dd><code>width</code> - width (in pixels) of the YUV image</dd><dd><code>pad</code> - the line padding used in the YUV image buffer. For
|
||||
instance, if each line in each plane of the buffer is padded to the
|
||||
nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.</dd><dd><code>height</code> - height (in pixels) of the YUV image</dd><dd><code>subsamp</code> - the level of chrominance subsampling used in the YUV
|
||||
image (one of <a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>)</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getWidth()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getWidth</h4>
|
||||
<pre>public int getWidth()</pre>
|
||||
<div class="block">Returns the width of the YUV image (or subregion.)</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the width of the YUV image (or subregion)</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getHeight()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getHeight</h4>
|
||||
<pre>public int getHeight()</pre>
|
||||
<div class="block">Returns the height of the YUV image (or subregion.)</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the height of the YUV image (or subregion)</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getPad()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getPad</h4>
|
||||
<pre>public int getPad()</pre>
|
||||
<div class="block">Returns the line padding used in the YUV image buffer (if this image is
|
||||
stored in a unified buffer rather than separate image planes.)</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the line padding used in the YUV image buffer</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getStrides()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getStrides</h4>
|
||||
<pre>public int[] getStrides()</pre>
|
||||
<div class="block">Returns the number of bytes per line of each plane in the YUV image.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the number of bytes per line of each plane in the YUV image</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getOffsets()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getOffsets</h4>
|
||||
<pre>public int[] getOffsets()</pre>
|
||||
<div class="block">Returns the offsets (in bytes) of each plane within the planes of a larger
|
||||
YUV image.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the offsets (in bytes) of each plane within the planes of a larger
|
||||
YUV image</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getSubsamp()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getSubsamp</h4>
|
||||
<pre>public int getSubsamp()</pre>
|
||||
<div class="block">Returns the level of chrominance subsampling used in the YUV image. See
|
||||
<a href="../../../org/libjpegturbo/turbojpeg/TJ.html#SAMP_444"><code>TJ.SAMP_*</code></a>.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the level of chrominance subsampling used in the YUV image</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getPlanes()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getPlanes</h4>
|
||||
<pre>public byte[][] getPlanes()</pre>
|
||||
<div class="block">Returns the YUV image planes. If the image is stored in a unified buffer,
|
||||
then all image planes will point to that buffer.</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the YUV image planes</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getBuf()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>getBuf</h4>
|
||||
<pre>public byte[] getBuf()</pre>
|
||||
<div class="block">Returns the YUV image buffer (if this image is stored in a unified
|
||||
buffer rather than separate image planes.)</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the YUV image buffer</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
<a name="getSize()">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="blockListLast">
|
||||
<li class="blockList">
|
||||
<h4>getSize</h4>
|
||||
<pre>public int getSize()</pre>
|
||||
<div class="block">Returns the size (in bytes) of the YUV image buffer (if this image is
|
||||
stored in a unified buffer rather than separate image planes.)</div>
|
||||
<dl><dt><span class="strong">Returns:</span></dt><dd>the size (in bytes) of the YUV image buffer</dd></dl>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li class="navBarCell1Rev">Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">Prev Class</span></a></li>
|
||||
<li>Next Class</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/YUVImage.html" target="_top">Frames</a></li>
|
||||
<li><a href="YUVImage.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<div>
|
||||
<ul class="subNavList">
|
||||
<li>Summary: </li>
|
||||
<li>Nested | </li>
|
||||
<li><a href="#field_summary">Field</a> | </li>
|
||||
<li><a href="#constructor_summary">Constr</a> | </li>
|
||||
<li><a href="#method_summary">Method</a></li>
|
||||
</ul>
|
||||
<ul class="subNavList">
|
||||
<li>Detail: </li>
|
||||
<li><a href="#field_detail">Field</a> | </li>
|
||||
<li><a href="#constructor_detail">Constr</a> | </li>
|
||||
<li><a href="#method_detail">Method</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,51 +1,31 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
org.libjpegturbo.turbojpeg
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white">
|
||||
<FONT size="+1" CLASS="FrameTitleFont">
|
||||
<A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html" target="classFrame">org.libjpegturbo.turbojpeg</A></FONT>
|
||||
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
|
||||
<TR>
|
||||
<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
|
||||
Interfaces</FONT>
|
||||
<FONT CLASS="FrameItemFont">
|
||||
<BR>
|
||||
<A HREF="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><I>TJCustomFilter</I></A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
|
||||
<TR>
|
||||
<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
|
||||
Classes</FONT>
|
||||
<FONT CLASS="FrameItemFont">
|
||||
<BR>
|
||||
<A HREF="TJ.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJ</A>
|
||||
<BR>
|
||||
<A HREF="TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</A>
|
||||
<BR>
|
||||
<A HREF="TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</A>
|
||||
<BR>
|
||||
<A HREF="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</A>
|
||||
<BR>
|
||||
<A HREF="TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</A>
|
||||
<BR>
|
||||
<A HREF="TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</A></FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>org.libjpegturbo.turbojpeg</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar"><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html" target="classFrame">org.libjpegturbo.turbojpeg</a></h1>
|
||||
<div class="indexContainer">
|
||||
<h2 title="Interfaces">Interfaces</h2>
|
||||
<ul title="Interfaces">
|
||||
<li><a href="TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg" target="classFrame"><i>TJCustomFilter</i></a></li>
|
||||
</ul>
|
||||
<h2 title="Classes">Classes</h2>
|
||||
<ul title="Classes">
|
||||
<li><a href="TJ.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJ</a></li>
|
||||
<li><a href="TJCompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJCompressor</a></li>
|
||||
<li><a href="TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJDecompressor</a></li>
|
||||
<li><a href="TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJScalingFactor</a></li>
|
||||
<li><a href="TJTransform.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransform</a></li>
|
||||
<li><a href="TJTransformer.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJTransformer</a></li>
|
||||
<li><a href="YUVImage.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">YUVImage</a></li>
|
||||
</ul>
|
||||
<h2 title="Exceptions">Exceptions</h2>
|
||||
<ul title="Exceptions">
|
||||
<li><a href="TJException.html" title="class in org.libjpegturbo.turbojpeg" target="classFrame">TJException</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,185 +1,202 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
org.libjpegturbo.turbojpeg
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>org.libjpegturbo.turbojpeg</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="org.libjpegturbo.turbojpeg";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV PACKAGE
|
||||
NEXT PACKAGE</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/package-summary.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev Package</li>
|
||||
<li>Next Package</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/package-summary.html" target="_top">Frames</a></li>
|
||||
<li><a href="package-summary.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<H2>
|
||||
Package org.libjpegturbo.turbojpeg
|
||||
</H2>
|
||||
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Interface Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</A></B></TD>
|
||||
<TD>Custom filter callback interface</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<P>
|
||||
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Class Summary</B></FONT></TH>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</A></B></TD>
|
||||
<TD>TurboJPEG utility class (cannot be instantiated)</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</A></B></TD>
|
||||
<TD>TurboJPEG compressor</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</A></B></TD>
|
||||
<TD>TurboJPEG decompressor</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</A></B></TD>
|
||||
<TD>Fractional scaling factor</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</A></B></TD>
|
||||
<TD>Lossless transform parameters</TD>
|
||||
</TR>
|
||||
<TR BGCOLOR="white" CLASS="TableRowColor">
|
||||
<TD WIDTH="15%"><B><A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</A></B></TD>
|
||||
<TD>TurboJPEG lossless transformer</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
<P>
|
||||
<DL>
|
||||
</DL>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 title="Package" class="title">Package org.libjpegturbo.turbojpeg</h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation">
|
||||
<caption><span>Interface Summary</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Interface</th>
|
||||
<th class="colLast" scope="col">Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">Custom filter callback interface</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
|
||||
<caption><span>Class Summary</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Class</th>
|
||||
<th class="colLast" scope="col">Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg">TJ</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">TurboJPEG utility class (cannot be instantiated)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">TurboJPEG compressor</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg">TJDecompressor</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">TurboJPEG decompressor</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">Fractional scaling factor</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">TJTransform</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">Lossless transform parameters</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg">TJTransformer</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">TurboJPEG lossless transformer</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg">YUVImage</a></td>
|
||||
<td class="colLast">
|
||||
<div class="block">This class encapsulates a YUV planar image and the metadata
|
||||
associated with it.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Exception Summary table, listing exceptions, and an explanation">
|
||||
<caption><span>Exception Summary</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Exception</th>
|
||||
<th class="colLast" scope="col">Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<td class="colFirst"><a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">TJException</a></td>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV PACKAGE
|
||||
NEXT PACKAGE</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/package-summary.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="package-tree.html">Tree</a></li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev Package</li>
|
||||
<li>Next Package</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/package-summary.html" target="_top">Frames</a></li>
|
||||
<li><a href="package-summary.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,159 +1,160 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
org.libjpegturbo.turbojpeg Class Hierarchy
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>org.libjpegturbo.turbojpeg Class Hierarchy</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="org.libjpegturbo.turbojpeg Class Hierarchy";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/package-tree.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="navBarCell1Rev">Tree</li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/package-tree.html" target="_top">Frames</a></li>
|
||||
<li><a href="package-tree.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H2>
|
||||
Hierarchy For Package org.libjpegturbo.turbojpeg
|
||||
</H2>
|
||||
</CENTER>
|
||||
<H2>
|
||||
Class Hierarchy
|
||||
</H2>
|
||||
<UL>
|
||||
<LI TYPE="circle">java.lang.Object<UL>
|
||||
<LI TYPE="circle">java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
|
||||
<UL>
|
||||
<LI TYPE="circle">java.awt.geom.Rectangle2D<UL>
|
||||
<LI TYPE="circle">java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
|
||||
<UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransform</B></A></UL>
|
||||
</UL>
|
||||
</UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><B>TJ</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJCompressor</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJDecompressor</B></A><UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransformer</B></A></UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJScalingFactor</B></A></UL>
|
||||
</UL>
|
||||
<H2>
|
||||
Interface Hierarchy
|
||||
</H2>
|
||||
<UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><B>TJCustomFilter</B></A></UL>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For Package org.libjpegturbo.turbojpeg</h1>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li type="circle">java.lang.Object
|
||||
<ul>
|
||||
<li type="circle">java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
|
||||
<ul>
|
||||
<li type="circle">java.awt.geom.Rectangle2D
|
||||
<ul>
|
||||
<li type="circle">java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransform</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle">java.lang.Throwable (implements java.io.Serializable)
|
||||
<ul>
|
||||
<li type="circle">java.lang.Exception
|
||||
<ul>
|
||||
<li type="circle">java.io.IOException
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJException</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJ</span></a></li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJCompressor</span></a> (implements java.io.Closeable)</li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJDecompressor</span></a> (implements java.io.Closeable)
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransformer</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJScalingFactor</span></a></li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">YUVImage</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="../../../org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><span class="strong">TJCustomFilter</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="../../../index.html?org/libjpegturbo/turbojpeg/package-tree.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="package-tree.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="../../../org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="navBarCell1Rev">Tree</li>
|
||||
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="../../../index-all.html">Index</a></li>
|
||||
<li><a href="../../../help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="../../../index.html?org/libjpegturbo/turbojpeg/package-tree.html" target="_top">Frames</a></li>
|
||||
<li><a href="package-tree.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,161 +1,164 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Class Hierarchy
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Class Hierarchy</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Class Hierarchy";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?overview-tree.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="overview-tree.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="navBarCell1Rev">Tree</li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?overview-tree.html" target="_top">Frames</a></li>
|
||||
<li><a href="overview-tree.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H2>
|
||||
Hierarchy For All Packages</H2>
|
||||
</CENTER>
|
||||
<DL>
|
||||
<DT><B>Package Hierarchies:</B><DD><A HREF="org/libjpegturbo/turbojpeg/package-tree.html">org.libjpegturbo.turbojpeg</A></DL>
|
||||
<HR>
|
||||
<H2>
|
||||
Class Hierarchy
|
||||
</H2>
|
||||
<UL>
|
||||
<LI TYPE="circle">java.lang.Object<UL>
|
||||
<LI TYPE="circle">java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
|
||||
<UL>
|
||||
<LI TYPE="circle">java.awt.geom.Rectangle2D<UL>
|
||||
<LI TYPE="circle">java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
|
||||
<UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransform</B></A></UL>
|
||||
</UL>
|
||||
</UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><B>TJ</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJCompressor</B></A><LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJDecompressor</B></A><UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><B>TJTransformer</B></A></UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><B>TJScalingFactor</B></A></UL>
|
||||
</UL>
|
||||
<H2>
|
||||
Interface Hierarchy
|
||||
</H2>
|
||||
<UL>
|
||||
<LI TYPE="circle">org.libjpegturbo.turbojpeg.<A HREF="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><B>TJCustomFilter</B></A></UL>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 class="title">Hierarchy For All Packages</h1>
|
||||
<span class="strong">Package Hierarchies:</span>
|
||||
<ul class="horizontal">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">org.libjpegturbo.turbojpeg</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<h2 title="Class Hierarchy">Class Hierarchy</h2>
|
||||
<ul>
|
||||
<li type="circle">java.lang.Object
|
||||
<ul>
|
||||
<li type="circle">java.awt.geom.RectangularShape (implements java.lang.Cloneable, java.awt.Shape)
|
||||
<ul>
|
||||
<li type="circle">java.awt.geom.Rectangle2D
|
||||
<ul>
|
||||
<li type="circle">java.awt.Rectangle (implements java.io.Serializable, java.awt.Shape)
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransform</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle">java.lang.Throwable (implements java.io.Serializable)
|
||||
<ul>
|
||||
<li type="circle">java.lang.Exception
|
||||
<ul>
|
||||
<li type="circle">java.io.IOException
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJException</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJ.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJ</span></a></li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJCompressor</span></a> (implements java.io.Closeable)</li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJDecompressor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJDecompressor</span></a> (implements java.io.Closeable)
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJTransformer.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJTransformer</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">TJScalingFactor</span></a></li>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/YUVImage.html" title="class in org.libjpegturbo.turbojpeg"><span class="strong">YUVImage</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<h2 title="Interface Hierarchy">Interface Hierarchy</h2>
|
||||
<ul>
|
||||
<li type="circle">org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg"><span class="strong">TJCustomFilter</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Tree</B></FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?overview-tree.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="overview-tree.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li class="navBarCell1Rev">Tree</li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?overview-tree.html" target="_top">Frames</a></li>
|
||||
<li><a href="overview-tree.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
BIN
java/doc/resources/background.gif
Normal file
BIN
java/doc/resources/background.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 57 B |
BIN
java/doc/resources/tab.gif
Normal file
BIN
java/doc/resources/tab.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 291 B |
BIN
java/doc/resources/titlebar.gif
Normal file
BIN
java/doc/resources/titlebar.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
java/doc/resources/titlebar_end.gif
Normal file
BIN
java/doc/resources/titlebar_end.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 849 B |
30
java/doc/script.js
Normal file
30
java/doc/script.js
Normal file
@@ -0,0 +1,30 @@
|
||||
function show(type)
|
||||
{
|
||||
count = 0;
|
||||
for (var key in methods) {
|
||||
var row = document.getElementById(key);
|
||||
if ((methods[key] & type) != 0) {
|
||||
row.style.display = '';
|
||||
row.className = (count++ % 2) ? rowColor : altColor;
|
||||
}
|
||||
else
|
||||
row.style.display = 'none';
|
||||
}
|
||||
updateTabs(type);
|
||||
}
|
||||
|
||||
function updateTabs(type)
|
||||
{
|
||||
for (var value in tabs) {
|
||||
var sNode = document.getElementById(tabs[value][0]);
|
||||
var spanNode = sNode.firstChild;
|
||||
if (value == type) {
|
||||
sNode.className = activeTableTab;
|
||||
spanNode.innerHTML = tabs[value][1];
|
||||
}
|
||||
else {
|
||||
sNode.className = tableTab;
|
||||
spanNode.innerHTML = "<a href=\"javascript:show("+ value + ");\">" + tabs[value][1] + "</a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,200 +1,176 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--NewPage-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>
|
||||
Serialized Form
|
||||
</TITLE>
|
||||
|
||||
|
||||
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
|
||||
|
||||
<SCRIPT type="text/javascript">
|
||||
function windowTitle()
|
||||
{
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Serialized Form</title>
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="Serialized Form";
|
||||
}
|
||||
}
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
</NOSCRIPT>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="white" onload="windowTitle();">
|
||||
<HR>
|
||||
|
||||
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<A NAME="navbar_top"><!-- --></A>
|
||||
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_top_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?serialized-form.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="serialized-form.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="topNav"><a name="navbar_top">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?serialized-form.html" target="_top">Frames</a></li>
|
||||
<li><a href="serialized-form.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_top"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
|
||||
<HR>
|
||||
<CENTER>
|
||||
<H1>
|
||||
Serialized Form</H1>
|
||||
</CENTER>
|
||||
<HR SIZE="4" NOSHADE>
|
||||
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="center"><FONT SIZE="+2">
|
||||
<B>Package</B> <B>org.libjpegturbo.turbojpeg</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
<A NAME="org.libjpegturbo.turbojpeg.TJTransform"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
||||
<B>Class <A HREF="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJTransform</A> extends java.awt.Rectangle implements Serializable</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>
|
||||
<B>serialVersionUID: </B>-127367705761430371L
|
||||
|
||||
<P>
|
||||
<A NAME="serializedForm"><!-- --></A>
|
||||
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
||||
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
||||
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
||||
<B>Serialized Fields</B></FONT></TH>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<H3>
|
||||
op</H3>
|
||||
<PRE>
|
||||
int <B>op</B></PRE>
|
||||
<DL>
|
||||
<DD>Transform operation (one of <code>OP_*</code>)
|
||||
<P>
|
||||
<DL>
|
||||
</DL>
|
||||
</DL>
|
||||
<HR>
|
||||
<H3>
|
||||
options</H3>
|
||||
<PRE>
|
||||
int <B>options</B></PRE>
|
||||
<DL>
|
||||
<DD>Transform options (bitwise OR of one or more of <code>OPT_*</code>)
|
||||
<P>
|
||||
<DL>
|
||||
</DL>
|
||||
</DL>
|
||||
<HR>
|
||||
<H3>
|
||||
cf</H3>
|
||||
<PRE>
|
||||
<A HREF="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</A> <B>cf</B></PRE>
|
||||
<DL>
|
||||
<DD>Custom filter instance
|
||||
<P>
|
||||
<DL>
|
||||
</DL>
|
||||
</DL>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
|
||||
<div class="header">
|
||||
<h1 title="Serialized Form" class="title">Serialized Form</h1>
|
||||
</div>
|
||||
<div class="serializedFormContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h2 title="Package">Package org.libjpegturbo.turbojpeg</h2>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="org.libjpegturbo.turbojpeg.TJException">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Class <a href="org/libjpegturbo/turbojpeg/TJException.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJException</a> extends java.io.IOException implements Serializable</h3>
|
||||
<dl class="nameValue">
|
||||
<dt>serialVersionUID:</dt>
|
||||
<dd>1L</dd>
|
||||
</dl>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="serializedForm">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Serialized Fields</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockListLast">
|
||||
<h4>errorCode</h4>
|
||||
<pre>int errorCode</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList"><a name="org.libjpegturbo.turbojpeg.TJTransform">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Class <a href="org/libjpegturbo/turbojpeg/TJTransform.html" title="class in org.libjpegturbo.turbojpeg">org.libjpegturbo.turbojpeg.TJTransform</a> extends java.awt.Rectangle implements Serializable</h3>
|
||||
<dl class="nameValue">
|
||||
<dt>serialVersionUID:</dt>
|
||||
<dd>-127367705761430371L</dd>
|
||||
</dl>
|
||||
<ul class="blockList">
|
||||
<li class="blockList"><a name="serializedForm">
|
||||
<!-- -->
|
||||
</a>
|
||||
<h3>Serialized Fields</h3>
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h4>op</h4>
|
||||
<pre>int op</pre>
|
||||
<div class="block">Transform operation (one of <code>OP_*</code>)</div>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h4>options</h4>
|
||||
<pre>int options</pre>
|
||||
<div class="block">Transform options (bitwise OR of one or more of <code>OPT_*</code>)</div>
|
||||
</li>
|
||||
<li class="blockListLast">
|
||||
<h4>cf</h4>
|
||||
<pre><a href="org/libjpegturbo/turbojpeg/TJCustomFilter.html" title="interface in org.libjpegturbo.turbojpeg">TJCustomFilter</a> cf</pre>
|
||||
<div class="block">Custom filter instance</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<A NAME="navbar_bottom"><!-- --></A>
|
||||
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
||||
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
||||
<TR>
|
||||
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
||||
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
||||
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
||||
<TR ALIGN="center" VALIGN="top">
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="org/libjpegturbo/turbojpeg/package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
||||
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
||||
</EM>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
PREV
|
||||
NEXT</FONT></TD>
|
||||
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
||||
<A HREF="index.html?serialized-form.html" target="_top"><B>FRAMES</B></A>
|
||||
<A HREF="serialized-form.html" target="_top"><B>NO FRAMES</B></A>
|
||||
<SCRIPT type="text/javascript">
|
||||
<!--
|
||||
<div class="bottomNav"><a name="navbar_bottom">
|
||||
<!-- -->
|
||||
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-summary.html">Package</a></li>
|
||||
<li>Class</li>
|
||||
<li><a href="org/libjpegturbo/turbojpeg/package-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>Prev</li>
|
||||
<li>Next</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?serialized-form.html" target="_top">Frames</a></li>
|
||||
<li><a href="serialized-form.html" target="_top">No Frames</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<NOSCRIPT>
|
||||
<A HREF="allclasses-noframe.html"><B>All Classes</B></A>
|
||||
</NOSCRIPT>
|
||||
|
||||
|
||||
</FONT></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<A NAME="skip-navbar_bottom"></A>
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip-navbar_bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
|
||||
<HR>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,29 +1,474 @@
|
||||
/* Javadoc style sheet */
|
||||
|
||||
/* Define colors, fonts and other style attributes here to override the defaults */
|
||||
|
||||
/* Page background color */
|
||||
body { background-color: #FFFFFF; color:#000000 }
|
||||
|
||||
/* Headings */
|
||||
h1 { font-size: 145% }
|
||||
|
||||
/* Table colors */
|
||||
.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */
|
||||
.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */
|
||||
.TableRowColor { background: #FFFFFF; color:#000000 } /* White */
|
||||
|
||||
/* Font used in left-hand frame lists */
|
||||
.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
|
||||
.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
|
||||
.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
|
||||
|
||||
/* Navigation bar fonts and colors */
|
||||
.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */
|
||||
.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */
|
||||
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;}
|
||||
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;}
|
||||
|
||||
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
|
||||
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
|
||||
|
||||
/*
|
||||
Overall document style
|
||||
*/
|
||||
body {
|
||||
background-color:#ffffff;
|
||||
color:#353833;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
font-size:76%;
|
||||
margin:0;
|
||||
}
|
||||
a:link, a:visited {
|
||||
text-decoration:none;
|
||||
color:#4c6b87;
|
||||
}
|
||||
a:hover, a:focus {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
}
|
||||
a:active {
|
||||
text-decoration:none;
|
||||
color:#4c6b87;
|
||||
}
|
||||
a[name] {
|
||||
color:#353833;
|
||||
}
|
||||
a[name]:hover {
|
||||
text-decoration:none;
|
||||
color:#353833;
|
||||
}
|
||||
pre {
|
||||
font-size:1.3em;
|
||||
}
|
||||
h1 {
|
||||
font-size:1.8em;
|
||||
}
|
||||
h2 {
|
||||
font-size:1.5em;
|
||||
}
|
||||
h3 {
|
||||
font-size:1.4em;
|
||||
}
|
||||
h4 {
|
||||
font-size:1.3em;
|
||||
}
|
||||
h5 {
|
||||
font-size:1.2em;
|
||||
}
|
||||
h6 {
|
||||
font-size:1.1em;
|
||||
}
|
||||
ul {
|
||||
list-style-type:disc;
|
||||
}
|
||||
code, tt {
|
||||
font-size:1.2em;
|
||||
}
|
||||
dt code {
|
||||
font-size:1.2em;
|
||||
}
|
||||
table tr td dt code {
|
||||
font-size:1.2em;
|
||||
vertical-align:top;
|
||||
}
|
||||
sup {
|
||||
font-size:.6em;
|
||||
}
|
||||
/*
|
||||
Document title and Copyright styles
|
||||
*/
|
||||
.clear {
|
||||
clear:both;
|
||||
height:0px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.aboutLanguage {
|
||||
float:right;
|
||||
padding:0px 21px;
|
||||
font-size:.8em;
|
||||
z-index:200;
|
||||
margin-top:-7px;
|
||||
}
|
||||
.legalCopy {
|
||||
margin-left:.5em;
|
||||
}
|
||||
.bar a, .bar a:link, .bar a:visited, .bar a:active {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
.bar a:hover, .bar a:focus {
|
||||
color:#bb7a2a;
|
||||
}
|
||||
.tab {
|
||||
background-color:#0066FF;
|
||||
background-image:url(resources/titlebar.gif);
|
||||
background-position:left top;
|
||||
background-repeat:no-repeat;
|
||||
color:#ffffff;
|
||||
padding:8px;
|
||||
width:5em;
|
||||
font-weight:bold;
|
||||
}
|
||||
/*
|
||||
Navigation bar styles
|
||||
*/
|
||||
.bar {
|
||||
background-image:url(resources/background.gif);
|
||||
background-repeat:repeat-x;
|
||||
color:#FFFFFF;
|
||||
padding:.8em .5em .4em .8em;
|
||||
height:auto;/*height:1.8em;*/
|
||||
font-size:1em;
|
||||
margin:0;
|
||||
}
|
||||
.topNav {
|
||||
background-image:url(resources/background.gif);
|
||||
background-repeat:repeat-x;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.bottomNav {
|
||||
margin-top:10px;
|
||||
background-image:url(resources/background.gif);
|
||||
background-repeat:repeat-x;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.subNav {
|
||||
background-color:#dee3e9;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
float:left;
|
||||
width:100%;
|
||||
overflow:hidden;
|
||||
}
|
||||
.subNav div {
|
||||
clear:left;
|
||||
float:left;
|
||||
padding:0 0 5px 6px;
|
||||
}
|
||||
ul.navList, ul.subNavList {
|
||||
float:left;
|
||||
margin:0 25px 0 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.navList li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
padding:3px 6px;
|
||||
}
|
||||
ul.subNavList li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
font-size:90%;
|
||||
}
|
||||
.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
.topNav a:hover, .bottomNav a:hover {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
}
|
||||
.navBarCell1Rev {
|
||||
background-image:url(resources/tab.gif);
|
||||
background-color:#a88834;
|
||||
color:#FFFFFF;
|
||||
margin: auto 5px;
|
||||
border:1px solid #c9aa44;
|
||||
}
|
||||
/*
|
||||
Page header and footer styles
|
||||
*/
|
||||
.header, .footer {
|
||||
clear:both;
|
||||
margin:0 20px;
|
||||
padding:5px 0 0 0;
|
||||
}
|
||||
.indexHeader {
|
||||
margin:10px;
|
||||
position:relative;
|
||||
}
|
||||
.indexHeader h1 {
|
||||
font-size:1.3em;
|
||||
}
|
||||
.title {
|
||||
color:#2c4557;
|
||||
margin:10px 0;
|
||||
}
|
||||
.subTitle {
|
||||
margin:5px 0 0 0;
|
||||
}
|
||||
.header ul {
|
||||
margin:0 0 25px 0;
|
||||
padding:0;
|
||||
}
|
||||
.footer ul {
|
||||
margin:20px 0 5px 0;
|
||||
}
|
||||
.header ul li, .footer ul li {
|
||||
list-style:none;
|
||||
font-size:1.2em;
|
||||
}
|
||||
/*
|
||||
Heading styles
|
||||
*/
|
||||
div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
|
||||
background-color:#dee3e9;
|
||||
border-top:1px solid #9eadc0;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:2px 5px;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList li.blockList h3 {
|
||||
background-color:#dee3e9;
|
||||
border-top:1px solid #9eadc0;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:2px 5px;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList h3 {
|
||||
padding:0;
|
||||
margin:15px 0;
|
||||
}
|
||||
ul.blockList li.blockList h2 {
|
||||
padding:0px 0 20px 0;
|
||||
}
|
||||
/*
|
||||
Page layout container styles
|
||||
*/
|
||||
.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
|
||||
clear:both;
|
||||
padding:10px 20px;
|
||||
position:relative;
|
||||
}
|
||||
.indexContainer {
|
||||
margin:10px;
|
||||
position:relative;
|
||||
font-size:1.0em;
|
||||
}
|
||||
.indexContainer h2 {
|
||||
font-size:1.1em;
|
||||
padding:0 0 3px 0;
|
||||
}
|
||||
.indexContainer ul {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
.indexContainer ul li {
|
||||
list-style:none;
|
||||
}
|
||||
.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
|
||||
font-size:1.1em;
|
||||
font-weight:bold;
|
||||
margin:10px 0 0 0;
|
||||
color:#4E4E4E;
|
||||
}
|
||||
.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
|
||||
margin:10px 0 10px 20px;
|
||||
}
|
||||
.serializedFormContainer dl.nameValue dt {
|
||||
margin-left:1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
font-weight:bold;
|
||||
}
|
||||
.serializedFormContainer dl.nameValue dd {
|
||||
margin:0 0 0 1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
}
|
||||
/*
|
||||
List styles
|
||||
*/
|
||||
ul.horizontal li {
|
||||
display:inline;
|
||||
font-size:0.9em;
|
||||
}
|
||||
ul.inheritance {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
ul.inheritance li {
|
||||
display:inline;
|
||||
list-style:none;
|
||||
}
|
||||
ul.inheritance li ul.inheritance {
|
||||
margin-left:15px;
|
||||
padding-left:15px;
|
||||
padding-top:1px;
|
||||
}
|
||||
ul.blockList, ul.blockListLast {
|
||||
margin:10px 0 10px 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.blockList li.blockList, ul.blockListLast li.blockList {
|
||||
list-style:none;
|
||||
margin-bottom:25px;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
|
||||
padding:0px 20px 5px 10px;
|
||||
border:1px solid #9eadc0;
|
||||
background-color:#f9f9f9;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
|
||||
padding:0 0 5px 8px;
|
||||
background-color:#ffffff;
|
||||
border:1px solid #9eadc0;
|
||||
border-top:none;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
|
||||
margin-left:0;
|
||||
padding-left:0;
|
||||
padding-bottom:15px;
|
||||
border:none;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
|
||||
list-style:none;
|
||||
border-bottom:none;
|
||||
padding-bottom:0;
|
||||
}
|
||||
table tr td dl, table tr td dl dt, table tr td dl dd {
|
||||
margin-top:0;
|
||||
margin-bottom:1px;
|
||||
}
|
||||
/*
|
||||
Table styles
|
||||
*/
|
||||
.contentContainer table, .classUseContainer table, .constantValuesContainer table {
|
||||
border-bottom:1px solid #9eadc0;
|
||||
width:100%;
|
||||
}
|
||||
.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table {
|
||||
width:100%;
|
||||
}
|
||||
.contentContainer .description table, .contentContainer .details table {
|
||||
border-bottom:none;
|
||||
}
|
||||
.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{
|
||||
vertical-align:top;
|
||||
padding-right:20px;
|
||||
}
|
||||
.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast,
|
||||
.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast,
|
||||
.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne,
|
||||
.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne {
|
||||
padding-right:3px;
|
||||
}
|
||||
.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption {
|
||||
position:relative;
|
||||
text-align:left;
|
||||
background-repeat:no-repeat;
|
||||
color:#FFFFFF;
|
||||
font-weight:bold;
|
||||
clear:none;
|
||||
overflow:hidden;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
}
|
||||
caption a:link, caption a:hover, caption a:active, caption a:visited {
|
||||
color:#FFFFFF;
|
||||
}
|
||||
.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span {
|
||||
white-space:nowrap;
|
||||
padding-top:8px;
|
||||
padding-left:8px;
|
||||
display:block;
|
||||
float:left;
|
||||
background-image:url(resources/titlebar.gif);
|
||||
height:18px;
|
||||
}
|
||||
.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd {
|
||||
width:10px;
|
||||
background-image:url(resources/titlebar_end.gif);
|
||||
background-repeat:no-repeat;
|
||||
background-position:top right;
|
||||
position:relative;
|
||||
float:left;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList table {
|
||||
margin:0 0 12px 0px;
|
||||
width:100%;
|
||||
}
|
||||
.tableSubHeadingColor {
|
||||
background-color: #EEEEFF;
|
||||
}
|
||||
.altColor {
|
||||
background-color:#eeeeef;
|
||||
}
|
||||
.rowColor {
|
||||
background-color:#ffffff;
|
||||
}
|
||||
.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td {
|
||||
text-align:left;
|
||||
padding:3px 3px 3px 7px;
|
||||
}
|
||||
th.colFirst, th.colLast, th.colOne, .constantValuesContainer th {
|
||||
background:#dee3e9;
|
||||
border-top:1px solid #9eadc0;
|
||||
border-bottom:1px solid #9eadc0;
|
||||
text-align:left;
|
||||
padding:3px 3px 3px 7px;
|
||||
}
|
||||
td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
|
||||
font-weight:bold;
|
||||
}
|
||||
td.colFirst, th.colFirst {
|
||||
border-left:1px solid #9eadc0;
|
||||
white-space:nowrap;
|
||||
}
|
||||
td.colLast, th.colLast {
|
||||
border-right:1px solid #9eadc0;
|
||||
}
|
||||
td.colOne, th.colOne {
|
||||
border-right:1px solid #9eadc0;
|
||||
border-left:1px solid #9eadc0;
|
||||
}
|
||||
table.overviewSummary {
|
||||
padding:0px;
|
||||
margin-left:0px;
|
||||
}
|
||||
table.overviewSummary td.colFirst, table.overviewSummary th.colFirst,
|
||||
table.overviewSummary td.colOne, table.overviewSummary th.colOne {
|
||||
width:25%;
|
||||
vertical-align:middle;
|
||||
}
|
||||
table.packageSummary td.colFirst, table.overviewSummary th.colFirst {
|
||||
width:25%;
|
||||
vertical-align:middle;
|
||||
}
|
||||
/*
|
||||
Content styles
|
||||
*/
|
||||
.description pre {
|
||||
margin-top:0;
|
||||
}
|
||||
.deprecatedContent {
|
||||
margin:0;
|
||||
padding:10px 0;
|
||||
}
|
||||
.docSummary {
|
||||
padding:0;
|
||||
}
|
||||
/*
|
||||
Formatting effect styles
|
||||
*/
|
||||
.sourceLineNo {
|
||||
color:green;
|
||||
padding:0 30px 0 0;
|
||||
}
|
||||
h1.hidden {
|
||||
visibility:hidden;
|
||||
overflow:hidden;
|
||||
font-size:.9em;
|
||||
}
|
||||
.block {
|
||||
display:block;
|
||||
margin:3px 0 0 0;
|
||||
}
|
||||
.strong {
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2013, 2017-2018 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -33,11 +34,12 @@ package org.libjpegturbo.turbojpeg;
|
||||
*/
|
||||
public final class TJ {
|
||||
|
||||
private TJ() {}
|
||||
|
||||
/**
|
||||
* The number of chrominance subsampling options
|
||||
*/
|
||||
public static final int NUMSAMP = 5;
|
||||
public static final int NUMSAMP = 6;
|
||||
/**
|
||||
* 4:4:4 chrominance subsampling (no chrominance subsampling). The JPEG
|
||||
* or YUV image will contain one chrominance component for every pixel in the
|
||||
@@ -64,6 +66,17 @@ public final class TJ {
|
||||
* Note that 4:4:0 subsampling is not fully accelerated in libjpeg-turbo.
|
||||
*/
|
||||
public static final int SAMP_440 = 4;
|
||||
/**
|
||||
* 4:1:1 chrominance subsampling. The JPEG or YUV image will contain one
|
||||
* chrominance component for every 4x1 block of pixels in the source image.
|
||||
* JPEG images compressed with 4:1:1 subsampling will be almost exactly the
|
||||
* same size as those compressed with 4:2:0 subsampling, and in the
|
||||
* aggregate, both subsampling methods produce approximately the same
|
||||
* perceptual quality. However, 4:1:1 is better able to reproduce sharp
|
||||
* horizontal features. Note that 4:1:1 subsampling is not fully accelerated
|
||||
* in libjpeg-turbo.
|
||||
*/
|
||||
public static final int SAMP_411 = 5;
|
||||
|
||||
|
||||
/**
|
||||
@@ -73,16 +86,16 @@ public final class TJ {
|
||||
* @param subsamp the level of chrominance subsampling (one of
|
||||
* <code>SAMP_*</code>)
|
||||
*
|
||||
* @return the MCU block width for the given level of chrominance subsampling
|
||||
* @return the MCU block width for the given level of chrominance
|
||||
* subsampling.
|
||||
*/
|
||||
public static int getMCUWidth(int subsamp) throws Exception {
|
||||
if (subsamp < 0 || subsamp >= NUMSAMP)
|
||||
throw new Exception("Invalid subsampling type");
|
||||
return mcuWidth[subsamp];
|
||||
public static int getMCUWidth(int subsamp) {
|
||||
checkSubsampling(subsamp);
|
||||
return MCU_WIDTH[subsamp];
|
||||
}
|
||||
|
||||
private static final int[] mcuWidth = {
|
||||
8, 16, 16, 8, 8
|
||||
private static final int[] MCU_WIDTH = {
|
||||
8, 16, 16, 8, 8, 32
|
||||
};
|
||||
|
||||
|
||||
@@ -94,23 +107,22 @@ public final class TJ {
|
||||
* <code>SAMP_*</code>)
|
||||
*
|
||||
* @return the MCU block height for the given level of chrominance
|
||||
* subsampling
|
||||
* subsampling.
|
||||
*/
|
||||
public static int getMCUHeight(int subsamp) throws Exception {
|
||||
if (subsamp < 0 || subsamp >= NUMSAMP)
|
||||
throw new Exception("Invalid subsampling type");
|
||||
return mcuHeight[subsamp];
|
||||
public static int getMCUHeight(int subsamp) {
|
||||
checkSubsampling(subsamp);
|
||||
return MCU_HEIGHT[subsamp];
|
||||
}
|
||||
|
||||
private static final int[] mcuHeight = {
|
||||
8, 8, 16, 8, 16
|
||||
private static final int[] MCU_HEIGHT = {
|
||||
8, 8, 16, 8, 16, 8
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The number of pixel formats
|
||||
*/
|
||||
public static final int NUMPF = 11;
|
||||
public static final int NUMPF = 12;
|
||||
/**
|
||||
* RGB pixel format. The red, green, and blue components in the image are
|
||||
* stored in 3-byte pixels in the order R, G, B from lowest to highest byte
|
||||
@@ -180,6 +192,22 @@ public final class TJ {
|
||||
* interpreted as an opaque alpha channel.
|
||||
*/
|
||||
public static final int PF_ARGB = 10;
|
||||
/**
|
||||
* CMYK pixel format. Unlike RGB, which is an additive color model used
|
||||
* primarily for display, CMYK (Cyan/Magenta/Yellow/Key) is a subtractive
|
||||
* color model used primarily for printing. In the CMYK color model, the
|
||||
* value of each color component typically corresponds to an amount of cyan,
|
||||
* magenta, yellow, or black ink that is applied to a white background. In
|
||||
* order to convert between CMYK and RGB, it is necessary to use a color
|
||||
* management system (CMS.) A CMS will attempt to map colors within the
|
||||
* printer's gamut to perceptually similar colors in the display's gamut and
|
||||
* vice versa, but the mapping is typically not 1:1 or reversible, nor can it
|
||||
* be defined with a simple formula. Thus, such a conversion is out of scope
|
||||
* for a codec library. However, the TurboJPEG API allows for compressing
|
||||
* CMYK pixels into a YCCK JPEG image (see {@link #CS_YCCK}) and
|
||||
* decompressing YCCK JPEG images into CMYK pixels.
|
||||
*/
|
||||
public static final int PF_CMYK = 11;
|
||||
|
||||
|
||||
/**
|
||||
@@ -187,16 +215,15 @@ public final class TJ {
|
||||
*
|
||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||
*
|
||||
* @return the pixel size (in bytes) for the given pixel format
|
||||
* @return the pixel size (in bytes) for the given pixel format.
|
||||
*/
|
||||
public static int getPixelSize(int pixelFormat) throws Exception {
|
||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
||||
throw new Exception("Invalid pixel format");
|
||||
return pixelSize[pixelFormat];
|
||||
public static int getPixelSize(int pixelFormat) {
|
||||
checkPixelFormat(pixelFormat);
|
||||
return PIXEL_SIZE[pixelFormat];
|
||||
}
|
||||
|
||||
private static final int[] pixelSize = {
|
||||
3, 3, 4, 4, 4, 4, 1, 4, 4, 4, 4
|
||||
private static final int[] PIXEL_SIZE = {
|
||||
3, 3, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4
|
||||
};
|
||||
|
||||
|
||||
@@ -209,16 +236,16 @@ public final class TJ {
|
||||
*
|
||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||
*
|
||||
* @return the red offset for the given pixel format
|
||||
* @return the red offset for the given pixel format, or -1 if the pixel
|
||||
* format does not have a red component.
|
||||
*/
|
||||
public static int getRedOffset(int pixelFormat) throws Exception {
|
||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
||||
throw new Exception("Invalid pixel format");
|
||||
return redOffset[pixelFormat];
|
||||
public static int getRedOffset(int pixelFormat) {
|
||||
checkPixelFormat(pixelFormat);
|
||||
return RED_OFFSET[pixelFormat];
|
||||
}
|
||||
|
||||
private static final int[] redOffset = {
|
||||
0, 2, 0, 2, 3, 1, 0, 0, 2, 3, 1
|
||||
private static final int[] RED_OFFSET = {
|
||||
0, 2, 0, 2, 3, 1, -1, 0, 2, 3, 1, -1
|
||||
};
|
||||
|
||||
|
||||
@@ -231,16 +258,16 @@ public final class TJ {
|
||||
*
|
||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||
*
|
||||
* @return the green offset for the given pixel format
|
||||
* @return the green offset for the given pixel format, or -1 if the pixel
|
||||
* format does not have a green component.
|
||||
*/
|
||||
public static int getGreenOffset(int pixelFormat) throws Exception {
|
||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
||||
throw new Exception("Invalid pixel format");
|
||||
return greenOffset[pixelFormat];
|
||||
public static int getGreenOffset(int pixelFormat) {
|
||||
checkPixelFormat(pixelFormat);
|
||||
return GREEN_OFFSET[pixelFormat];
|
||||
}
|
||||
|
||||
private static final int[] greenOffset = {
|
||||
1, 1, 1, 1, 2, 2, 0, 1, 1, 2, 2
|
||||
private static final int[] GREEN_OFFSET = {
|
||||
1, 1, 1, 1, 2, 2, -1, 1, 1, 2, 2, -1
|
||||
};
|
||||
|
||||
|
||||
@@ -253,44 +280,116 @@ public final class TJ {
|
||||
*
|
||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||
*
|
||||
* @return the blue offset for the given pixel format
|
||||
* @return the blue offset for the given pixel format, or -1 if the pixel
|
||||
* format does not have a blue component.
|
||||
*/
|
||||
public static int getBlueOffset(int pixelFormat) throws Exception {
|
||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
||||
throw new Exception("Invalid pixel format");
|
||||
return blueOffset[pixelFormat];
|
||||
public static int getBlueOffset(int pixelFormat) {
|
||||
checkPixelFormat(pixelFormat);
|
||||
return BLUE_OFFSET[pixelFormat];
|
||||
}
|
||||
|
||||
private static final int[] blueOffset = {
|
||||
2, 0, 2, 0, 1, 3, 0, 2, 0, 1, 3
|
||||
private static final int[] BLUE_OFFSET = {
|
||||
2, 0, 2, 0, 1, 3, -1, 2, 0, 1, 3, -1
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* For the given pixel format, returns the number of bytes that the alpha
|
||||
* component is offset from the start of the pixel. For instance, if a pixel
|
||||
* of format <code>TJ.PF_BGRA</code> is stored in <code>char pixel[]</code>,
|
||||
* then the alpha component will be
|
||||
* <code>pixel[TJ.getAlphaOffset(TJ.PF_BGRA)]</code>.
|
||||
*
|
||||
* @param pixelFormat the pixel format (one of <code>PF_*</code>)
|
||||
*
|
||||
* @return the alpha offset for the given pixel format, or -1 if the pixel
|
||||
* format does not have a alpha component.
|
||||
*/
|
||||
public static int getAlphaOffset(int pixelFormat) {
|
||||
checkPixelFormat(pixelFormat);
|
||||
return ALPHA_OFFSET[pixelFormat];
|
||||
}
|
||||
|
||||
private static final int[] ALPHA_OFFSET = {
|
||||
-1, -1, -1, -1, -1, -1, -1, 3, 3, 0, 0, -1
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The number of JPEG colorspaces
|
||||
*/
|
||||
public static final int NUMCS = 5;
|
||||
/**
|
||||
* RGB colorspace. When compressing the JPEG image, the R, G, and B
|
||||
* components in the source image are reordered into image planes, but no
|
||||
* colorspace conversion or subsampling is performed. RGB JPEG images can be
|
||||
* decompressed to any of the extended RGB pixel formats or grayscale, but
|
||||
* they cannot be decompressed to YUV images.
|
||||
*/
|
||||
public static final int CS_RGB = 0;
|
||||
/**
|
||||
* YCbCr colorspace. YCbCr is not an absolute colorspace but rather a
|
||||
* mathematical transformation of RGB designed solely for storage and
|
||||
* transmission. YCbCr images must be converted to RGB before they can
|
||||
* actually be displayed. In the YCbCr colorspace, the Y (luminance)
|
||||
* component represents the black & white portion of the original image, and
|
||||
* the Cb and Cr (chrominance) components represent the color portion of the
|
||||
* original image. Originally, the analog equivalent of this transformation
|
||||
* allowed the same signal to drive both black & white and color televisions,
|
||||
* but JPEG images use YCbCr primarily because it allows the color data to be
|
||||
* optionally subsampled for the purposes of reducing bandwidth or disk
|
||||
* space. YCbCr is the most common JPEG colorspace, and YCbCr JPEG images
|
||||
* can be compressed from and decompressed to any of the extended RGB pixel
|
||||
* formats or grayscale, or they can be decompressed to YUV planar images.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:ConstantName")
|
||||
public static final int CS_YCbCr = 1;
|
||||
/**
|
||||
* Grayscale colorspace. The JPEG image retains only the luminance data (Y
|
||||
* component), and any color data from the source image is discarded.
|
||||
* Grayscale JPEG images can be compressed from and decompressed to any of
|
||||
* the extended RGB pixel formats or grayscale, or they can be decompressed
|
||||
* to YUV planar images.
|
||||
*/
|
||||
public static final int CS_GRAY = 2;
|
||||
/**
|
||||
* CMYK colorspace. When compressing the JPEG image, the C, M, Y, and K
|
||||
* components in the source image are reordered into image planes, but no
|
||||
* colorspace conversion or subsampling is performed. CMYK JPEG images can
|
||||
* only be decompressed to CMYK pixels.
|
||||
*/
|
||||
public static final int CS_CMYK = 3;
|
||||
/**
|
||||
* YCCK colorspace. YCCK (AKA "YCbCrK") is not an absolute colorspace but
|
||||
* rather a mathematical transformation of CMYK designed solely for storage
|
||||
* and transmission. It is to CMYK as YCbCr is to RGB. CMYK pixels can be
|
||||
* reversibly transformed into YCCK, and as with YCbCr, the chrominance
|
||||
* components in the YCCK pixels can be subsampled without incurring major
|
||||
* perceptual loss. YCCK JPEG images can only be compressed from and
|
||||
* decompressed to CMYK pixels.
|
||||
*/
|
||||
public static final int CS_YCCK = 4;
|
||||
|
||||
|
||||
/**
|
||||
* The uncompressed source/destination image is stored in bottom-up (Windows,
|
||||
* OpenGL) order, not top-down (X11) order.
|
||||
*/
|
||||
public static final int FLAG_BOTTOMUP = 2;
|
||||
/**
|
||||
* Turn off CPU auto-detection and force TurboJPEG to use MMX code
|
||||
* (if the underlying codec supports it.)
|
||||
*/
|
||||
|
||||
@SuppressWarnings("checkstyle:JavadocVariable")
|
||||
@Deprecated
|
||||
public static final int FLAG_FORCEMMX = 8;
|
||||
/**
|
||||
* Turn off CPU auto-detection and force TurboJPEG to use SSE code
|
||||
* (if the underlying codec supports it.)
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocVariable")
|
||||
@Deprecated
|
||||
public static final int FLAG_FORCESSE = 16;
|
||||
/**
|
||||
* Turn off CPU auto-detection and force TurboJPEG to use SSE2 code
|
||||
* (if the underlying codec supports it.)
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocVariable")
|
||||
@Deprecated
|
||||
public static final int FLAG_FORCESSE2 = 32;
|
||||
/**
|
||||
* Turn off CPU auto-detection and force TurboJPEG to use SSE3 code
|
||||
* (if the underlying codec supports it.)
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocVariable")
|
||||
@Deprecated
|
||||
public static final int FLAG_FORCESSE3 = 128;
|
||||
|
||||
/**
|
||||
* When decompressing an image that was compressed using chrominance
|
||||
* subsampling, use the fastest chrominance upsampling algorithm available in
|
||||
@@ -318,6 +417,45 @@ public final class TJ {
|
||||
* been shown to have a larger effect.
|
||||
*/
|
||||
public static final int FLAG_ACCURATEDCT = 4096;
|
||||
/**
|
||||
* Immediately discontinue the current compression/decompression/transform
|
||||
* operation if the underlying codec throws a warning (non-fatal error). The
|
||||
* default behavior is to allow the operation to complete unless a fatal
|
||||
* error is encountered.
|
||||
* <p>
|
||||
* NOTE: due to the design of the TurboJPEG Java API, only certain methods
|
||||
* (specifically, {@link TJDecompressor TJDecompressor.decompress*()} methods
|
||||
* with a void return type) will complete and leave the output image in a
|
||||
* fully recoverable state after a non-fatal error occurs.
|
||||
*/
|
||||
public static final int FLAG_STOPONWARNING = 8192;
|
||||
/**
|
||||
* Use progressive entropy coding in JPEG images generated by compression and
|
||||
* transform operations. Progressive entropy coding will generally improve
|
||||
* compression relative to baseline entropy coding (the default), but it will
|
||||
* reduce compression and decompression performance considerably.
|
||||
*/
|
||||
public static final int FLAG_PROGRESSIVE = 16384;
|
||||
|
||||
|
||||
/**
|
||||
* The number of error codes
|
||||
*/
|
||||
public static final int NUMERR = 2;
|
||||
/**
|
||||
* The error was non-fatal and recoverable, but the image may still be
|
||||
* corrupt.
|
||||
* <p>
|
||||
* NOTE: due to the design of the TurboJPEG Java API, only certain methods
|
||||
* (specifically, {@link TJDecompressor TJDecompressor.decompress*()} methods
|
||||
* with a void return type) will complete and leave the output image in a
|
||||
* fully recoverable state after a non-fatal error occurs.
|
||||
*/
|
||||
public static final int ERR_WARNING = 0;
|
||||
/**
|
||||
* The error was fatal and non-recoverable.
|
||||
*/
|
||||
public static final int ERR_FATAL = 1;
|
||||
|
||||
|
||||
/**
|
||||
@@ -332,10 +470,9 @@ public final class TJ {
|
||||
* generating the JPEG image (one of {@link TJ TJ.SAMP_*})
|
||||
*
|
||||
* @return the maximum size of the buffer (in bytes) required to hold a JPEG
|
||||
* image with the given width, height, and level of chrominance subsampling
|
||||
* image with the given width, height, and level of chrominance subsampling.
|
||||
*/
|
||||
public static native int bufSize(int width, int height, int jpegSubsamp)
|
||||
throws Exception;
|
||||
public static native int bufSize(int width, int height, int jpegSubsamp);
|
||||
|
||||
/**
|
||||
* Returns the size of the buffer (in bytes) required to hold a YUV planar
|
||||
@@ -343,28 +480,105 @@ public final class TJ {
|
||||
*
|
||||
* @param width the width (in pixels) of the YUV image
|
||||
*
|
||||
* @param pad the width of each line in each plane of the image is padded to
|
||||
* the nearest multiple of this number of bytes (must be a power of 2.)
|
||||
*
|
||||
* @param height the height (in pixels) of the YUV image
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||
* image (one of {@link TJ TJ.SAMP_*})
|
||||
*
|
||||
* @return the size of the buffer (in bytes) required to hold a YUV planar
|
||||
* image with the given width, height, and level of chrominance subsampling
|
||||
* image with the given width, height, and level of chrominance subsampling.
|
||||
*/
|
||||
public static native int bufSizeYUV(int width, int height, int subsamp)
|
||||
throws Exception;
|
||||
public static native int bufSizeYUV(int width, int pad, int height,
|
||||
int subsamp);
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #bufSizeYUV(int, int, int, int)} instead.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public static native int bufSizeYUV(int width, int height, int subsamp);
|
||||
|
||||
/**
|
||||
* Returns the size of the buffer (in bytes) required to hold a YUV image
|
||||
* plane with the given parameters.
|
||||
*
|
||||
* @param componentID ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||
* 2 = V/Cr)
|
||||
*
|
||||
* @param width width (in pixels) of the YUV image. NOTE: this is the width
|
||||
* of the whole image, not the plane width.
|
||||
*
|
||||
* @param stride bytes per line in the image plane.
|
||||
*
|
||||
* @param height height (in pixels) of the YUV image. NOTE: this is the
|
||||
* height of the whole image, not the plane height.
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||
* image (one of {@link TJ TJ.SAMP_*})
|
||||
*
|
||||
* @return the size of the buffer (in bytes) required to hold a YUV planar
|
||||
* image with the given parameters.
|
||||
*/
|
||||
public static native int planeSizeYUV(int componentID, int width, int stride,
|
||||
int height, int subsamp);
|
||||
|
||||
/**
|
||||
* Returns the plane width of a YUV image plane with the given parameters.
|
||||
* Refer to {@link YUVImage YUVImage} for a description of plane width.
|
||||
*
|
||||
* @param componentID ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||
* 2 = V/Cr)
|
||||
*
|
||||
* @param width width (in pixels) of the YUV image
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling used in the YUV image
|
||||
* (one of {@link TJ TJ.SAMP_*})
|
||||
*
|
||||
* @return the plane width of a YUV image plane with the given parameters.
|
||||
*/
|
||||
public static native int planeWidth(int componentID, int width, int subsamp);
|
||||
|
||||
/**
|
||||
* Returns the plane height of a YUV image plane with the given parameters.
|
||||
* Refer to {@link YUVImage YUVImage} for a description of plane height.
|
||||
*
|
||||
* @param componentID ID number of the image plane (0 = Y, 1 = U/Cb,
|
||||
* 2 = V/Cr)
|
||||
*
|
||||
* @param height height (in pixels) of the YUV image
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling used in the YUV image
|
||||
* (one of {@link TJ TJ.SAMP_*})
|
||||
*
|
||||
* @return the plane height of a YUV image plane with the given parameters.
|
||||
*/
|
||||
public static native int planeHeight(int componentID, int height,
|
||||
int subsamp);
|
||||
|
||||
/**
|
||||
* Returns a list of fractional scaling factors that the JPEG decompressor in
|
||||
* this implementation of TurboJPEG supports.
|
||||
*
|
||||
* @return a list of fractional scaling factors that the JPEG decompressor in
|
||||
* this implementation of TurboJPEG supports
|
||||
* this implementation of TurboJPEG supports.
|
||||
*/
|
||||
public static native TJScalingFactor[] getScalingFactors()
|
||||
throws Exception;
|
||||
public static native TJScalingFactor[] getScalingFactors();
|
||||
|
||||
static {
|
||||
TJLoader.load();
|
||||
}
|
||||
};
|
||||
|
||||
private static void checkPixelFormat(int pixelFormat) {
|
||||
if (pixelFormat < 0 || pixelFormat >= NUMPF)
|
||||
throw new IllegalArgumentException("Invalid pixel format");
|
||||
}
|
||||
|
||||
private static void checkSubsampling(int subsamp) {
|
||||
if (subsamp < 0 || subsamp >= NUMSAMP)
|
||||
throw new IllegalArgumentException("Invalid subsampling type");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C)2011-2014 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2015, 2018 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -30,11 +31,12 @@ package org.libjpegturbo.turbojpeg;
|
||||
|
||||
import java.awt.image.*;
|
||||
import java.nio.*;
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* TurboJPEG compressor
|
||||
*/
|
||||
public class TJCompressor {
|
||||
public class TJCompressor implements Closeable {
|
||||
|
||||
private static final String NO_ASSOC_ERROR =
|
||||
"No source image is associated with this instance";
|
||||
@@ -42,7 +44,7 @@ public class TJCompressor {
|
||||
/**
|
||||
* Create a TurboJPEG compressor instance.
|
||||
*/
|
||||
public TJCompressor() throws Exception {
|
||||
public TJCompressor() throws TJException {
|
||||
init();
|
||||
}
|
||||
|
||||
@@ -67,7 +69,7 @@ public class TJCompressor {
|
||||
* {@link TJ#PF_RGB TJ.PF_*})
|
||||
*/
|
||||
public TJCompressor(byte[] srcImage, int x, int y, int width, int pitch,
|
||||
int height, int pixelFormat) throws Exception {
|
||||
int height, int pixelFormat) throws TJException {
|
||||
setSourceImage(srcImage, x, y, width, pitch, height, pixelFormat);
|
||||
}
|
||||
|
||||
@@ -75,17 +77,44 @@ public class TJCompressor {
|
||||
* @deprecated Use
|
||||
* {@link #TJCompressor(byte[], int, int, int, int, int, int)} instead.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public TJCompressor(byte[] srcImage, int width, int pitch, int height,
|
||||
int pixelFormat) throws Exception {
|
||||
int pixelFormat) throws TJException {
|
||||
setSourceImage(srcImage, width, pitch, height, pixelFormat);
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate an uncompressed source image with this compressor instance.
|
||||
* Create a TurboJPEG compressor instance and associate the uncompressed
|
||||
* source image stored in <code>srcImage</code> with the newly created
|
||||
* instance.
|
||||
*
|
||||
* @param srcImage image buffer containing RGB or grayscale pixels to be
|
||||
* compressed or encoded
|
||||
* @param srcImage see
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||
*
|
||||
* @param x see
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||
*
|
||||
* @param y see
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||
*
|
||||
* @param width see
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||
*
|
||||
* @param height see
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} for description
|
||||
*/
|
||||
public TJCompressor(BufferedImage srcImage, int x, int y, int width,
|
||||
int height) throws TJException {
|
||||
setSourceImage(srcImage, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate an uncompressed RGB, grayscale, or CMYK source image with this
|
||||
* compressor instance.
|
||||
*
|
||||
* @param srcImage image buffer containing RGB, grayscale, or CMYK pixels to
|
||||
* be compressed or encoded. This buffer is not modified.
|
||||
*
|
||||
* @param x x offset (in pixels) of the region in the source image from which
|
||||
* the JPEG or YUV image should be compressed/encoded
|
||||
@@ -113,11 +142,11 @@ public class TJCompressor {
|
||||
*/
|
||||
public void setSourceImage(byte[] srcImage, int x, int y, int width,
|
||||
int pitch, int height, int pixelFormat)
|
||||
throws Exception {
|
||||
throws TJException {
|
||||
if (handle == 0) init();
|
||||
if (srcImage == null || x < 0 || y < 0 || width < 1 || height < 1 ||
|
||||
pitch < 0 || pixelFormat < 0 || pixelFormat >= TJ.NUMPF)
|
||||
throw new Exception("Invalid argument in setSourceImage()");
|
||||
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||
srcBuf = srcImage;
|
||||
srcWidth = width;
|
||||
if (pitch == 0)
|
||||
@@ -128,31 +157,148 @@ public class TJCompressor {
|
||||
srcPixelFormat = pixelFormat;
|
||||
srcX = x;
|
||||
srcY = y;
|
||||
srcBufInt = null;
|
||||
srcYUVImage = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use
|
||||
* {@link #setSourceImage(byte[], int, int, int, int, int, int)} instead.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public void setSourceImage(byte[] srcImage, int width, int pitch,
|
||||
int height, int pixelFormat) throws Exception {
|
||||
int height, int pixelFormat) throws TJException {
|
||||
setSourceImage(srcImage, 0, 0, width, pitch, height, pixelFormat);
|
||||
srcX = srcY = -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate an uncompressed RGB or grayscale source image with this
|
||||
* compressor instance.
|
||||
*
|
||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
||||
* grayscale pixels to be compressed or encoded. This image is not modified.
|
||||
*
|
||||
* @param x x offset (in pixels) of the region in the source image from which
|
||||
* the JPEG or YUV image should be compressed/encoded
|
||||
*
|
||||
* @param y y offset (in pixels) of the region in the source image from which
|
||||
* the JPEG or YUV image should be compressed/encoded
|
||||
*
|
||||
* @param width width (in pixels) of the region in the source image from
|
||||
* which the JPEG or YUV image should be compressed/encoded (0 = use the
|
||||
* width of the source image)
|
||||
*
|
||||
* @param height height (in pixels) of the region in the source image from
|
||||
* which the JPEG or YUV image should be compressed/encoded (0 = use the
|
||||
* height of the source image)
|
||||
*/
|
||||
public void setSourceImage(BufferedImage srcImage, int x, int y, int width,
|
||||
int height) throws TJException {
|
||||
if (handle == 0) init();
|
||||
if (srcImage == null || x < 0 || y < 0 || width < 0 || height < 0)
|
||||
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||
srcX = x;
|
||||
srcY = y;
|
||||
srcWidth = (width == 0) ? srcImage.getWidth() : width;
|
||||
srcHeight = (height == 0) ? srcImage.getHeight() : height;
|
||||
if (x + width > srcImage.getWidth() || y + height > srcImage.getHeight())
|
||||
throw new IllegalArgumentException("Compression region exceeds the bounds of the source image");
|
||||
|
||||
int pixelFormat;
|
||||
boolean intPixels = false;
|
||||
if (byteOrder == null)
|
||||
byteOrder = ByteOrder.nativeOrder();
|
||||
switch (srcImage.getType()) {
|
||||
case BufferedImage.TYPE_3BYTE_BGR:
|
||||
pixelFormat = TJ.PF_BGR; break;
|
||||
case BufferedImage.TYPE_4BYTE_ABGR:
|
||||
case BufferedImage.TYPE_4BYTE_ABGR_PRE:
|
||||
pixelFormat = TJ.PF_XBGR; break;
|
||||
case BufferedImage.TYPE_BYTE_GRAY:
|
||||
pixelFormat = TJ.PF_GRAY; break;
|
||||
case BufferedImage.TYPE_INT_BGR:
|
||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
||||
pixelFormat = TJ.PF_XBGR;
|
||||
else
|
||||
pixelFormat = TJ.PF_RGBX;
|
||||
intPixels = true; break;
|
||||
case BufferedImage.TYPE_INT_RGB:
|
||||
case BufferedImage.TYPE_INT_ARGB:
|
||||
case BufferedImage.TYPE_INT_ARGB_PRE:
|
||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
||||
pixelFormat = TJ.PF_XRGB;
|
||||
else
|
||||
pixelFormat = TJ.PF_BGRX;
|
||||
intPixels = true; break;
|
||||
default:
|
||||
throw new IllegalArgumentException("Unsupported BufferedImage format");
|
||||
}
|
||||
srcPixelFormat = pixelFormat;
|
||||
|
||||
WritableRaster wr = srcImage.getRaster();
|
||||
if (intPixels) {
|
||||
SinglePixelPackedSampleModel sm =
|
||||
(SinglePixelPackedSampleModel)srcImage.getSampleModel();
|
||||
srcStride = sm.getScanlineStride();
|
||||
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
||||
srcBufInt = db.getData();
|
||||
srcBuf = null;
|
||||
} else {
|
||||
ComponentSampleModel sm =
|
||||
(ComponentSampleModel)srcImage.getSampleModel();
|
||||
int pixelSize = sm.getPixelStride();
|
||||
if (pixelSize != TJ.getPixelSize(pixelFormat))
|
||||
throw new IllegalArgumentException("Inconsistency between pixel format and pixel size in BufferedImage");
|
||||
srcPitch = sm.getScanlineStride();
|
||||
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
||||
srcBuf = db.getData();
|
||||
srcBufInt = null;
|
||||
}
|
||||
srcYUVImage = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate an uncompressed YUV planar source image with this compressor
|
||||
* instance.
|
||||
*
|
||||
* @param srcImage YUV planar image to be compressed. This image is not
|
||||
* modified.
|
||||
*/
|
||||
public void setSourceImage(YUVImage srcImage) throws TJException {
|
||||
if (handle == 0) init();
|
||||
if (srcImage == null)
|
||||
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||
srcYUVImage = srcImage;
|
||||
srcBuf = null;
|
||||
srcBufInt = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the level of chrominance subsampling for subsequent compress/encode
|
||||
* operations.
|
||||
* operations. When pixels are converted from RGB to YCbCr (see
|
||||
* {@link TJ#CS_YCbCr}) or from CMYK to YCCK (see {@link TJ#CS_YCCK}) as part
|
||||
* of the JPEG compression process, some of the Cb and Cr (chrominance)
|
||||
* components can be discarded or averaged together to produce a smaller
|
||||
* image with little perceptible loss of image clarity (the human eye is more
|
||||
* sensitive to small changes in brightness than to small changes in color.)
|
||||
* This is called "chrominance subsampling".
|
||||
* <p>
|
||||
* NOTE: This method has no effect when compressing a JPEG image from a YUV
|
||||
* planar source. In that case, the level of chrominance subsampling in
|
||||
* the JPEG image is determined by the source. Furthermore, this method has
|
||||
* no effect when encoding to a pre-allocated {@link YUVImage} instance. In
|
||||
* that case, the level of chrominance subsampling is determined by the
|
||||
* destination.
|
||||
*
|
||||
* @param newSubsamp the level of chrominance subsampling to use in
|
||||
* subsequent compress/encode operations (one of
|
||||
* subsequent compress/encode oeprations (one of
|
||||
* {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||
*/
|
||||
public void setSubsamp(int newSubsamp) throws Exception {
|
||||
public void setSubsamp(int newSubsamp) {
|
||||
if (newSubsamp < 0 || newSubsamp >= TJ.NUMSAMP)
|
||||
throw new Exception("Invalid argument in setSubsamp()");
|
||||
throw new IllegalArgumentException("Invalid argument in setSubsamp()");
|
||||
subsamp = newSubsamp;
|
||||
}
|
||||
|
||||
@@ -162,9 +308,9 @@ public class TJCompressor {
|
||||
* @param quality the new JPEG image quality level (1 to 100, 1 = worst,
|
||||
* 100 = best)
|
||||
*/
|
||||
public void setJPEGQuality(int quality) throws Exception {
|
||||
public void setJPEGQuality(int quality) {
|
||||
if (quality < 1 || quality > 100)
|
||||
throw new Exception("Invalid argument in setJPEGQuality()");
|
||||
throw new IllegalArgumentException("Invalid argument in setJPEGQuality()");
|
||||
jpegQuality = quality;
|
||||
}
|
||||
|
||||
@@ -180,15 +326,25 @@ public class TJCompressor {
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public void compress(byte[] dstBuf, int flags) throws Exception {
|
||||
public void compress(byte[] dstBuf, int flags) throws TJException {
|
||||
if (dstBuf == null || flags < 0)
|
||||
throw new Exception("Invalid argument in compress()");
|
||||
if (srcBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
throw new IllegalArgumentException("Invalid argument in compress()");
|
||||
if (srcBuf == null && srcBufInt == null && srcYUVImage == null)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
if (jpegQuality < 0)
|
||||
throw new Exception("JPEG Quality not set");
|
||||
if (subsamp < 0)
|
||||
throw new Exception("Subsampling level not set");
|
||||
throw new IllegalStateException("JPEG Quality not set");
|
||||
if (subsamp < 0 && srcYUVImage == null)
|
||||
throw new IllegalStateException("Subsampling level not set");
|
||||
|
||||
if (srcYUVImage != null)
|
||||
compressedSize = compressFromYUV(srcYUVImage.getPlanes(),
|
||||
srcYUVImage.getOffsets(),
|
||||
srcYUVImage.getWidth(),
|
||||
srcYUVImage.getStrides(),
|
||||
srcYUVImage.getHeight(),
|
||||
srcYUVImage.getSubsamp(),
|
||||
dstBuf, jpegQuality, flags);
|
||||
else if (srcBuf != null) {
|
||||
if (srcX >= 0 && srcY >= 0)
|
||||
compressedSize = compress(srcBuf, srcX, srcY, srcWidth, srcPitch,
|
||||
srcHeight, srcPixelFormat, dstBuf, subsamp,
|
||||
@@ -197,6 +353,16 @@ public class TJCompressor {
|
||||
compressedSize = compress(srcBuf, srcWidth, srcPitch, srcHeight,
|
||||
srcPixelFormat, dstBuf, subsamp, jpegQuality,
|
||||
flags);
|
||||
} else if (srcBufInt != null) {
|
||||
if (srcX >= 0 && srcY >= 0)
|
||||
compressedSize = compress(srcBufInt, srcX, srcY, srcWidth, srcStride,
|
||||
srcHeight, srcPixelFormat, dstBuf, subsamp,
|
||||
jpegQuality, flags);
|
||||
else
|
||||
compressedSize = compress(srcBufInt, srcWidth, srcStride, srcHeight,
|
||||
srcPixelFormat, dstBuf, subsamp, jpegQuality,
|
||||
flags);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -210,283 +376,192 @@ public class TJCompressor {
|
||||
* not be equal to the size of the JPEG image. Use {@link
|
||||
* #getCompressedSize} to obtain the size of the JPEG image.
|
||||
*/
|
||||
public byte[] compress(int flags) throws Exception {
|
||||
if (srcWidth < 1 || srcHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
public byte[] compress(int flags) throws TJException {
|
||||
checkSourceImage();
|
||||
byte[] buf = new byte[TJ.bufSize(srcWidth, srcHeight, subsamp)];
|
||||
compress(buf, flags);
|
||||
return buf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compress the uncompressed source image stored in <code>srcImage</code>
|
||||
* and output a JPEG image to the given destination buffer.
|
||||
*
|
||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
||||
* grayscale pixels to be compressed
|
||||
*
|
||||
* @param dstBuf buffer that will receive the JPEG image. Use
|
||||
* {@link TJ#bufSize} to determine the maximum size for this buffer based on
|
||||
* the image width, height, and level of chrominance subsampling.
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
* @deprecated Use
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||
* {@link #compress(byte[], int)} instead.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public void compress(BufferedImage srcImage, byte[] dstBuf, int flags)
|
||||
throws Exception {
|
||||
if (srcImage == null || dstBuf == null || flags < 0)
|
||||
throw new Exception("Invalid argument in compress()");
|
||||
int width = srcImage.getWidth();
|
||||
int height = srcImage.getHeight();
|
||||
int pixelFormat;
|
||||
boolean intPixels = false;
|
||||
if (byteOrder == null)
|
||||
byteOrder = ByteOrder.nativeOrder();
|
||||
switch(srcImage.getType()) {
|
||||
case BufferedImage.TYPE_3BYTE_BGR:
|
||||
pixelFormat = TJ.PF_BGR; break;
|
||||
case BufferedImage.TYPE_4BYTE_ABGR:
|
||||
case BufferedImage.TYPE_4BYTE_ABGR_PRE:
|
||||
pixelFormat = TJ.PF_XBGR; break;
|
||||
case BufferedImage.TYPE_BYTE_GRAY:
|
||||
pixelFormat = TJ.PF_GRAY; break;
|
||||
case BufferedImage.TYPE_INT_BGR:
|
||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
||||
pixelFormat = TJ.PF_XBGR;
|
||||
else
|
||||
pixelFormat = TJ.PF_RGBX;
|
||||
intPixels = true; break;
|
||||
case BufferedImage.TYPE_INT_RGB:
|
||||
case BufferedImage.TYPE_INT_ARGB:
|
||||
case BufferedImage.TYPE_INT_ARGB_PRE:
|
||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
||||
pixelFormat = TJ.PF_XRGB;
|
||||
else
|
||||
pixelFormat = TJ.PF_BGRX;
|
||||
intPixels = true; break;
|
||||
default:
|
||||
throw new Exception("Unsupported BufferedImage format");
|
||||
throws TJException {
|
||||
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||
compress(dstBuf, flags);
|
||||
}
|
||||
WritableRaster wr = srcImage.getRaster();
|
||||
if (jpegQuality < 0)
|
||||
throw new Exception("JPEG Quality not set");
|
||||
if (subsamp < 0)
|
||||
throw new Exception("Subsampling level not set");
|
||||
if (intPixels) {
|
||||
SinglePixelPackedSampleModel sm =
|
||||
(SinglePixelPackedSampleModel)srcImage.getSampleModel();
|
||||
int stride = sm.getScanlineStride();
|
||||
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
||||
int[] buf = db.getData();
|
||||
if (srcX >= 0 && srcY >= 0)
|
||||
compressedSize = compress(buf, srcX, srcY, width, stride, height,
|
||||
pixelFormat, dstBuf, subsamp, jpegQuality,
|
||||
flags);
|
||||
else
|
||||
compressedSize = compress(buf, width, stride, height, pixelFormat,
|
||||
dstBuf, subsamp, jpegQuality, flags);
|
||||
|
||||
/**
|
||||
* @deprecated Use
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||
* {@link #compress(int)} instead.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public byte[] compress(BufferedImage srcImage, int flags)
|
||||
throws TJException {
|
||||
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||
return compress(flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode the uncompressed source image associated with this compressor
|
||||
* instance into a YUV planar image and store it in the given
|
||||
* <code>YUVImage</code> instance. This method uses the accelerated color
|
||||
* conversion routines in TurboJPEG's underlying codec but does not execute
|
||||
* any of the other steps in the JPEG compression process. Encoding
|
||||
* CMYK source images to YUV is not supported.
|
||||
*
|
||||
* @param dstImage {@link YUVImage} instance that will receive the YUV planar
|
||||
* image
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public void encodeYUV(YUVImage dstImage, int flags) throws TJException {
|
||||
if (dstImage == null || flags < 0)
|
||||
throw new IllegalArgumentException("Invalid argument in encodeYUV()");
|
||||
if (srcBuf == null && srcBufInt == null)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
if (srcYUVImage != null)
|
||||
throw new IllegalStateException("Source image is not correct type");
|
||||
checkSubsampling();
|
||||
if (srcWidth != dstImage.getWidth() || srcHeight != dstImage.getHeight())
|
||||
throw new IllegalStateException("Destination image is the wrong size");
|
||||
|
||||
if (srcBufInt != null) {
|
||||
encodeYUV(srcBufInt, srcX, srcY, srcWidth, srcStride, srcHeight,
|
||||
srcPixelFormat, dstImage.getPlanes(), dstImage.getOffsets(),
|
||||
dstImage.getStrides(), dstImage.getSubsamp(), flags);
|
||||
} else {
|
||||
ComponentSampleModel sm =
|
||||
(ComponentSampleModel)srcImage.getSampleModel();
|
||||
int pixelSize = sm.getPixelStride();
|
||||
if (pixelSize != TJ.getPixelSize(pixelFormat))
|
||||
throw new Exception("Inconsistency between pixel format and pixel size in BufferedImage");
|
||||
int pitch = sm.getScanlineStride();
|
||||
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
||||
byte[] buf = db.getData();
|
||||
if (srcX >= 0 && srcY >= 0)
|
||||
compressedSize = compress(buf, srcX, srcY, width, pitch, height,
|
||||
pixelFormat, dstBuf, subsamp, jpegQuality,
|
||||
flags);
|
||||
else
|
||||
compressedSize = compress(buf, width, pitch, height, pixelFormat,
|
||||
dstBuf, subsamp, jpegQuality, flags);
|
||||
encodeYUV(srcBuf, srcX, srcY, srcWidth, srcPitch, srcHeight,
|
||||
srcPixelFormat, dstImage.getPlanes(), dstImage.getOffsets(),
|
||||
dstImage.getStrides(), dstImage.getSubsamp(), flags);
|
||||
}
|
||||
compressedSize = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compress the uncompressed source image stored in <code>srcImage</code>
|
||||
* and return a buffer containing a JPEG image.
|
||||
*
|
||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
||||
* grayscale pixels to be compressed
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a buffer containing a JPEG image. The length of this buffer will
|
||||
* not be equal to the size of the JPEG image. Use {@link
|
||||
* #getCompressedSize} to obtain the size of the JPEG image.
|
||||
* @deprecated Use {@link #encodeYUV(YUVImage, int)} instead.
|
||||
*/
|
||||
public byte[] compress(BufferedImage srcImage, int flags) throws Exception {
|
||||
int width = srcImage.getWidth();
|
||||
int height = srcImage.getHeight();
|
||||
byte[] buf = new byte[TJ.bufSize(width, height, subsamp)];
|
||||
compress(srcImage, buf, flags);
|
||||
return buf;
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public void encodeYUV(byte[] dstBuf, int flags) throws TJException {
|
||||
if (dstBuf == null)
|
||||
throw new IllegalArgumentException("Invalid argument in encodeYUV()");
|
||||
checkSourceImage();
|
||||
checkSubsampling();
|
||||
YUVImage dstYUVImage = new YUVImage(dstBuf, srcWidth, 4, srcHeight,
|
||||
subsamp);
|
||||
encodeYUV(dstYUVImage, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode the uncompressed source image associated with this compressor
|
||||
* instance and output a YUV planar image to the given destination buffer.
|
||||
* This method uses the accelerated color conversion routines in
|
||||
* TurboJPEG's underlying codec to produce a planar YUV image that is
|
||||
* suitable for direct video display. Specifically, if the chrominance
|
||||
* components are subsampled along the horizontal dimension, then the width
|
||||
* of the luminance plane is padded to the nearest multiple of 2 in the
|
||||
* output image (same goes for the height of the luminance plane, if the
|
||||
* chrominance components are subsampled along the vertical dimension.)
|
||||
* Also, each line of each plane in the output image is padded to 4 bytes.
|
||||
* Although this will work with any subsampling option, it is really only
|
||||
* useful in combination with {@link TJ#SAMP_420}, which produces an image
|
||||
* compatible with the I420 (AKA "YUV420P") format.
|
||||
* <p>
|
||||
* NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the
|
||||
* convention of the digital video community, the TurboJPEG API uses "YUV" to
|
||||
* refer to an image format consisting of Y, Cb, and Cr image planes.
|
||||
* instance into a unified YUV planar image buffer and return a
|
||||
* <code>YUVImage</code> instance containing the encoded image. This method
|
||||
* uses the accelerated color conversion routines in TurboJPEG's underlying
|
||||
* codec but does not execute any of the other steps in the JPEG compression
|
||||
* process. Encoding CMYK source images to YUV is not supported.
|
||||
*
|
||||
* @param dstBuf buffer that will receive the YUV planar image. Use
|
||||
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
|
||||
* based on the image width, height, and level of chrominance subsampling.
|
||||
* @param pad the width of each line in each plane of the YUV image will be
|
||||
* padded to the nearest multiple of this number of bytes (must be a power of
|
||||
* 2.)
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a YUV planar image.
|
||||
*/
|
||||
public void encodeYUV(byte[] dstBuf, int flags) throws Exception {
|
||||
if (dstBuf == null || flags < 0)
|
||||
throw new Exception("Invalid argument in compress()");
|
||||
if (srcBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (subsamp < 0)
|
||||
throw new Exception("Subsampling level not set");
|
||||
encodeYUV(srcBuf, srcWidth, srcPitch, srcHeight,
|
||||
srcPixelFormat, dstBuf, subsamp, flags);
|
||||
compressedSize = TJ.bufSizeYUV(srcWidth, srcHeight, subsamp);
|
||||
public YUVImage encodeYUV(int pad, int flags) throws TJException {
|
||||
checkSourceImage();
|
||||
checkSubsampling();
|
||||
if (pad < 1 || ((pad & (pad - 1)) != 0))
|
||||
throw new IllegalStateException("Invalid argument in encodeYUV()");
|
||||
YUVImage dstYUVImage = new YUVImage(srcWidth, pad, srcHeight, subsamp);
|
||||
encodeYUV(dstYUVImage, flags);
|
||||
return dstYUVImage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode the uncompressed source image associated with this compressor
|
||||
* instance and return a buffer containing a YUV planar image. See
|
||||
* {@link #encodeYUV(byte[], int)} for more detail.
|
||||
* instance into separate Y, U (Cb), and V (Cr) image planes and return a
|
||||
* <code>YUVImage</code> instance containing the encoded image planes. This
|
||||
* method uses the accelerated color conversion routines in TurboJPEG's
|
||||
* underlying codec but does not execute any of the other steps in the JPEG
|
||||
* compression process. Encoding CMYK source images to YUV is not supported.
|
||||
*
|
||||
* @param strides an array of integers, each specifying the number of bytes
|
||||
* per line in the corresponding plane of the output image. Setting the
|
||||
* stride for any plane to 0 is the same as setting it to the component width
|
||||
* of the plane. If <code>strides</code> is null, then the strides for all
|
||||
* planes will be set to their respective component widths. You can adjust
|
||||
* the strides in order to add an arbitrary amount of line padding to each
|
||||
* plane.
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a buffer containing a YUV planar image
|
||||
* @return a YUV planar image.
|
||||
*/
|
||||
public byte[] encodeYUV(int flags) throws Exception {
|
||||
if (srcWidth < 1 || srcHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (subsamp < 0)
|
||||
throw new Exception("Subsampling level not set");
|
||||
byte[] buf = new byte[TJ.bufSizeYUV(srcWidth, srcHeight, subsamp)];
|
||||
encodeYUV(buf, flags);
|
||||
return buf;
|
||||
public YUVImage encodeYUV(int[] strides, int flags) throws TJException {
|
||||
checkSourceImage();
|
||||
checkSubsampling();
|
||||
YUVImage dstYUVImage = new YUVImage(srcWidth, strides, srcHeight, subsamp);
|
||||
encodeYUV(dstYUVImage, flags);
|
||||
return dstYUVImage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode the uncompressed source image stored in <code>srcImage</code>
|
||||
* and output a YUV planar image to the given destination buffer. See
|
||||
* {@link #encodeYUV(byte[], int)} for more detail.
|
||||
*
|
||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
||||
* grayscale pixels to be encoded
|
||||
*
|
||||
* @param dstBuf buffer that will receive the YUV planar image. Use
|
||||
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
|
||||
* based on the image width, height, and level of chrominance subsampling.
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
* @deprecated Use {@link #encodeYUV(int, int)} instead.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public byte[] encodeYUV(int flags) throws TJException {
|
||||
checkSourceImage();
|
||||
checkSubsampling();
|
||||
YUVImage dstYUVImage = new YUVImage(srcWidth, 4, srcHeight, subsamp);
|
||||
encodeYUV(dstYUVImage, flags);
|
||||
return dstYUVImage.getBuf();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||
* {@link #encodeYUV(byte[], int)} instead.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public void encodeYUV(BufferedImage srcImage, byte[] dstBuf, int flags)
|
||||
throws Exception {
|
||||
if (srcImage == null || dstBuf == null || flags < 0)
|
||||
throw new Exception("Invalid argument in encodeYUV()");
|
||||
int width = srcImage.getWidth();
|
||||
int height = srcImage.getHeight();
|
||||
int pixelFormat; boolean intPixels = false;
|
||||
if (byteOrder == null)
|
||||
byteOrder = ByteOrder.nativeOrder();
|
||||
switch(srcImage.getType()) {
|
||||
case BufferedImage.TYPE_3BYTE_BGR:
|
||||
pixelFormat = TJ.PF_BGR; break;
|
||||
case BufferedImage.TYPE_4BYTE_ABGR:
|
||||
case BufferedImage.TYPE_4BYTE_ABGR_PRE:
|
||||
pixelFormat = TJ.PF_XBGR; break;
|
||||
case BufferedImage.TYPE_BYTE_GRAY:
|
||||
pixelFormat = TJ.PF_GRAY; break;
|
||||
case BufferedImage.TYPE_INT_BGR:
|
||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
||||
pixelFormat = TJ.PF_XBGR;
|
||||
else
|
||||
pixelFormat = TJ.PF_RGBX;
|
||||
intPixels = true; break;
|
||||
case BufferedImage.TYPE_INT_RGB:
|
||||
case BufferedImage.TYPE_INT_ARGB:
|
||||
case BufferedImage.TYPE_INT_ARGB_PRE:
|
||||
if (byteOrder == ByteOrder.BIG_ENDIAN)
|
||||
pixelFormat = TJ.PF_XRGB;
|
||||
else
|
||||
pixelFormat = TJ.PF_BGRX;
|
||||
intPixels = true; break;
|
||||
default:
|
||||
throw new Exception("Unsupported BufferedImage format");
|
||||
}
|
||||
WritableRaster wr = srcImage.getRaster();
|
||||
if (subsamp < 0) throw new Exception("Subsampling level not set");
|
||||
if (intPixels) {
|
||||
SinglePixelPackedSampleModel sm =
|
||||
(SinglePixelPackedSampleModel)srcImage.getSampleModel();
|
||||
int stride = sm.getScanlineStride();
|
||||
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
||||
int[] buf = db.getData();
|
||||
encodeYUV(buf, width, stride, height, pixelFormat, dstBuf, subsamp,
|
||||
flags);
|
||||
} else {
|
||||
ComponentSampleModel sm =
|
||||
(ComponentSampleModel)srcImage.getSampleModel();
|
||||
int pixelSize = sm.getPixelStride();
|
||||
if (pixelSize != TJ.getPixelSize(pixelFormat))
|
||||
throw new Exception("Inconsistency between pixel format and pixel size in BufferedImage");
|
||||
int pitch = sm.getScanlineStride();
|
||||
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
||||
byte[] buf = db.getData();
|
||||
encodeYUV(buf, width, pitch, height, pixelFormat, dstBuf, subsamp,
|
||||
flags);
|
||||
}
|
||||
compressedSize = TJ.bufSizeYUV(width, height, subsamp);
|
||||
throws TJException {
|
||||
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||
encodeYUV(dstBuf, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode the uncompressed source image stored in <code>srcImage</code>
|
||||
* and return a buffer containing a YUV planar image. See
|
||||
* {@link #encodeYUV(byte[], int)} for more detail.
|
||||
*
|
||||
* @param srcImage a <code>BufferedImage</code> instance containing RGB or
|
||||
* grayscale pixels to be encoded
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a buffer containing a YUV planar image
|
||||
* @deprecated Use
|
||||
* {@link #setSourceImage(BufferedImage, int, int, int, int)} and
|
||||
* {@link #encodeYUV(int, int)} instead.
|
||||
*/
|
||||
public byte[] encodeYUV(BufferedImage srcImage, int flags) throws Exception {
|
||||
if (subsamp < 0)
|
||||
throw new Exception("Subsampling level not set");
|
||||
int width = srcImage.getWidth();
|
||||
int height = srcImage.getHeight();
|
||||
byte[] buf = new byte[TJ.bufSizeYUV(width, height, subsamp)];
|
||||
encodeYUV(srcImage, buf, flags);
|
||||
return buf;
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public byte[] encodeYUV(BufferedImage srcImage, int flags)
|
||||
throws TJException {
|
||||
setSourceImage(srcImage, 0, 0, 0, 0);
|
||||
return encodeYUV(flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the size of the image (in bytes) generated by the most recent
|
||||
* compress/encode operation.
|
||||
* compress operation.
|
||||
*
|
||||
* @return the size of the image (in bytes) generated by the most recent
|
||||
* compress/encode operation
|
||||
* compress operation.
|
||||
*/
|
||||
public int getCompressedSize() {
|
||||
return compressedSize;
|
||||
@@ -495,62 +570,108 @@ public class TJCompressor {
|
||||
/**
|
||||
* Free the native structures associated with this compressor instance.
|
||||
*/
|
||||
public void close() throws Exception {
|
||||
@Override
|
||||
public void close() throws TJException {
|
||||
if (handle != 0)
|
||||
destroy();
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:DesignForExtension")
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
try {
|
||||
close();
|
||||
} catch(Exception e) {
|
||||
} catch (TJException e) {
|
||||
} finally {
|
||||
super.finalize();
|
||||
}
|
||||
};
|
||||
|
||||
private native void init() throws Exception;
|
||||
private native void init() throws TJException;
|
||||
|
||||
private native void destroy() throws Exception;
|
||||
private native void destroy() throws TJException;
|
||||
|
||||
// JPEG size in bytes is returned
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
@Deprecated
|
||||
private native int compress(byte[] srcBuf, int width, int pitch,
|
||||
int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp, int jpegQual,
|
||||
int flags) throws Exception; // deprecated
|
||||
int height, int pixelFormat, byte[] jpegBuf, int jpegSubsamp, int jpegQual,
|
||||
int flags) throws TJException;
|
||||
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
private native int compress(byte[] srcBuf, int x, int y, int width,
|
||||
int pitch, int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp,
|
||||
int jpegQual, int flags) throws Exception;
|
||||
int pitch, int height, int pixelFormat, byte[] jpegBuf, int jpegSubsamp,
|
||||
int jpegQual, int flags) throws TJException;
|
||||
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
@Deprecated
|
||||
private native int compress(int[] srcBuf, int width, int stride,
|
||||
int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp, int jpegQual,
|
||||
int flags) throws Exception; // deprecated
|
||||
int height, int pixelFormat, byte[] jpegBuf, int jpegSubsamp, int jpegQual,
|
||||
int flags) throws TJException;
|
||||
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
private native int compress(int[] srcBuf, int x, int y, int width,
|
||||
int stride, int height, int pixelFormat, byte[] dstBuf, int jpegSubsamp,
|
||||
int jpegQual, int flags) throws Exception;
|
||||
int stride, int height, int pixelFormat, byte[] jpegBuf, int jpegSubsamp,
|
||||
int jpegQual, int flags) throws TJException;
|
||||
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
private native int compressFromYUV(byte[][] srcPlanes, int[] srcOffsets,
|
||||
int width, int[] srcStrides, int height, int subsamp, byte[] jpegBuf,
|
||||
int jpegQual, int flags)
|
||||
throws TJException;
|
||||
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
@Deprecated
|
||||
private native void encodeYUV(byte[] srcBuf, int width, int pitch,
|
||||
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
||||
throws Exception;
|
||||
throws TJException;
|
||||
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
private native void encodeYUV(byte[] srcBuf, int x, int y, int width,
|
||||
int pitch, int height, int pixelFormat, byte[][] dstPlanes,
|
||||
int[] dstOffsets, int[] dstStrides, int subsamp, int flags)
|
||||
throws TJException;
|
||||
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
@Deprecated
|
||||
private native void encodeYUV(int[] srcBuf, int width, int stride,
|
||||
int height, int pixelFormat, byte[] dstBuf, int subsamp, int flags)
|
||||
throws Exception;
|
||||
throws TJException;
|
||||
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
private native void encodeYUV(int[] srcBuf, int x, int y, int width,
|
||||
int srcStride, int height, int pixelFormat, byte[][] dstPlanes,
|
||||
int[] dstOffsets, int[] dstStrides, int subsamp, int flags)
|
||||
throws TJException;
|
||||
|
||||
static {
|
||||
TJLoader.load();
|
||||
}
|
||||
|
||||
private void checkSourceImage() {
|
||||
if (srcWidth < 1 || srcHeight < 1)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
}
|
||||
|
||||
private void checkSubsampling() {
|
||||
if (subsamp < 0)
|
||||
throw new IllegalStateException("Subsampling level not set");
|
||||
}
|
||||
|
||||
private long handle = 0;
|
||||
private byte[] srcBuf = null;
|
||||
private int[] srcBufInt = null;
|
||||
private int srcWidth = 0;
|
||||
private int srcHeight = 0;
|
||||
private int srcX = -1;
|
||||
private int srcY = -1;
|
||||
private int srcPitch = 0;
|
||||
private int srcStride = 0;
|
||||
private int srcPixelFormat = -1;
|
||||
private YUVImage srcYUVImage = null;
|
||||
private int subsamp = -1;
|
||||
private int jpegQuality = -1;
|
||||
private int compressedSize = 0;
|
||||
private int yuvPad = 4;
|
||||
private ByteOrder byteOrder = null;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -72,5 +72,5 @@ public interface TJCustomFilter {
|
||||
void customFilter(ShortBuffer coeffBuffer, Rectangle bufferRegion,
|
||||
Rectangle planeRegion, int componentID, int transformID,
|
||||
TJTransform transform)
|
||||
throws Exception;
|
||||
throws TJException;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C)2011-2014 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2015, 2018 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -30,11 +31,12 @@ package org.libjpegturbo.turbojpeg;
|
||||
|
||||
import java.awt.image.*;
|
||||
import java.nio.*;
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* TurboJPEG decompressor
|
||||
*/
|
||||
public class TJDecompressor {
|
||||
public class TJDecompressor implements Closeable {
|
||||
|
||||
private static final String NO_ASSOC_ERROR =
|
||||
"No JPEG image is associated with this instance";
|
||||
@@ -42,34 +44,48 @@ public class TJDecompressor {
|
||||
/**
|
||||
* Create a TurboJPEG decompresssor instance.
|
||||
*/
|
||||
public TJDecompressor() throws Exception {
|
||||
public TJDecompressor() throws TJException {
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a TurboJPEG decompressor instance and associate the JPEG image
|
||||
* stored in <code>jpegImage</code> with the newly created instance.
|
||||
* Create a TurboJPEG decompressor instance and associate the JPEG source
|
||||
* image stored in <code>jpegImage</code> with the newly created instance.
|
||||
*
|
||||
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
||||
* be the length of the array)
|
||||
* be the length of the array.) This buffer is not modified.
|
||||
*/
|
||||
public TJDecompressor(byte[] jpegImage) throws Exception {
|
||||
public TJDecompressor(byte[] jpegImage) throws TJException {
|
||||
init();
|
||||
setJPEGImage(jpegImage, jpegImage.length);
|
||||
setSourceImage(jpegImage, jpegImage.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a TurboJPEG decompressor instance and associate the JPEG image
|
||||
* of length <code>imageSize</code> bytes stored in <code>jpegImage</code>
|
||||
* with the newly created instance.
|
||||
* Create a TurboJPEG decompressor instance and associate the JPEG source
|
||||
* image of length <code>imageSize</code> bytes stored in
|
||||
* <code>jpegImage</code> with the newly created instance.
|
||||
*
|
||||
* @param jpegImage JPEG image buffer
|
||||
* @param jpegImage JPEG image buffer. This buffer is not modified.
|
||||
*
|
||||
* @param imageSize size of the JPEG image (in bytes)
|
||||
*/
|
||||
public TJDecompressor(byte[] jpegImage, int imageSize) throws Exception {
|
||||
public TJDecompressor(byte[] jpegImage, int imageSize) throws TJException {
|
||||
init();
|
||||
setJPEGImage(jpegImage, imageSize);
|
||||
setSourceImage(jpegImage, imageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a TurboJPEG decompressor instance and associate the YUV planar
|
||||
* source image stored in <code>yuvImage</code> with the newly created
|
||||
* instance.
|
||||
*
|
||||
* @param yuvImage {@link YUVImage} instance containing a YUV planar
|
||||
* image to be decoded. This image is not modified.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
public TJDecompressor(YUVImage yuvImage) throws TJException {
|
||||
init();
|
||||
setSourceImage(yuvImage);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -77,67 +93,121 @@ public class TJDecompressor {
|
||||
* <code>jpegImage</code> with this decompressor instance. This image will
|
||||
* be used as the source image for subsequent decompress operations.
|
||||
*
|
||||
* @param jpegImage JPEG image buffer
|
||||
* @param jpegImage JPEG image buffer. This buffer is not modified.
|
||||
*
|
||||
* @param imageSize size of the JPEG image (in bytes)
|
||||
*/
|
||||
public void setJPEGImage(byte[] jpegImage, int imageSize) throws Exception {
|
||||
public void setSourceImage(byte[] jpegImage, int imageSize)
|
||||
throws TJException {
|
||||
if (jpegImage == null || imageSize < 1)
|
||||
throw new Exception("Invalid argument in setJPEGImage()");
|
||||
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||
jpegBuf = jpegImage;
|
||||
jpegBufSize = imageSize;
|
||||
decompressHeader(jpegBuf, jpegBufSize);
|
||||
yuvImage = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the JPEG image associated with this decompressor
|
||||
* instance.
|
||||
*
|
||||
* @return the width of the JPEG image associated with this decompressor
|
||||
* instance
|
||||
* @deprecated Use {@link #setSourceImage(byte[], int)} instead.
|
||||
*/
|
||||
public int getWidth() throws Exception {
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public void setJPEGImage(byte[] jpegImage, int imageSize)
|
||||
throws TJException {
|
||||
setSourceImage(jpegImage, imageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate the specified YUV planar source image with this decompressor
|
||||
* instance. Subsequent decompress operations will decode this image into an
|
||||
* RGB or grayscale destination image.
|
||||
*
|
||||
* @param srcImage {@link YUVImage} instance containing a YUV planar image to
|
||||
* be decoded. This image is not modified.
|
||||
*/
|
||||
public void setSourceImage(YUVImage srcImage) {
|
||||
if (srcImage == null)
|
||||
throw new IllegalArgumentException("Invalid argument in setSourceImage()");
|
||||
yuvImage = srcImage;
|
||||
jpegBuf = null;
|
||||
jpegBufSize = 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the width of the source image (JPEG or YUV) associated with this
|
||||
* decompressor instance.
|
||||
*
|
||||
* @return the width of the source image (JPEG or YUV) associated with this
|
||||
* decompressor instance.
|
||||
*/
|
||||
public int getWidth() {
|
||||
if (yuvImage != null)
|
||||
return yuvImage.getWidth();
|
||||
if (jpegWidth < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
return jpegWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the JPEG image associated with this decompressor
|
||||
* instance.
|
||||
* Returns the height of the source image (JPEG or YUV) associated with this
|
||||
* decompressor instance.
|
||||
*
|
||||
* @return the height of the JPEG image associated with this decompressor
|
||||
* instance
|
||||
* @return the height of the source image (JPEG or YUV) associated with this
|
||||
* decompressor instance.
|
||||
*/
|
||||
public int getHeight() throws Exception {
|
||||
public int getHeight() {
|
||||
if (yuvImage != null)
|
||||
return yuvImage.getHeight();
|
||||
if (jpegHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
return jpegHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the level of chrominance subsampling used in the JPEG image
|
||||
* associated with this decompressor instance. See {@link TJ TJ.SAMP_*}.
|
||||
* Returns the level of chrominance subsampling used in the source image
|
||||
* (JPEG or YUV) associated with this decompressor instance. See
|
||||
* {@link TJ#SAMP_444 TJ.SAMP_*}.
|
||||
*
|
||||
* @return the level of chrominance subsampling used in the JPEG image
|
||||
* associated with this decompressor instance
|
||||
* @return the level of chrominance subsampling used in the source image
|
||||
* (JPEG or YUV) associated with this decompressor instance.
|
||||
*/
|
||||
public int getSubsamp() throws Exception {
|
||||
public int getSubsamp() {
|
||||
if (yuvImage != null)
|
||||
return yuvImage.getSubsamp();
|
||||
if (jpegSubsamp < 0)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
if (jpegSubsamp >= TJ.NUMSAMP)
|
||||
throw new Exception("JPEG header information is invalid");
|
||||
throw new IllegalStateException("JPEG header information is invalid");
|
||||
return jpegSubsamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the colorspace used in the source image (JPEG or YUV) associated
|
||||
* with this decompressor instance. See {@link TJ#CS_RGB TJ.CS_*}. If the
|
||||
* source image is YUV, then this always returns {@link TJ#CS_YCbCr}.
|
||||
*
|
||||
* @return the colorspace used in the source image (JPEG or YUV) associated
|
||||
* with this decompressor instance.
|
||||
*/
|
||||
public int getColorspace() {
|
||||
if (yuvImage != null)
|
||||
return TJ.CS_YCbCr;
|
||||
if (jpegColorspace < 0)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
if (jpegColorspace >= TJ.NUMCS)
|
||||
throw new IllegalStateException("JPEG header information is invalid");
|
||||
return jpegColorspace;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the JPEG image buffer associated with this decompressor instance.
|
||||
*
|
||||
* @return the JPEG image buffer associated with this decompressor instance
|
||||
* @return the JPEG image buffer associated with this decompressor instance.
|
||||
*/
|
||||
public byte[] getJPEGBuf() throws Exception {
|
||||
public byte[] getJPEGBuf() {
|
||||
if (jpegBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
return jpegBuf;
|
||||
}
|
||||
|
||||
@@ -146,11 +216,11 @@ public class TJDecompressor {
|
||||
* decompressor instance.
|
||||
*
|
||||
* @return the size of the JPEG image (in bytes) associated with this
|
||||
* decompressor instance
|
||||
* decompressor instance.
|
||||
*/
|
||||
public int getJPEGSize() throws Exception {
|
||||
public int getJPEGSize() {
|
||||
if (jpegBufSize < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
return jpegBufSize;
|
||||
}
|
||||
|
||||
@@ -171,14 +241,13 @@ public class TJDecompressor {
|
||||
*
|
||||
* @return the width of the largest scaled-down image that the TurboJPEG
|
||||
* decompressor can generate without exceeding the desired image width and
|
||||
* height
|
||||
* height.
|
||||
*/
|
||||
public int getScaledWidth(int desiredWidth, int desiredHeight)
|
||||
throws Exception {
|
||||
public int getScaledWidth(int desiredWidth, int desiredHeight) {
|
||||
if (jpegWidth < 1 || jpegHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
if (desiredWidth < 0 || desiredHeight < 0)
|
||||
throw new Exception("Invalid argument in getScaledWidth()");
|
||||
throw new IllegalArgumentException("Invalid argument in getScaledWidth()");
|
||||
TJScalingFactor[] sf = TJ.getScalingFactors();
|
||||
if (desiredWidth == 0)
|
||||
desiredWidth = jpegWidth;
|
||||
@@ -192,7 +261,7 @@ public class TJDecompressor {
|
||||
break;
|
||||
}
|
||||
if (scaledWidth > desiredWidth || scaledHeight > desiredHeight)
|
||||
throw new Exception("Could not scale down to desired image dimensions");
|
||||
throw new IllegalArgumentException("Could not scale down to desired image dimensions");
|
||||
return scaledWidth;
|
||||
}
|
||||
|
||||
@@ -213,14 +282,13 @@ public class TJDecompressor {
|
||||
*
|
||||
* @return the height of the largest scaled-down image that the TurboJPEG
|
||||
* decompressor can generate without exceeding the desired image width and
|
||||
* height
|
||||
* height.
|
||||
*/
|
||||
public int getScaledHeight(int desiredWidth, int desiredHeight)
|
||||
throws Exception {
|
||||
public int getScaledHeight(int desiredWidth, int desiredHeight) {
|
||||
if (jpegWidth < 1 || jpegHeight < 1)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
if (desiredWidth < 0 || desiredHeight < 0)
|
||||
throw new Exception("Invalid argument in getScaledHeight()");
|
||||
throw new IllegalArgumentException("Invalid argument in getScaledHeight()");
|
||||
TJScalingFactor[] sf = TJ.getScalingFactors();
|
||||
if (desiredWidth == 0)
|
||||
desiredWidth = jpegWidth;
|
||||
@@ -234,57 +302,71 @@ public class TJDecompressor {
|
||||
break;
|
||||
}
|
||||
if (scaledWidth > desiredWidth || scaledHeight > desiredHeight)
|
||||
throw new Exception("Could not scale down to desired image dimensions");
|
||||
throw new IllegalArgumentException("Could not scale down to desired image dimensions");
|
||||
return scaledHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance and output a decompressed image to the given destination buffer.
|
||||
* Decompress the JPEG source image or decode the YUV source image associated
|
||||
* with this decompressor instance and output a grayscale, RGB, or CMYK image
|
||||
* to the given destination buffer.
|
||||
* <p>
|
||||
* NOTE: The output image is fully recoverable if this method throws a
|
||||
* non-fatal {@link TJException} (unless
|
||||
* {@link TJ#FLAG_STOPONWARNING TJ.FLAG_STOPONWARNING} is specified.)
|
||||
*
|
||||
* @param dstBuf buffer that will receive the decompressed image. This
|
||||
* buffer should normally be <code>pitch * scaledHeight</code> bytes in size,
|
||||
* where <code>scaledHeight</code> can be determined by calling <code>
|
||||
* @param dstBuf buffer that will receive the decompressed/decoded image.
|
||||
* If the source image is a JPEG image, then this buffer should normally be
|
||||
* <code>pitch * scaledHeight</code> bytes in size, where
|
||||
* <code>scaledHeight</code> can be determined by calling <code>
|
||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegHeight)
|
||||
* </code> with one of the scaling factors returned from {@link
|
||||
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. However,
|
||||
* the buffer may also be larger than the dimensions of the JPEG image, in
|
||||
* which case the <code>x</code>, <code>y</code>, and <code>pitch</code>
|
||||
* parameters can be used to specify the region into which the JPEG image
|
||||
* should be decompressed.
|
||||
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. If the
|
||||
* source image is a YUV image, then this buffer should normally be
|
||||
* <code>pitch * height</code> bytes in size, where <code>height</code> is
|
||||
* the height of the YUV image. However, the buffer may also be larger than
|
||||
* the dimensions of the source image, in which case the <code>x</code>,
|
||||
* <code>y</code>, and <code>pitch</code> parameters can be used to specify
|
||||
* the region into which the source image should be decompressed/decoded.
|
||||
*
|
||||
* @param x x offset (in pixels) of the region into which the JPEG image
|
||||
* should be decompressed, relative to the start of <code>dstBuf</code>.
|
||||
* @param x x offset (in pixels) of the region in the destination image into
|
||||
* which the source image should be decompressed/decoded
|
||||
*
|
||||
* @param y y offset (in pixels) of the region into which the JPEG image
|
||||
* should be decompressed, relative to the start of <code>dstBuf</code>.
|
||||
* @param y y offset (in pixels) of the region in the destination image into
|
||||
* which the source image should be decompressed/decoded
|
||||
*
|
||||
* @param desiredWidth desired width (in pixels) of the decompressed image
|
||||
* (or image region.) If the desired image dimensions are different than the
|
||||
* dimensions of the JPEG image being decompressed, then TurboJPEG will use
|
||||
* scaling in the JPEG decompressor to generate the largest possible image
|
||||
* that will fit within the desired dimensions. Setting this to 0 is the
|
||||
* same as setting it to the width of the JPEG image (in other words, the
|
||||
* width will not be considered when determining the scaled image size.)
|
||||
* @param desiredWidth If the source image is a JPEG image, then this
|
||||
* specifies the desired width (in pixels) of the decompressed image (or
|
||||
* image region.) If the desired destination image dimensions are different
|
||||
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||
* JPEG decompressor to generate the largest possible image that will fit
|
||||
* within the desired dimensions. Setting this to 0 is the same as setting
|
||||
* it to the width of the JPEG image (in other words, the width will not be
|
||||
* considered when determining the scaled image size.) This parameter is
|
||||
* ignored if the source image is a YUV image.
|
||||
*
|
||||
* @param pitch bytes per line of the destination image. Normally, this
|
||||
* should be set to <code>scaledWidth * TJ.pixelSize(pixelFormat)</code> if
|
||||
* the decompressed image is unpadded, but you can use this to, for instance,
|
||||
* pad each line of the decompressed image to a 4-byte boundary or to
|
||||
* decompress the JPEG image into a region of a larger image. NOTE:
|
||||
* <code>scaledWidth</code> can be determined by calling <code>
|
||||
* the destination image is unpadded, but you can use this to, for instance,
|
||||
* pad each line of the destination image to a 4-byte boundary or to
|
||||
* decompress/decode the source image into a region of a larger image. NOTE:
|
||||
* if the source image is a JPEG image, then <code>scaledWidth</code> can be
|
||||
* determined by calling <code>
|
||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegWidth)
|
||||
* </code> or by calling {@link #getScaledWidth}. Setting this parameter to
|
||||
* 0 is the equivalent of setting it to <code>scaledWidth *
|
||||
* TJ.pixelSize(pixelFormat)</code>.
|
||||
* </code> or by calling {@link #getScaledWidth}. If the source image is a
|
||||
* YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
||||
* Setting this parameter to 0 is the equivalent of setting it to
|
||||
* <code>scaledWidth * TJ.pixelSize(pixelFormat)</code>.
|
||||
*
|
||||
* @param desiredHeight desired height (in pixels) of the decompressed image
|
||||
* (or image region.) If the desired image dimensions are different than the
|
||||
* dimensions of the JPEG image being decompressed, then TurboJPEG will use
|
||||
* scaling in the JPEG decompressor to generate the largest possible image
|
||||
* that will fit within the desired dimensions. Setting this to 0 is the
|
||||
* same as setting it to the height of the JPEG image (in other words, the
|
||||
* height will not be considered when determining the scaled image size.)
|
||||
* @param desiredHeight If the source image is a JPEG image, then this
|
||||
* specifies the desired height (in pixels) of the decompressed image (or
|
||||
* image region.) If the desired destination image dimensions are different
|
||||
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||
* JPEG decompressor to generate the largest possible image that will fit
|
||||
* within the desired dimensions. Setting this to 0 is the same as setting
|
||||
* it to the height of the JPEG image (in other words, the height will not be
|
||||
* considered when determining the scaled image size.) This parameter is
|
||||
* ignored if the source image is a YUV image.
|
||||
*
|
||||
* @param pixelFormat pixel format of the decompressed/decoded image (one of
|
||||
* {@link TJ#PF_RGB TJ.PF_*})
|
||||
@@ -294,13 +376,19 @@ public class TJDecompressor {
|
||||
*/
|
||||
public void decompress(byte[] dstBuf, int x, int y, int desiredWidth,
|
||||
int pitch, int desiredHeight, int pixelFormat,
|
||||
int flags) throws Exception {
|
||||
if (jpegBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (dstBuf == null || x < 0 || y < 0 || desiredWidth < 0 || pitch < 0 ||
|
||||
desiredHeight < 0 || pixelFormat < 0 || pixelFormat >= TJ.NUMPF ||
|
||||
flags < 0)
|
||||
throw new Exception("Invalid argument in decompress()");
|
||||
int flags) throws TJException {
|
||||
if (jpegBuf == null && yuvImage == null)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
if (dstBuf == null || x < 0 || y < 0 || pitch < 0 ||
|
||||
(yuvImage != null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||
throw new IllegalArgumentException("Invalid argument in decompress()");
|
||||
if (yuvImage != null)
|
||||
decodeYUV(yuvImage.getPlanes(), yuvImage.getOffsets(),
|
||||
yuvImage.getStrides(), yuvImage.getSubsamp(), dstBuf, x, y,
|
||||
yuvImage.getWidth(), pitch, yuvImage.getHeight(), pixelFormat,
|
||||
flags);
|
||||
else {
|
||||
if (x > 0 || y > 0)
|
||||
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, pitch,
|
||||
desiredHeight, pixelFormat, flags);
|
||||
@@ -308,15 +396,17 @@ public class TJDecompressor {
|
||||
decompress(jpegBuf, jpegBufSize, dstBuf, desiredWidth, pitch,
|
||||
desiredHeight, pixelFormat, flags);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use
|
||||
* {@link #decompress(byte[], int, int, int, int, int, int, int)} instead.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public void decompress(byte[] dstBuf, int desiredWidth, int pitch,
|
||||
int desiredHeight, int pixelFormat, int flags)
|
||||
throws Exception {
|
||||
throws TJException {
|
||||
decompress(dstBuf, 0, 0, desiredWidth, pitch, desiredHeight, pixelFormat,
|
||||
flags);
|
||||
}
|
||||
@@ -343,13 +433,14 @@ public class TJDecompressor {
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a buffer containing the decompressed image
|
||||
* @return a buffer containing the decompressed image.
|
||||
*/
|
||||
public byte[] decompress(int desiredWidth, int pitch, int desiredHeight,
|
||||
int pixelFormat, int flags) throws Exception {
|
||||
if (desiredWidth < 0 || pitch < 0 || desiredHeight < 0 ||
|
||||
int pixelFormat, int flags) throws TJException {
|
||||
if (pitch < 0 ||
|
||||
(yuvImage == null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||
throw new Exception("Invalid argument in decompress()");
|
||||
throw new IllegalArgumentException("Invalid argument in decompress()");
|
||||
int pixelSize = TJ.getPixelSize(pixelFormat);
|
||||
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||
@@ -362,98 +453,239 @@ public class TJDecompressor {
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance and output a YUV planar image to the given destination buffer.
|
||||
* This method performs JPEG decompression but leaves out the color
|
||||
* conversion step, so a planar YUV image is generated instead of an RGB
|
||||
* image. The padding of the planes in this image is the same as in the
|
||||
* images generated by {@link TJCompressor#encodeYUV(byte[], int)}.
|
||||
* instance into a YUV planar image and store it in the given
|
||||
* <code>YUVImage</code> instance. This method performs JPEG decompression
|
||||
* but leaves out the color conversion step, so a planar YUV image is
|
||||
* generated instead of an RGB or grayscale image. This method cannot be
|
||||
* used to decompress JPEG source images with the CMYK or YCCK colorspace.
|
||||
* <p>
|
||||
* NOTE: Technically, the JPEG format uses the YCbCr colorspace, but per the
|
||||
* convention of the digital video community, the TurboJPEG API uses "YUV" to
|
||||
* refer to an image format consisting of Y, Cb, and Cr image planes.
|
||||
* NOTE: The YUV planar output image is fully recoverable if this method
|
||||
* throws a non-fatal {@link TJException} (unless
|
||||
* {@link TJ#FLAG_STOPONWARNING TJ.FLAG_STOPONWARNING} is specified.)
|
||||
*
|
||||
* @param dstBuf buffer that will receive the YUV planar image. Use
|
||||
* {@link TJ#bufSizeYUV} to determine the appropriate size for this buffer
|
||||
* based on the image width, height, and level of chrominance subsampling.
|
||||
* @param dstImage {@link YUVImage} instance that will receive the YUV planar
|
||||
* image. The level of subsampling specified in this <code>YUVImage</code>
|
||||
* instance must match that of the JPEG image, and the width and height
|
||||
* specified in the <code>YUVImage</code> instance must match one of the
|
||||
* scaled image sizes that TurboJPEG is capable of generating from the JPEG
|
||||
* source image.
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public void decompressToYUV(byte[] dstBuf, int flags) throws Exception {
|
||||
public void decompressToYUV(YUVImage dstImage, int flags)
|
||||
throws TJException {
|
||||
if (jpegBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (dstBuf == null || flags < 0)
|
||||
throw new Exception("Invalid argument in decompressToYUV()");
|
||||
decompressToYUV(jpegBuf, jpegBufSize, dstBuf, flags);
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
if (dstImage == null || flags < 0)
|
||||
throw new IllegalArgumentException("Invalid argument in decompressToYUV()");
|
||||
int scaledWidth = getScaledWidth(dstImage.getWidth(),
|
||||
dstImage.getHeight());
|
||||
int scaledHeight = getScaledHeight(dstImage.getWidth(),
|
||||
dstImage.getHeight());
|
||||
if (scaledWidth != dstImage.getWidth() ||
|
||||
scaledHeight != dstImage.getHeight())
|
||||
throw new IllegalArgumentException("YUVImage dimensions do not match one of the scaled image sizes that TurboJPEG is capable of generating.");
|
||||
if (jpegSubsamp != dstImage.getSubsamp())
|
||||
throw new IllegalArgumentException("YUVImage subsampling level does not match that of the JPEG image");
|
||||
|
||||
decompressToYUV(jpegBuf, jpegBufSize, dstImage.getPlanes(),
|
||||
dstImage.getOffsets(), dstImage.getWidth(),
|
||||
dstImage.getStrides(), dstImage.getHeight(), flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #decompressToYUV(YUVImage, int)} instead.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public void decompressToYUV(byte[] dstBuf, int flags) throws TJException {
|
||||
YUVImage dstYUVImage = new YUVImage(dstBuf, jpegWidth, 4, jpegHeight,
|
||||
jpegSubsamp);
|
||||
decompressToYUV(dstYUVImage, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance and return a buffer containing a YUV planar image. See {@link
|
||||
* #decompressToYUV(byte[], int)} for more detail.
|
||||
* instance into a set of Y, U (Cb), and V (Cr) image planes and return a
|
||||
* <code>YUVImage</code> instance containing the decompressed image planes.
|
||||
* This method performs JPEG decompression but leaves out the color
|
||||
* conversion step, so a planar YUV image is generated instead of an RGB or
|
||||
* grayscale image. This method cannot be used to decompress JPEG source
|
||||
* images with the CMYK or YCCK colorspace.
|
||||
*
|
||||
* @param desiredWidth desired width (in pixels) of the YUV image. If the
|
||||
* desired image dimensions are different than the dimensions of the JPEG
|
||||
* image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||
* decompressor to generate the largest possible image that will fit within
|
||||
* the desired dimensions. Setting this to 0 is the same as setting it to
|
||||
* the width of the JPEG image (in other words, the width will not be
|
||||
* considered when determining the scaled image size.)
|
||||
*
|
||||
* @param strides an array of integers, each specifying the number of bytes
|
||||
* per line in the corresponding plane of the output image. Setting the
|
||||
* stride for any plane to 0 is the same as setting it to the scaled
|
||||
* component width of the plane. If <tt>strides</tt> is NULL, then the
|
||||
* strides for all planes will be set to their respective scaled component
|
||||
* widths. You can adjust the strides in order to add an arbitrary amount of
|
||||
* line padding to each plane.
|
||||
*
|
||||
* @param desiredHeight desired height (in pixels) of the YUV image. If the
|
||||
* desired image dimensions are different than the dimensions of the JPEG
|
||||
* image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||
* decompressor to generate the largest possible image that will fit within
|
||||
* the desired dimensions. Setting this to 0 is the same as setting it to
|
||||
* the height of the JPEG image (in other words, the height will not be
|
||||
* considered when determining the scaled image size.)
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a buffer containing a YUV planar image
|
||||
* @return a YUV planar image.
|
||||
*/
|
||||
public byte[] decompressToYUV(int flags) throws Exception {
|
||||
public YUVImage decompressToYUV(int desiredWidth, int[] strides,
|
||||
int desiredHeight,
|
||||
int flags) throws TJException {
|
||||
if (flags < 0)
|
||||
throw new Exception("Invalid argument in decompressToYUV()");
|
||||
throw new IllegalArgumentException("Invalid argument in decompressToYUV()");
|
||||
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
if (jpegSubsamp >= TJ.NUMSAMP)
|
||||
throw new Exception("JPEG header information is invalid");
|
||||
byte[] buf = new byte[TJ.bufSizeYUV(jpegWidth, jpegHeight, jpegSubsamp)];
|
||||
decompressToYUV(buf, flags);
|
||||
return buf;
|
||||
throw new IllegalStateException("JPEG header information is invalid");
|
||||
if (yuvImage != null)
|
||||
throw new IllegalStateException("Source image is the wrong type");
|
||||
|
||||
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||
YUVImage dstYUVImage = new YUVImage(scaledWidth, null, scaledHeight,
|
||||
jpegSubsamp);
|
||||
decompressToYUV(dstYUVImage, flags);
|
||||
return dstYUVImage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance and output a decompressed image to the given destination buffer.
|
||||
* instance into a unified YUV planar image buffer and return a
|
||||
* <code>YUVImage</code> instance containing the decompressed image. This
|
||||
* method performs JPEG decompression but leaves out the color conversion
|
||||
* step, so a planar YUV image is generated instead of an RGB or grayscale
|
||||
* image. This method cannot be used to decompress JPEG source images with
|
||||
* the CMYK or YCCK colorspace.
|
||||
*
|
||||
* @param dstBuf buffer that will receive the decompressed image. This
|
||||
* buffer should normally be <code>stride * scaledHeight</code> pixels in
|
||||
* size, where <code>scaledHeight</code> can be determined by calling <code>
|
||||
* @param desiredWidth desired width (in pixels) of the YUV image. If the
|
||||
* desired image dimensions are different than the dimensions of the JPEG
|
||||
* image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||
* decompressor to generate the largest possible image that will fit within
|
||||
* the desired dimensions. Setting this to 0 is the same as setting it to
|
||||
* the width of the JPEG image (in other words, the width will not be
|
||||
* considered when determining the scaled image size.)
|
||||
*
|
||||
* @param pad the width of each line in each plane of the YUV image will be
|
||||
* padded to the nearest multiple of this number of bytes (must be a power of
|
||||
* 2.)
|
||||
*
|
||||
* @param desiredHeight desired height (in pixels) of the YUV image. If the
|
||||
* desired image dimensions are different than the dimensions of the JPEG
|
||||
* image being decompressed, then TurboJPEG will use scaling in the JPEG
|
||||
* decompressor to generate the largest possible image that will fit within
|
||||
* the desired dimensions. Setting this to 0 is the same as setting it to
|
||||
* the height of the JPEG image (in other words, the height will not be
|
||||
* considered when determining the scaled image size.)
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a YUV planar image.
|
||||
*/
|
||||
public YUVImage decompressToYUV(int desiredWidth, int pad, int desiredHeight,
|
||||
int flags) throws TJException {
|
||||
if (flags < 0)
|
||||
throw new IllegalArgumentException("Invalid argument in decompressToYUV()");
|
||||
if (jpegWidth < 1 || jpegHeight < 1 || jpegSubsamp < 0)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
if (jpegSubsamp >= TJ.NUMSAMP)
|
||||
throw new IllegalStateException("JPEG header information is invalid");
|
||||
if (yuvImage != null)
|
||||
throw new IllegalStateException("Source image is the wrong type");
|
||||
|
||||
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||
YUVImage dstYUVImage = new YUVImage(scaledWidth, pad, scaledHeight,
|
||||
jpegSubsamp);
|
||||
decompressToYUV(dstYUVImage, flags);
|
||||
return dstYUVImage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #decompressToYUV(int, int, int, int)} instead.
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
@Deprecated
|
||||
public byte[] decompressToYUV(int flags) throws TJException {
|
||||
YUVImage dstYUVImage = new YUVImage(jpegWidth, 4, jpegHeight, jpegSubsamp);
|
||||
decompressToYUV(dstYUVImage, flags);
|
||||
return dstYUVImage.getBuf();
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image or decode the YUV source image associated
|
||||
* with this decompressor instance and output a grayscale, RGB, or CMYK image
|
||||
* to the given destination buffer.
|
||||
* <p>
|
||||
* NOTE: The output image is fully recoverable if this method throws a
|
||||
* non-fatal {@link TJException} (unless
|
||||
* {@link TJ#FLAG_STOPONWARNING TJ.FLAG_STOPONWARNING} is specified.)
|
||||
*
|
||||
* @param dstBuf buffer that will receive the decompressed/decoded image.
|
||||
* If the source image is a JPEG image, then this buffer should normally be
|
||||
* <code>stride * scaledHeight</code> pixels in size, where
|
||||
* <code>scaledHeight</code> can be determined by calling <code>
|
||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegHeight)
|
||||
* </code> with one of the scaling factors returned from {@link
|
||||
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. However,
|
||||
* the buffer may also be larger than the dimensions of the JPEG image, in
|
||||
* which case the <code>x</code>, <code>y</code>, and <code>stride</code>
|
||||
* parameters can be used to specify the region into which the JPEG image
|
||||
* should be decompressed.
|
||||
* TJ#getScalingFactors} or by calling {@link #getScaledHeight}. If the
|
||||
* source image is a YUV image, then this buffer should normally be
|
||||
* <code>stride * height</code> pixels in size, where <code>height</code> is
|
||||
* the height of the YUV image. However, the buffer may also be larger than
|
||||
* the dimensions of the JPEG image, in which case the <code>x</code>,
|
||||
* <code>y</code>, and <code>stride</code> parameters can be used to specify
|
||||
* the region into which the source image should be decompressed.
|
||||
*
|
||||
* @param x x offset (in pixels) of the region into which the JPEG image
|
||||
* should be decompressed, relative to the start of <code>dstBuf</code>.
|
||||
* @param x x offset (in pixels) of the region in the destination image into
|
||||
* which the source image should be decompressed/decoded
|
||||
*
|
||||
* @param y y offset (in pixels) of the region into which the JPEG image
|
||||
* should be decompressed, relative to the start of <code>dstBuf</code>.
|
||||
* @param y y offset (in pixels) of the region in the destination image into
|
||||
* which the source image should be decompressed/decoded
|
||||
*
|
||||
* @param desiredWidth desired width (in pixels) of the decompressed image
|
||||
* (or image region.) If the desired image dimensions are different than the
|
||||
* dimensions of the JPEG image being decompressed, then TurboJPEG will use
|
||||
* scaling in the JPEG decompressor to generate the largest possible image
|
||||
* that will fit within the desired dimensions. Setting this to 0 is the
|
||||
* same as setting it to the width of the JPEG image (in other words, the
|
||||
* width will not be considered when determining the scaled image size.)
|
||||
* @param desiredWidth If the source image is a JPEG image, then this
|
||||
* specifies the desired width (in pixels) of the decompressed image (or
|
||||
* image region.) If the desired destination image dimensions are different
|
||||
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||
* JPEG decompressor to generate the largest possible image that will fit
|
||||
* within the desired dimensions. Setting this to 0 is the same as setting
|
||||
* it to the width of the JPEG image (in other words, the width will not be
|
||||
* considered when determining the scaled image size.) This parameter is
|
||||
* ignored if the source image is a YUV image.
|
||||
*
|
||||
* @param stride pixels per line of the destination image. Normally, this
|
||||
* should be set to <code>scaledWidth</code>, but you can use this to, for
|
||||
* instance, decompress the JPEG image into a region of a larger image.
|
||||
* NOTE: <code>scaledWidth</code> can be determined by calling <code>
|
||||
* NOTE: if the source image is a JPEG image, then <code>scaledWidth</code>
|
||||
* can be determined by calling <code>
|
||||
* scalingFactor.{@link TJScalingFactor#getScaled getScaled}(jpegWidth)
|
||||
* </code> or by calling {@link #getScaledWidth}. Setting this parameter to
|
||||
* 0 is the equivalent of setting it to <code>scaledWidth</code>.
|
||||
* </code> or by calling {@link #getScaledWidth}. If the source image is a
|
||||
* YUV image, then <code>scaledWidth</code> is the width of the YUV image.
|
||||
* Setting this parameter to 0 is the equivalent of setting it to
|
||||
* <code>scaledWidth</code>.
|
||||
*
|
||||
* @param desiredHeight desired height (in pixels) of the decompressed image
|
||||
* (or image region.) If the desired image dimensions are different than the
|
||||
* dimensions of the JPEG image being decompressed, then TurboJPEG will use
|
||||
* scaling in the JPEG decompressor to generate the largest possible image
|
||||
* that will fit within the desired dimensions. Setting this to 0 is the
|
||||
* same as setting it to the height of the JPEG image (in other words, the
|
||||
* height will not be considered when determining the scaled image size.)
|
||||
* @param desiredHeight If the source image is a JPEG image, then this
|
||||
* specifies the desired height (in pixels) of the decompressed image (or
|
||||
* image region.) If the desired destination image dimensions are different
|
||||
* than the source image dimensions, then TurboJPEG will use scaling in the
|
||||
* JPEG decompressor to generate the largest possible image that will fit
|
||||
* within the desired dimensions. Setting this to 0 is the same as setting
|
||||
* it to the height of the JPEG image (in other words, the height will not be
|
||||
* considered when determining the scaled image size.) This parameter is
|
||||
* ignored if the source image is a YUV image.
|
||||
*
|
||||
* @param pixelFormat pixel format of the decompressed image (one of
|
||||
* {@link TJ#PF_RGB TJ.PF_*})
|
||||
@@ -463,44 +695,67 @@ public class TJDecompressor {
|
||||
*/
|
||||
public void decompress(int[] dstBuf, int x, int y, int desiredWidth,
|
||||
int stride, int desiredHeight, int pixelFormat,
|
||||
int flags) throws Exception {
|
||||
if (jpegBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
if (dstBuf == null || x < 0 || y < 0 || desiredWidth < 0 || stride < 0 ||
|
||||
desiredHeight < 0 || pixelFormat < 0 || pixelFormat >= TJ.NUMPF ||
|
||||
flags < 0)
|
||||
throw new Exception("Invalid argument in decompress()");
|
||||
int flags) throws TJException {
|
||||
if (jpegBuf == null && yuvImage == null)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
if (dstBuf == null || x < 0 || y < 0 || stride < 0 ||
|
||||
(yuvImage != null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||
pixelFormat < 0 || pixelFormat >= TJ.NUMPF || flags < 0)
|
||||
throw new IllegalArgumentException("Invalid argument in decompress()");
|
||||
if (yuvImage != null)
|
||||
decodeYUV(yuvImage.getPlanes(), yuvImage.getOffsets(),
|
||||
yuvImage.getStrides(), yuvImage.getSubsamp(), dstBuf, x, y,
|
||||
yuvImage.getWidth(), stride, yuvImage.getHeight(), pixelFormat,
|
||||
flags);
|
||||
else
|
||||
decompress(jpegBuf, jpegBufSize, dstBuf, x, y, desiredWidth, stride,
|
||||
desiredHeight, pixelFormat, flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance and output a decompressed image to the given
|
||||
* <code>BufferedImage</code> instance.
|
||||
* Decompress the JPEG source image or decode the YUV source image associated
|
||||
* with this decompressor instance and output a decompressed/decoded image to
|
||||
* the given <code>BufferedImage</code> instance.
|
||||
* <p>
|
||||
* NOTE: The output image is fully recoverable if this method throws a
|
||||
* non-fatal {@link TJException} (unless
|
||||
* {@link TJ#FLAG_STOPONWARNING TJ.FLAG_STOPONWARNING} is specified.)
|
||||
*
|
||||
* @param dstImage a <code>BufferedImage</code> instance that will receive
|
||||
* the decompressed image. The width and height of the
|
||||
* <code>BufferedImage</code> instance must match one of the scaled image
|
||||
* sizes that TurboJPEG is capable of generating from the JPEG image.
|
||||
*
|
||||
* the decompressed/decoded image. If the source image is a JPEG image, then
|
||||
* the width and height of the <code>BufferedImage</code> instance must match
|
||||
* one of the scaled image sizes that TurboJPEG is capable of generating from
|
||||
* the JPEG image. If the source image is a YUV image, then the width and
|
||||
* height of the <code>BufferedImage</code> instance must match the width and
|
||||
* height of the YUV image.
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public void decompress(BufferedImage dstImage, int flags) throws Exception {
|
||||
public void decompress(BufferedImage dstImage, int flags)
|
||||
throws TJException {
|
||||
if (dstImage == null || flags < 0)
|
||||
throw new Exception("Invalid argument in decompress()");
|
||||
throw new IllegalArgumentException("Invalid argument in decompress()");
|
||||
int desiredWidth = dstImage.getWidth();
|
||||
int desiredHeight = dstImage.getHeight();
|
||||
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||
int scaledWidth, scaledHeight;
|
||||
|
||||
if (yuvImage != null) {
|
||||
if (desiredWidth != yuvImage.getWidth() ||
|
||||
desiredHeight != yuvImage.getHeight())
|
||||
throw new IllegalArgumentException("BufferedImage dimensions do not match the dimensions of the source image.");
|
||||
scaledWidth = yuvImage.getWidth();
|
||||
scaledHeight = yuvImage.getHeight();
|
||||
} else {
|
||||
scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||
scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||
if (scaledWidth != desiredWidth || scaledHeight != desiredHeight)
|
||||
throw new Exception("BufferedImage dimensions do not match one of the scaled image sizes that TurboJPEG is capable of generating.");
|
||||
throw new IllegalArgumentException("BufferedImage dimensions do not match one of the scaled image sizes that TurboJPEG is capable of generating.");
|
||||
}
|
||||
int pixelFormat; boolean intPixels = false;
|
||||
if (byteOrder == null)
|
||||
byteOrder = ByteOrder.nativeOrder();
|
||||
switch(dstImage.getType()) {
|
||||
switch (dstImage.getType()) {
|
||||
case BufferedImage.TYPE_3BYTE_BGR:
|
||||
pixelFormat = TJ.PF_BGR; break;
|
||||
case BufferedImage.TYPE_4BYTE_ABGR:
|
||||
@@ -528,7 +783,7 @@ public class TJDecompressor {
|
||||
pixelFormat = TJ.PF_BGRA;
|
||||
intPixels = true; break;
|
||||
default:
|
||||
throw new Exception("Unsupported BufferedImage format");
|
||||
throw new IllegalArgumentException("Unsupported BufferedImage format");
|
||||
}
|
||||
WritableRaster wr = dstImage.getRaster();
|
||||
if (intPixels) {
|
||||
@@ -537,27 +792,35 @@ public class TJDecompressor {
|
||||
int stride = sm.getScanlineStride();
|
||||
DataBufferInt db = (DataBufferInt)wr.getDataBuffer();
|
||||
int[] buf = db.getData();
|
||||
if (jpegBuf == null)
|
||||
throw new Exception(NO_ASSOC_ERROR);
|
||||
decompress(jpegBuf, jpegBufSize, buf, scaledWidth, stride, scaledHeight,
|
||||
if (yuvImage != null)
|
||||
decodeYUV(yuvImage.getPlanes(), yuvImage.getOffsets(),
|
||||
yuvImage.getStrides(), yuvImage.getSubsamp(), buf, 0, 0,
|
||||
yuvImage.getWidth(), stride, yuvImage.getHeight(),
|
||||
pixelFormat, flags);
|
||||
else {
|
||||
if (jpegBuf == null)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
decompress(jpegBuf, jpegBufSize, buf, 0, 0, scaledWidth, stride,
|
||||
scaledHeight, pixelFormat, flags);
|
||||
}
|
||||
} else {
|
||||
ComponentSampleModel sm =
|
||||
(ComponentSampleModel)dstImage.getSampleModel();
|
||||
int pixelSize = sm.getPixelStride();
|
||||
if (pixelSize != TJ.getPixelSize(pixelFormat))
|
||||
throw new Exception("Inconsistency between pixel format and pixel size in BufferedImage");
|
||||
throw new IllegalArgumentException("Inconsistency between pixel format and pixel size in BufferedImage");
|
||||
int pitch = sm.getScanlineStride();
|
||||
DataBufferByte db = (DataBufferByte)wr.getDataBuffer();
|
||||
byte[] buf = db.getData();
|
||||
decompress(buf, scaledWidth, pitch, scaledHeight, pixelFormat, flags);
|
||||
decompress(buf, 0, 0, scaledWidth, pitch, scaledHeight, pixelFormat,
|
||||
flags);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Decompress the JPEG source image associated with this decompressor
|
||||
* instance and return a <code>BufferedImage</code> instance containing the
|
||||
* decompressed image.
|
||||
* Decompress the JPEG source image or decode the YUV source image associated
|
||||
* with this decompressor instance and return a <code>BufferedImage</code>
|
||||
* instance containing the decompressed/decoded image.
|
||||
*
|
||||
* @param desiredWidth see
|
||||
* {@link #decompress(byte[], int, int, int, int, int, int, int)} for
|
||||
@@ -575,13 +838,14 @@ public class TJDecompressor {
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return a <code>BufferedImage</code> instance containing the
|
||||
* decompressed image
|
||||
* decompressed/decoded image.
|
||||
*/
|
||||
public BufferedImage decompress(int desiredWidth, int desiredHeight,
|
||||
int bufferedImageType, int flags)
|
||||
throws Exception {
|
||||
if (desiredWidth < 0 || desiredHeight < 0 || flags < 0)
|
||||
throw new Exception("Invalid argument in decompress()");
|
||||
throws TJException {
|
||||
if ((yuvImage == null && (desiredWidth < 0 || desiredHeight < 0)) ||
|
||||
flags < 0)
|
||||
throw new IllegalArgumentException("Invalid argument in decompress()");
|
||||
int scaledWidth = getScaledWidth(desiredWidth, desiredHeight);
|
||||
int scaledHeight = getScaledHeight(desiredWidth, desiredHeight);
|
||||
BufferedImage img = new BufferedImage(scaledWidth, scaledHeight,
|
||||
@@ -593,44 +857,63 @@ public class TJDecompressor {
|
||||
/**
|
||||
* Free the native structures associated with this decompressor instance.
|
||||
*/
|
||||
public void close() throws Exception {
|
||||
@Override
|
||||
public void close() throws TJException {
|
||||
if (handle != 0)
|
||||
destroy();
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:DesignForExtension")
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
try {
|
||||
close();
|
||||
} catch(Exception e) {
|
||||
} catch (TJException e) {
|
||||
} finally {
|
||||
super.finalize();
|
||||
}
|
||||
};
|
||||
|
||||
private native void init() throws Exception;
|
||||
private native void init() throws TJException;
|
||||
|
||||
private native void destroy() throws Exception;
|
||||
private native void destroy() throws TJException;
|
||||
|
||||
private native void decompressHeader(byte[] srcBuf, int size)
|
||||
throws Exception;
|
||||
throws TJException;
|
||||
|
||||
@Deprecated
|
||||
private native void decompress(byte[] srcBuf, int size, byte[] dstBuf,
|
||||
int desiredWidth, int pitch, int desiredHeight, int pixelFormat, int flags)
|
||||
throws Exception; // deprecated
|
||||
throws TJException;
|
||||
|
||||
private native void decompress(byte[] srcBuf, int size, byte[] dstBuf, int x,
|
||||
int y, int desiredWidth, int pitch, int desiredHeight, int pixelFormat,
|
||||
int flags) throws Exception;
|
||||
int flags) throws TJException;
|
||||
|
||||
@Deprecated
|
||||
private native void decompress(byte[] srcBuf, int size, int[] dstBuf,
|
||||
int desiredWidth, int stride, int desiredHeight, int pixelFormat,
|
||||
int flags) throws Exception; // deprecated
|
||||
int flags) throws TJException;
|
||||
|
||||
private native void decompress(byte[] srcBuf, int size, int[] dstBuf, int x,
|
||||
int y, int desiredWidth, int stride, int desiredHeight, int pixelFormat,
|
||||
int flags) throws Exception;
|
||||
int flags) throws TJException;
|
||||
|
||||
@Deprecated
|
||||
private native void decompressToYUV(byte[] srcBuf, int size, byte[] dstBuf,
|
||||
int flags) throws Exception;
|
||||
int flags) throws TJException;
|
||||
|
||||
private native void decompressToYUV(byte[] srcBuf, int size,
|
||||
byte[][] dstPlanes, int[] dstOffsets, int desiredWidth, int[] dstStrides,
|
||||
int desiredheight, int flags) throws TJException;
|
||||
|
||||
private native void decodeYUV(byte[][] srcPlanes, int[] srcOffsets,
|
||||
int[] srcStrides, int subsamp, byte[] dstBuf, int x, int y, int width,
|
||||
int pitch, int height, int pixelFormat, int flags) throws TJException;
|
||||
|
||||
private native void decodeYUV(byte[][] srcPlanes, int[] srcOffsets,
|
||||
int[] srcStrides, int subsamp, int[] dstBuf, int x, int y, int width,
|
||||
int stride, int height, int pixelFormat, int flags) throws TJException;
|
||||
|
||||
static {
|
||||
TJLoader.load();
|
||||
@@ -639,8 +922,10 @@ public class TJDecompressor {
|
||||
protected long handle = 0;
|
||||
protected byte[] jpegBuf = null;
|
||||
protected int jpegBufSize = 0;
|
||||
protected YUVImage yuvImage = null;
|
||||
protected int jpegWidth = 0;
|
||||
protected int jpegHeight = 0;
|
||||
protected int jpegSubsamp = -1;
|
||||
protected int jpegColorspace = -1;
|
||||
private ByteOrder byteOrder = null;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C)2011 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||
* Copyright (C)2017-2018 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -26,17 +27,52 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __BMP_H__
|
||||
#define __BMP_H__
|
||||
package org.libjpegturbo.turbojpeg;
|
||||
|
||||
#include "./turbojpeg.h"
|
||||
import java.io.IOException;
|
||||
|
||||
int loadbmp(char *filename, unsigned char **buf, int *w, int *h, int pf,
|
||||
int bottomup);
|
||||
@SuppressWarnings("checkstyle:JavadocType")
|
||||
public class TJException extends IOException {
|
||||
|
||||
int savebmp(char *filename, unsigned char *buf, int w, int h, int pf,
|
||||
int bottomup);
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
const char *bmpgeterr(void);
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
public TJException() {
|
||||
super();
|
||||
}
|
||||
|
||||
#endif
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
public TJException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
public TJException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
public TJException(String message, int code) {
|
||||
super(message);
|
||||
if (errorCode >= 0 && errorCode < TJ.NUMERR)
|
||||
errorCode = code;
|
||||
}
|
||||
|
||||
@SuppressWarnings("checkstyle:JavadocMethod")
|
||||
public TJException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a code (one of {@link TJ TJ.ERR_*}) indicating the severity of the
|
||||
* last error.
|
||||
*
|
||||
* @return a code (one of {@link TJ TJ.ERR_*}) indicating the severity of the
|
||||
* last error.
|
||||
*/
|
||||
public int getErrorCode() {
|
||||
return errorCode;
|
||||
}
|
||||
|
||||
private int errorCode = TJ.ERR_FATAL;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011-2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011-2013, 2016 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -36,19 +36,19 @@ final class TJLoader {
|
||||
String os = System.getProperty("os.name").toLowerCase();
|
||||
if (os.indexOf("mac") >= 0) {
|
||||
try {
|
||||
System.load("%{__libdir}/libturbojpeg.jnilib");
|
||||
System.load("@CMAKE_INSTALL_FULL_LIBDIR@/libturbojpeg.jnilib");
|
||||
} catch (java.lang.UnsatisfiedLinkError e2) {
|
||||
System.load("/usr/lib/libturbojpeg.jnilib");
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
System.load("%{__libdir}/libturbojpeg.so");
|
||||
System.load("@CMAKE_INSTALL_FULL_LIBDIR@/libturbojpeg.so");
|
||||
} catch (java.lang.UnsatisfiedLinkError e3) {
|
||||
String libdir = "%{__libdir}";
|
||||
if (libdir.equals("/opt/libjpeg-turbo/lib64")) {
|
||||
System.load("/opt/libjpeg-turbo/lib32/libturbojpeg.so");
|
||||
} else if (libdir.equals("/opt/libjpeg-turbo/lib32")) {
|
||||
System.load("/opt/libjpeg-turbo/lib64/libturbojpeg.so");
|
||||
String libdir = "@CMAKE_INSTALL_FULL_LIBDIR@";
|
||||
if (libdir.equals("@CMAKE_INSTALL_DEFAULT_PREFIX@/lib64")) {
|
||||
System.load("@CMAKE_INSTALL_DEFAULT_PREFIX@/lib32/libturbojpeg.so");
|
||||
} else if (libdir.equals("@CMAKE_INSTALL_DEFAULT_PREFIX@/lib32")) {
|
||||
System.load("@CMAKE_INSTALL_DEFAULT_PREFIX@/lib64/libturbojpeg.so");
|
||||
} else {
|
||||
throw e3;
|
||||
}
|
||||
@@ -56,4 +56,4 @@ final class TJLoader {
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -32,4 +32,4 @@ final class TJLoader {
|
||||
static void load() {
|
||||
System.loadLibrary("@TURBOJPEG_DLL_NAME@");
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C)2011 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011, 2018 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -33,15 +34,23 @@ package org.libjpegturbo.turbojpeg;
|
||||
*/
|
||||
public class TJScalingFactor {
|
||||
|
||||
public TJScalingFactor(int num, int denom) throws Exception {
|
||||
/**
|
||||
* Create a TurboJPEG scaling factor instance.
|
||||
*
|
||||
* @param num numerator
|
||||
* @param denom denominator
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
public TJScalingFactor(int num, int denom) {
|
||||
if (num < 1 || denom < 1)
|
||||
throw new Exception("Numerator and denominator must be >= 1");
|
||||
throw new IllegalArgumentException("Numerator and denominator must be >= 1");
|
||||
this.num = num;
|
||||
this.denom = denom;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns numerator
|
||||
*
|
||||
* @return numerator
|
||||
*/
|
||||
public int getNum() {
|
||||
@@ -50,6 +59,7 @@ public class TJScalingFactor {
|
||||
|
||||
/**
|
||||
* Returns denominator
|
||||
*
|
||||
* @return denominator
|
||||
*/
|
||||
public int getDenom() {
|
||||
@@ -60,7 +70,10 @@ public class TJScalingFactor {
|
||||
* Returns the scaled value of <code>dimension</code>. This function
|
||||
* performs the integer equivalent of
|
||||
* <code>ceil(dimension * scalingFactor)</code>.
|
||||
* @return the scaled value of <code>dimension</code>
|
||||
*
|
||||
* @param dimension width or height to multiply by this scaling factor
|
||||
*
|
||||
* @return the scaled value of <code>dimension</code>.
|
||||
*/
|
||||
public int getScaled(int dimension) {
|
||||
return (dimension * num + denom - 1) / denom;
|
||||
@@ -69,21 +82,25 @@ public class TJScalingFactor {
|
||||
/**
|
||||
* Returns true or false, depending on whether this instance and
|
||||
* <code>other</code> have the same numerator and denominator.
|
||||
*
|
||||
* @param other the scaling factor against which to compare this one
|
||||
*
|
||||
* @return true or false, depending on whether this instance and
|
||||
* <code>other</code> have the same numerator and denominator
|
||||
* <code>other</code> have the same numerator and denominator.
|
||||
*/
|
||||
public boolean equals(TJScalingFactor other) {
|
||||
return (this.num == other.num && this.denom == other.denom);
|
||||
return this.num == other.num && this.denom == other.denom;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true or false, depending on whether this instance is equal to
|
||||
* 1/1.
|
||||
*
|
||||
* @return true or false, depending on whether this instance is equal to
|
||||
* 1/1
|
||||
* 1/1.
|
||||
*/
|
||||
public boolean isOne() {
|
||||
return (num == 1 && denom == 1);
|
||||
return num == 1 && denom == 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -95,4 +112,4 @@ public class TJScalingFactor {
|
||||
* Denominator
|
||||
*/
|
||||
private int denom = 1;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C)2011, 2013 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011, 2013, 2018 D. R. Commander. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -126,6 +126,20 @@ public class TJTransform extends Rectangle {
|
||||
* them.
|
||||
*/
|
||||
public static final int OPT_NOOUTPUT = 16;
|
||||
/**
|
||||
* This option will enable progressive entropy coding in the output image
|
||||
* generated by this particular transform. Progressive entropy coding will
|
||||
* generally improve compression relative to baseline entropy coding (the
|
||||
* default), but it will reduce compression and decompression performance
|
||||
* considerably.
|
||||
*/
|
||||
public static final int OPT_PROGRESSIVE = 32;
|
||||
/**
|
||||
* This option will prevent {@link TJTransformer#transform
|
||||
* TJTransformer.transform()} from copying any extra markers (including EXIF
|
||||
* and ICC profile data) from the source image to the output image.
|
||||
*/
|
||||
public static final int OPT_COPYNONE = 64;
|
||||
|
||||
|
||||
/**
|
||||
@@ -159,8 +173,9 @@ public class TJTransform extends Rectangle {
|
||||
* @param cf an instance of an object that implements the {@link
|
||||
* TJCustomFilter} interface, or null if no custom filter is needed
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
public TJTransform(int x, int y, int w, int h, int op, int options,
|
||||
TJCustomFilter cf) throws Exception {
|
||||
TJCustomFilter cf) {
|
||||
super(x, y, w, h);
|
||||
this.op = op;
|
||||
this.options = options;
|
||||
@@ -183,8 +198,9 @@ public class TJTransform extends Rectangle {
|
||||
* @param cf an instance of an object that implements the {@link
|
||||
* TJCustomFilter} interface, or null if no custom filter is needed
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:HiddenField")
|
||||
public TJTransform(Rectangle r, int op, int options,
|
||||
TJCustomFilter cf) throws Exception {
|
||||
TJCustomFilter cf) {
|
||||
super(r);
|
||||
this.op = op;
|
||||
this.options = options;
|
||||
@@ -194,15 +210,18 @@ public class TJTransform extends Rectangle {
|
||||
/**
|
||||
* Transform operation (one of <code>OP_*</code>)
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:VisibilityModifier")
|
||||
public int op = 0;
|
||||
|
||||
/**
|
||||
* Transform options (bitwise OR of one or more of <code>OPT_*</code>)
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:VisibilityModifier")
|
||||
public int options = 0;
|
||||
|
||||
/**
|
||||
* Custom filter instance
|
||||
*/
|
||||
@SuppressWarnings("checkstyle:VisibilityModifier")
|
||||
public TJCustomFilter cf = null;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (C)2011, 2013-2014 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2011, 2013-2015 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -36,7 +37,7 @@ public class TJTransformer extends TJDecompressor {
|
||||
/**
|
||||
* Create a TurboJPEG lossless transformer instance.
|
||||
*/
|
||||
public TJTransformer() throws Exception {
|
||||
public TJTransformer() throws TJException {
|
||||
init();
|
||||
}
|
||||
|
||||
@@ -45,11 +46,11 @@ public class TJTransformer extends TJDecompressor {
|
||||
* image stored in <code>jpegImage</code> with the newly created instance.
|
||||
*
|
||||
* @param jpegImage JPEG image buffer (size of the JPEG image is assumed to
|
||||
* be the length of the array)
|
||||
* be the length of the array.) This buffer is not modified.
|
||||
*/
|
||||
public TJTransformer(byte[] jpegImage) throws Exception {
|
||||
public TJTransformer(byte[] jpegImage) throws TJException {
|
||||
init();
|
||||
setJPEGImage(jpegImage, jpegImage.length);
|
||||
setSourceImage(jpegImage, jpegImage.length);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,13 +58,13 @@ public class TJTransformer extends TJDecompressor {
|
||||
* image of length <code>imageSize</code> bytes stored in
|
||||
* <code>jpegImage</code> with the newly created instance.
|
||||
*
|
||||
* @param jpegImage JPEG image buffer
|
||||
* @param jpegImage JPEG image buffer. This buffer is not modified.
|
||||
*
|
||||
* @param imageSize size of the JPEG image (in bytes)
|
||||
*/
|
||||
public TJTransformer(byte[] jpegImage, int imageSize) throws Exception {
|
||||
public TJTransformer(byte[] jpegImage, int imageSize) throws TJException {
|
||||
init();
|
||||
setJPEGImage(jpegImage, imageSize);
|
||||
setSourceImage(jpegImage, imageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,9 +95,9 @@ public class TJTransformer extends TJDecompressor {
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*/
|
||||
public void transform(byte[][] dstBufs, TJTransform[] transforms,
|
||||
int flags) throws Exception {
|
||||
int flags) throws TJException {
|
||||
if (jpegBuf == null)
|
||||
throw new Exception("JPEG buffer not initialized");
|
||||
throw new IllegalStateException("JPEG buffer not initialized");
|
||||
transformedSizes = transform(jpegBuf, jpegBufSize, dstBufs, transforms,
|
||||
flags);
|
||||
}
|
||||
@@ -110,17 +111,17 @@ public class TJTransformer extends TJDecompressor {
|
||||
* which specifies the transform parameters and/or cropping region for the
|
||||
* corresponding transformed output image
|
||||
*
|
||||
* @return an array of {@link TJDecompressor} instances, each of
|
||||
* which has a transformed JPEG image associated with it
|
||||
*
|
||||
* @param flags the bitwise OR of one or more of
|
||||
* {@link TJ#FLAG_BOTTOMUP TJ.FLAG_*}
|
||||
*
|
||||
* @return an array of {@link TJDecompressor} instances, each of
|
||||
* which has a transformed JPEG image associated with it.
|
||||
*/
|
||||
public TJDecompressor[] transform(TJTransform[] transforms, int flags)
|
||||
throws Exception {
|
||||
throws TJException {
|
||||
byte[][] dstBufs = new byte[transforms.length][];
|
||||
if (jpegWidth < 1 || jpegHeight < 1)
|
||||
throw new Exception("JPEG buffer not initialized");
|
||||
throw new IllegalStateException("JPEG buffer not initialized");
|
||||
for (int i = 0; i < transforms.length; i++) {
|
||||
int w = jpegWidth, h = jpegHeight;
|
||||
if ((transforms[i].options & TJTransform.OPT_CROP) != 0) {
|
||||
@@ -141,22 +142,22 @@ public class TJTransformer extends TJDecompressor {
|
||||
* generated by the most recent transform operation.
|
||||
*
|
||||
* @return an array containing the sizes of the transformed JPEG images
|
||||
* generated by the most recent transform operation
|
||||
* generated by the most recent transform operation.
|
||||
*/
|
||||
public int[] getTransformedSizes() throws Exception {
|
||||
public int[] getTransformedSizes() {
|
||||
if (transformedSizes == null)
|
||||
throw new Exception("No image has been transformed yet");
|
||||
throw new IllegalStateException("No image has been transformed yet");
|
||||
return transformedSizes;
|
||||
}
|
||||
|
||||
private native void init() throws Exception;
|
||||
private native void init() throws TJException;
|
||||
|
||||
private native int[] transform(byte[] srcBuf, int srcSize, byte[][] dstBufs,
|
||||
TJTransform[] transforms, int flags) throws Exception;
|
||||
TJTransform[] transforms, int flags) throws TJException;
|
||||
|
||||
static {
|
||||
TJLoader.load();
|
||||
}
|
||||
|
||||
private int[] transformedSizes = null;
|
||||
};
|
||||
}
|
||||
|
||||
445
java/org/libjpegturbo/turbojpeg/YUVImage.java
Normal file
445
java/org/libjpegturbo/turbojpeg/YUVImage.java
Normal file
@@ -0,0 +1,445 @@
|
||||
/*
|
||||
* Copyright (C)2014, 2017 D. R. Commander. All Rights Reserved.
|
||||
* Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* - Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* - Neither the name of the libjpeg-turbo Project nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.libjpegturbo.turbojpeg;
|
||||
|
||||
/**
|
||||
* This class encapsulates a YUV planar image and the metadata
|
||||
* associated with it. The TurboJPEG API allows both the JPEG compression and
|
||||
* decompression pipelines to be split into stages: YUV encode, compress from
|
||||
* YUV, decompress to YUV, and YUV decode. A <code>YUVImage</code> instance
|
||||
* serves as the destination image for YUV encode and decompress-to-YUV
|
||||
* operations and as the source image for compress-from-YUV and YUV decode
|
||||
* operations.
|
||||
* <p>
|
||||
* Technically, the JPEG format uses the YCbCr colorspace (which technically is
|
||||
* not a "colorspace" but rather a "color transform"), but per the convention
|
||||
* of the digital video community, the TurboJPEG API uses "YUV" to refer to an
|
||||
* image format consisting of Y, Cb, and Cr image planes.
|
||||
* <p>
|
||||
* Each plane is simply a 2D array of bytes, each byte representing the value
|
||||
* of one of the components (Y, Cb, or Cr) at a particular location in the
|
||||
* image. The width and height of each plane are determined by the image
|
||||
* width, height, and level of chrominance subsampling. The luminance plane
|
||||
* width is the image width padded to the nearest multiple of the horizontal
|
||||
* subsampling factor (2 in the case of 4:2:0 and 4:2:2, 4 in the case of
|
||||
* 4:1:1, 1 in the case of 4:4:4 or grayscale.) Similarly, the luminance plane
|
||||
* height is the image height padded to the nearest multiple of the vertical
|
||||
* subsampling factor (2 in the case of 4:2:0 or 4:4:0, 1 in the case of 4:4:4
|
||||
* or grayscale.) The chrominance plane width is equal to the luminance plane
|
||||
* width divided by the horizontal subsampling factor, and the chrominance
|
||||
* plane height is equal to the luminance plane height divided by the vertical
|
||||
* subsampling factor.
|
||||
* <p>
|
||||
* For example, if the source image is 35 x 35 pixels and 4:2:2 subsampling is
|
||||
* used, then the luminance plane would be 36 x 35 bytes, and each of the
|
||||
* chrominance planes would be 18 x 35 bytes. If you specify a line padding of
|
||||
* 4 bytes on top of this, then the luminance plane would be 36 x 35 bytes, and
|
||||
* each of the chrominance planes would be 20 x 35 bytes.
|
||||
*/
|
||||
public class YUVImage {
|
||||
|
||||
private static final String NO_ASSOC_ERROR =
|
||||
"No image data is associated with this instance";
|
||||
|
||||
/**
|
||||
* Create a new <code>YUVImage</code> instance backed by separate image
|
||||
* planes, and allocate memory for the image planes.
|
||||
*
|
||||
* @param width width (in pixels) of the YUV image
|
||||
*
|
||||
* @param strides an array of integers, each specifying the number of bytes
|
||||
* per line in the corresponding plane of the YUV image. Setting the stride
|
||||
* for any plane to 0 is the same as setting it to the plane width (see
|
||||
* {@link YUVImage above}.) If <code>strides</code> is null, then the
|
||||
* strides for all planes will be set to their respective plane widths. When
|
||||
* using this constructor, the stride for each plane must be equal to or
|
||||
* greater than the plane width.
|
||||
*
|
||||
* @param height height (in pixels) of the YUV image
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling to be used in the YUV
|
||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||
*/
|
||||
public YUVImage(int width, int[] strides, int height, int subsamp) {
|
||||
setBuf(null, null, width, strides, height, subsamp, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new <code>YUVImage</code> instance backed by a unified image
|
||||
* buffer, and allocate memory for the image buffer.
|
||||
*
|
||||
* @param width width (in pixels) of the YUV image
|
||||
*
|
||||
* @param pad Each line of each plane in the YUV image buffer will be padded
|
||||
* to this number of bytes (must be a power of 2.)
|
||||
*
|
||||
* @param height height (in pixels) of the YUV image
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling to be used in the YUV
|
||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||
*/
|
||||
public YUVImage(int width, int pad, int height, int subsamp) {
|
||||
setBuf(new byte[TJ.bufSizeYUV(width, pad, height, subsamp)], width, pad,
|
||||
height, subsamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new <code>YUVImage</code> instance from a set of existing image
|
||||
* planes.
|
||||
*
|
||||
* @param planes an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||
* image planes (or just the Y plane, if the image is grayscale.) These
|
||||
* planes can be contiguous or non-contiguous in memory. Plane
|
||||
* <code>i</code> should be at least <code>offsets[i] +
|
||||
* {@link TJ#planeSizeYUV TJ.planeSizeYUV}(i, width, strides[i], height, subsamp)</code>
|
||||
* bytes in size.
|
||||
*
|
||||
* @param offsets If this <code>YUVImage</code> instance represents a
|
||||
* subregion of a larger image, then <code>offsets[i]</code> specifies the
|
||||
* offset (in bytes) of the subregion within plane <code>i</code> of the
|
||||
* larger image. Setting this to null is the same as setting the offsets for
|
||||
* all planes to 0.
|
||||
*
|
||||
* @param width width (in pixels) of the new YUV image (or subregion)
|
||||
*
|
||||
* @param strides an array of integers, each specifying the number of bytes
|
||||
* per line in the corresponding plane of the YUV image. Setting the stride
|
||||
* for any plane to 0 is the same as setting it to the plane width (see
|
||||
* {@link YUVImage above}.) If <code>strides</code> is null, then the
|
||||
* strides for all planes will be set to their respective plane widths. You
|
||||
* can adjust the strides in order to add an arbitrary amount of line padding
|
||||
* to each plane or to specify that this <code>YUVImage</code> instance is a
|
||||
* subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||
* be set to the plane width of plane <code>i</code> in the larger image.)
|
||||
*
|
||||
* @param height height (in pixels) of the new YUV image (or subregion)
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||
*/
|
||||
public YUVImage(byte[][] planes, int[] offsets, int width, int[] strides,
|
||||
int height, int subsamp) {
|
||||
setBuf(planes, offsets, width, strides, height, subsamp, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new <code>YUVImage</code> instance from an existing unified image
|
||||
* buffer.
|
||||
*
|
||||
* @param yuvImage image buffer that contains or will contain YUV planar
|
||||
* image data. Use {@link TJ#bufSizeYUV} to determine the minimum size for
|
||||
* this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
||||
* sequentially in the buffer (see {@link YUVImage above} for a description
|
||||
* of the image format.)
|
||||
*
|
||||
* @param width width (in pixels) of the YUV image
|
||||
*
|
||||
* @param pad the line padding used in the YUV image buffer. For
|
||||
* instance, if each line in each plane of the buffer is padded to the
|
||||
* nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.
|
||||
*
|
||||
* @param height height (in pixels) of the YUV image
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||
*/
|
||||
public YUVImage(byte[] yuvImage, int width, int pad, int height,
|
||||
int subsamp) {
|
||||
setBuf(yuvImage, width, pad, height, subsamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign a set of image planes to this <code>YUVImage</code> instance.
|
||||
*
|
||||
* @param planes an array of buffers representing the Y, U (Cb), and V (Cr)
|
||||
* image planes (or just the Y plane, if the image is grayscale.) These
|
||||
* planes can be contiguous or non-contiguous in memory. Plane
|
||||
* <code>i</code> should be at least <code>offsets[i] +
|
||||
* {@link TJ#planeSizeYUV TJ.planeSizeYUV}(i, width, strides[i], height, subsamp)</code>
|
||||
* bytes in size.
|
||||
*
|
||||
* @param offsets If this <code>YUVImage</code> instance represents a
|
||||
* subregion of a larger image, then <code>offsets[i]</code> specifies the
|
||||
* offset (in bytes) of the subregion within plane <code>i</code> of the
|
||||
* larger image. Setting this to null is the same as setting the offsets for
|
||||
* all planes to 0.
|
||||
*
|
||||
* @param width width (in pixels) of the YUV image (or subregion)
|
||||
*
|
||||
* @param strides an array of integers, each specifying the number of bytes
|
||||
* per line in the corresponding plane of the YUV image. Setting the stride
|
||||
* for any plane to 0 is the same as setting it to the plane width (see
|
||||
* {@link YUVImage above}.) If <code>strides</code> is null, then the
|
||||
* strides for all planes will be set to their respective plane widths. You
|
||||
* can adjust the strides in order to add an arbitrary amount of line padding
|
||||
* to each plane or to specify that this <code>YUVImage</code> image is a
|
||||
* subregion of a larger image (in which case, <code>strides[i]</code> should
|
||||
* be set to the plane width of plane <code>i</code> in the larger image.)
|
||||
*
|
||||
* @param height height (in pixels) of the YUV image (or subregion)
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||
*/
|
||||
public void setBuf(byte[][] planes, int[] offsets, int width, int[] strides,
|
||||
int height, int subsamp) {
|
||||
setBuf(planes, offsets, width, strides, height, subsamp, false);
|
||||
}
|
||||
|
||||
private void setBuf(byte[][] planes, int[] offsets, int width, int[] strides,
|
||||
int height, int subsamp, boolean alloc) {
|
||||
if ((planes == null && !alloc) || width < 1 || height < 1 || subsamp < 0 ||
|
||||
subsamp >= TJ.NUMSAMP)
|
||||
throw new IllegalArgumentException("Invalid argument in YUVImage::setBuf()");
|
||||
|
||||
int nc = (subsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||
if ((planes != null && planes.length != nc) ||
|
||||
(offsets != null && offsets.length != nc) ||
|
||||
(strides != null && strides.length != nc))
|
||||
throw new IllegalArgumentException("YUVImage::setBuf(): planes, offsets, or strides array is the wrong size");
|
||||
|
||||
if (planes == null)
|
||||
planes = new byte[nc][];
|
||||
if (offsets == null)
|
||||
offsets = new int[nc];
|
||||
if (strides == null)
|
||||
strides = new int[nc];
|
||||
|
||||
for (int i = 0; i < nc; i++) {
|
||||
int pw = TJ.planeWidth(i, width, subsamp);
|
||||
int ph = TJ.planeHeight(i, height, subsamp);
|
||||
int planeSize = TJ.planeSizeYUV(i, width, strides[i], height, subsamp);
|
||||
|
||||
if (strides[i] == 0)
|
||||
strides[i] = pw;
|
||||
if (alloc) {
|
||||
if (strides[i] < pw)
|
||||
throw new IllegalArgumentException("Stride must be >= plane width when allocating a new YUV image");
|
||||
planes[i] = new byte[strides[i] * ph];
|
||||
}
|
||||
if (planes[i] == null || offsets[i] < 0)
|
||||
throw new IllegalArgumentException("Invalid argument in YUVImage::setBuf()");
|
||||
if (strides[i] < 0 && offsets[i] - planeSize + pw < 0)
|
||||
throw new IllegalArgumentException("Stride for plane " + i +
|
||||
" would cause memory to be accessed below plane boundary");
|
||||
if (planes[i].length < offsets[i] + planeSize)
|
||||
throw new IllegalArgumentException("Image plane " + i +
|
||||
" is not large enough");
|
||||
}
|
||||
|
||||
yuvPlanes = planes;
|
||||
yuvOffsets = offsets;
|
||||
yuvWidth = width;
|
||||
yuvStrides = strides;
|
||||
yuvHeight = height;
|
||||
yuvSubsamp = subsamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign a unified image buffer to this <code>YUVImage</code> instance.
|
||||
*
|
||||
* @param yuvImage image buffer that contains or will contain YUV planar
|
||||
* image data. Use {@link TJ#bufSizeYUV} to determine the minimum size for
|
||||
* this buffer. The Y, U (Cb), and V (Cr) image planes are stored
|
||||
* sequentially in the buffer (see {@link YUVImage above} for a description
|
||||
* of the image format.)
|
||||
*
|
||||
* @param width width (in pixels) of the YUV image
|
||||
*
|
||||
* @param pad the line padding used in the YUV image buffer. For
|
||||
* instance, if each line in each plane of the buffer is padded to the
|
||||
* nearest multiple of 4 bytes, then <code>pad</code> should be set to 4.
|
||||
*
|
||||
* @param height height (in pixels) of the YUV image
|
||||
*
|
||||
* @param subsamp the level of chrominance subsampling used in the YUV
|
||||
* image (one of {@link TJ#SAMP_444 TJ.SAMP_*})
|
||||
*/
|
||||
public void setBuf(byte[] yuvImage, int width, int pad, int height,
|
||||
int subsamp) {
|
||||
if (yuvImage == null || width < 1 || pad < 1 || ((pad & (pad - 1)) != 0) ||
|
||||
height < 1 || subsamp < 0 || subsamp >= TJ.NUMSAMP)
|
||||
throw new IllegalArgumentException("Invalid argument in YUVImage::setBuf()");
|
||||
if (yuvImage.length < TJ.bufSizeYUV(width, pad, height, subsamp))
|
||||
throw new IllegalArgumentException("YUV image buffer is not large enough");
|
||||
|
||||
int nc = (subsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||
byte[][] planes = new byte[nc][];
|
||||
int[] strides = new int[nc];
|
||||
int[] offsets = new int[nc];
|
||||
|
||||
planes[0] = yuvImage;
|
||||
strides[0] = pad(TJ.planeWidth(0, width, subsamp), pad);
|
||||
if (subsamp != TJ.SAMP_GRAY) {
|
||||
strides[1] = strides[2] = pad(TJ.planeWidth(1, width, subsamp), pad);
|
||||
planes[1] = planes[2] = yuvImage;
|
||||
offsets[1] = offsets[0] +
|
||||
strides[0] * TJ.planeHeight(0, height, subsamp);
|
||||
offsets[2] = offsets[1] +
|
||||
strides[1] * TJ.planeHeight(1, height, subsamp);
|
||||
}
|
||||
|
||||
yuvPad = pad;
|
||||
setBuf(planes, offsets, width, strides, height, subsamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the width of the YUV image (or subregion.)
|
||||
*
|
||||
* @return the width of the YUV image (or subregion)
|
||||
*/
|
||||
public int getWidth() {
|
||||
if (yuvWidth < 1)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
return yuvWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the height of the YUV image (or subregion.)
|
||||
*
|
||||
* @return the height of the YUV image (or subregion)
|
||||
*/
|
||||
public int getHeight() {
|
||||
if (yuvHeight < 1)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
return yuvHeight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the line padding used in the YUV image buffer (if this image is
|
||||
* stored in a unified buffer rather than separate image planes.)
|
||||
*
|
||||
* @return the line padding used in the YUV image buffer
|
||||
*/
|
||||
public int getPad() {
|
||||
if (yuvPlanes == null)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
if (yuvPad < 1 || ((yuvPad & (yuvPad - 1)) != 0))
|
||||
throw new IllegalStateException("Image is not stored in a unified buffer");
|
||||
return yuvPad;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of bytes per line of each plane in the YUV image.
|
||||
*
|
||||
* @return the number of bytes per line of each plane in the YUV image
|
||||
*/
|
||||
public int[] getStrides() {
|
||||
if (yuvStrides == null)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
return yuvStrides;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the offsets (in bytes) of each plane within the planes of a larger
|
||||
* YUV image.
|
||||
*
|
||||
* @return the offsets (in bytes) of each plane within the planes of a larger
|
||||
* YUV image
|
||||
*/
|
||||
public int[] getOffsets() {
|
||||
if (yuvOffsets == null)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
return yuvOffsets;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the level of chrominance subsampling used in the YUV image. See
|
||||
* {@link TJ#SAMP_444 TJ.SAMP_*}.
|
||||
*
|
||||
* @return the level of chrominance subsampling used in the YUV image
|
||||
*/
|
||||
public int getSubsamp() {
|
||||
if (yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
return yuvSubsamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the YUV image planes. If the image is stored in a unified buffer,
|
||||
* then all image planes will point to that buffer.
|
||||
*
|
||||
* @return the YUV image planes
|
||||
*/
|
||||
public byte[][] getPlanes() {
|
||||
if (yuvPlanes == null)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
return yuvPlanes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the YUV image buffer (if this image is stored in a unified
|
||||
* buffer rather than separate image planes.)
|
||||
*
|
||||
* @return the YUV image buffer
|
||||
*/
|
||||
public byte[] getBuf() {
|
||||
if (yuvPlanes == null || yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
int nc = (yuvSubsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||
for (int i = 1; i < nc; i++) {
|
||||
if (yuvPlanes[i] != yuvPlanes[0])
|
||||
throw new IllegalStateException("Image is not stored in a unified buffer");
|
||||
}
|
||||
return yuvPlanes[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the size (in bytes) of the YUV image buffer (if this image is
|
||||
* stored in a unified buffer rather than separate image planes.)
|
||||
*
|
||||
* @return the size (in bytes) of the YUV image buffer
|
||||
*/
|
||||
public int getSize() {
|
||||
if (yuvPlanes == null || yuvSubsamp < 0 || yuvSubsamp >= TJ.NUMSAMP)
|
||||
throw new IllegalStateException(NO_ASSOC_ERROR);
|
||||
int nc = (yuvSubsamp == TJ.SAMP_GRAY ? 1 : 3);
|
||||
if (yuvPad < 1)
|
||||
throw new IllegalStateException("Image is not stored in a unified buffer");
|
||||
for (int i = 1; i < nc; i++) {
|
||||
if (yuvPlanes[i] != yuvPlanes[0])
|
||||
throw new IllegalStateException("Image is not stored in a unified buffer");
|
||||
}
|
||||
return TJ.bufSizeYUV(yuvWidth, yuvPad, yuvHeight, yuvSubsamp);
|
||||
}
|
||||
|
||||
private static int pad(int v, int p) {
|
||||
return (v + p - 1) & (~(p - 1));
|
||||
}
|
||||
|
||||
protected long handle = 0;
|
||||
protected byte[][] yuvPlanes = null;
|
||||
protected int[] yuvOffsets = null;
|
||||
protected int[] yuvStrides = null;
|
||||
protected int yuvPad = 0;
|
||||
protected int yuvWidth = 0;
|
||||
protected int yuvHeight = 0;
|
||||
protected int yuvSubsamp = -1;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user