Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Apache
: 172.26.7.228 | : 3.144.117.164
Cant Read [ /etc/named.conf ]
5.6.40-24+ubuntu18.04.1+deb.sury.org+1
www-data
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
home /
ubuntu /
ImageMagick-7.0.10-22 /
coders /
[ HOME SHELL ]
Name
Size
Permission
Action
.deps
[ DIR ]
drwxrwxr-x
.libs
[ DIR ]
drwxrwxr-x
.dirstamp
0
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
69.73
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
64.81
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
391
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
44.66
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
70.05
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
130.98
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
196.78
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
394
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
62.9
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
71.68
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
394
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
77.66
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
131.91
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
60.09
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
51.51
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
141.7
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
66.41
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
109.82
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
379.41
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
299.74
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
388
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
58.5
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
126.09
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
83.34
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
70.91
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
40.41
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
202.08
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
69.74
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
83.62
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
65.33
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
110.5
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
164.71
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
397
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
59.64
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
107.2
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
52.96
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
88.38
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
400
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
67.28
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
65.13
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
65.77
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
124.73
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
48.86
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
391
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
59.84
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
79.2
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
78.63
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
62.9
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
266.76
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
186.59
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
388
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
68.63
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
55.29
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
391
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
261.34
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
74.67
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
55.47
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
192.89
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
388
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
49.41
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
172.66
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
238.18
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
60.13
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
141.13
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
80.55
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
48.96
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
610.49
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
68.95
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
68.45
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
52.38
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
61.54
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
112.6
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
388
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
104.45
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
394
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
60.01
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
163.79
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
102.8
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
154.4
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
99.59
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
286.34
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
65.63
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
66.25
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
175.23
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
59.86
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
391
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
72.11
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
806.28
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
364.2
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
379
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
220.22
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
122.21
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
155.45
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
507.64
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
59.84
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
82.99
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
146.39
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
60.14
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
67.41
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
104.75
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
53.5
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
403
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
45.49
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
63.51
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
65.01
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
108.77
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
388
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
109.47
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
394
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
58.77
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
132.48
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
414.88
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
134.98
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
400
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
49.44
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
312.59
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
49.22
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
68.73
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
94.99
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
72.32
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
115.14
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
63.71
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
57.63
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
67.1
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
388
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
71.88
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
60.03
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
155.09
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
114.54
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
64.59
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
216.59
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
150.01
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
376
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
42.33
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
72.34
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
379
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
50.73
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
123.34
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
115.25
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
67.35
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
385
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
40.02
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
127.27
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
388
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
126.41
KB
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
382
B
-rw-rw-r--
MagickCore_libMagickCore_7_Q16...
102.9
KB
-rw-rw-r--
Makefile.am
41.13
KB
-rw-rw-r--
aai.c
15.23
KB
-rw-rw-r--
aai.h
867
B
-rw-rw-r--
art.c
13.45
KB
-rw-rw-r--
art.h
867
B
-rw-rw-r--
ashlar.c
7.73
KB
-rw-rw-r--
ashlar.h
876
B
-rw-rw-r--
avs.c
15.16
KB
-rw-rw-r--
avs.h
867
B
-rw-rw-r--
bgr.c
52.05
KB
-rw-rw-r--
bgr.h
938
B
-rw-rw-r--
bmp.c
84.94
KB
-rw-rw-r--
bmp.h
1.14
KB
-rw-rw-r--
braille.c
13.36
KB
-rw-rw-r--
braille.h
1.06
KB
-rw-rw-r--
bytebuffer-private.h
2.83
KB
-rw-rw-r--
cals.c
18.88
KB
-rw-rw-r--
cals.h
1.07
KB
-rw-rw-r--
caption.c
15.15
KB
-rw-rw-r--
caption.h
878
B
-rw-rw-r--
cin.c
43.46
KB
-rw-rw-r--
cin.h
918
B
-rw-rw-r--
cip.c
11.75
KB
-rw-rw-r--
cip.h
866
B
-rw-rw-r--
clip.c
10.17
KB
-rw-rw-r--
clip.h
869
B
-rw-rw-r--
clipboard.c
13.8
KB
-rw-rw-r--
clipboard.h
884
B
-rw-rw-r--
cmyk.c
57.92
KB
-rw-rw-r--
cmyk.h
907
B
-rw-rw-r--
coders-list.h
4.33
KB
-rw-rw-r--
coders-private.h
1.02
KB
-rw-rw-r--
coders.h
4.87
KB
-rw-rw-r--
cube.c
13.96
KB
-rw-rw-r--
cube.h
870
B
-rw-rw-r--
cut.c
25.71
KB
-rw-rw-r--
cut.h
866
B
-rw-rw-r--
dcm.c
189.02
KB
-rw-rw-r--
dcm.h
908
B
-rw-rw-r--
dds.c
93.72
KB
-rw-rw-r--
dds.h
978
B
-rw-rw-r--
debug.c
10.65
KB
-rw-rw-r--
debug.h
872
B
-rw-rw-r--
dib.c
46.25
KB
-rw-rw-r--
dib.h
948
B
-rw-rw-r--
djvu.c
31.58
KB
-rw-rw-r--
djvu.h
914
B
-rw-rw-r--
dng.c
29.29
KB
-rw-rw-r--
dng.h
2.03
KB
-rw-rw-r--
dot.c
9.79
KB
-rw-rw-r--
dot.h
943
B
-rw-rw-r--
dps.c
20.22
KB
-rw-rw-r--
dps.h
866
B
-rw-rw-r--
dpx.c
69.89
KB
-rw-rw-r--
dpx.h
946
B
-rw-rw-r--
emf.c
27.13
KB
-rw-rw-r--
emf.h
1.05
KB
-rw-rw-r--
ept.c
19.91
KB
-rw-rw-r--
ept.h
990
B
-rw-rw-r--
exr.c
22.79
KB
-rw-rw-r--
exr.h
918
B
-rw-rw-r--
fax.c
15.29
KB
-rw-rw-r--
fax.h
974
B
-rw-rw-r--
fits.c
29.49
KB
-rw-rw-r--
fits.h
988
B
-rw-rw-r--
flif.c
18.7
KB
-rw-rw-r--
flif.h
910
B
-rw-rw-r--
fpx.c
35.87
KB
-rw-rw-r--
fpx.h
866
B
-rw-rw-r--
ghostscript-private.h
7.34
KB
-rw-rw-r--
gif.c
62.71
KB
-rw-rw-r--
gif.h
943
B
-rw-rw-r--
gradient.c
12.22
KB
-rw-rw-r--
gradient.h
933
B
-rw-rw-r--
gray.c
37.77
KB
-rw-rw-r--
gray.h
907
B
-rw-rw-r--
hald.c
9.48
KB
-rw-rw-r--
hald.h
869
B
-rw-rw-r--
hdr.c
27.92
KB
-rw-rw-r--
hdr.h
954
B
-rw-rw-r--
heic.c
32.34
KB
-rw-rw-r--
heic.h
1.02
KB
-rw-rw-r--
histogram.c
14.41
KB
-rw-rw-r--
histogram.h
884
B
-rw-rw-r--
hrz.c
12.88
KB
-rw-rw-r--
hrz.h
866
B
-rw-rw-r--
html.c
17.95
KB
-rw-rw-r--
html.h
943
B
-rw-rw-r--
icon.c
48.2
KB
-rw-rw-r--
icon.h
941
B
-rw-rw-r--
info.c
8.77
KB
-rw-rw-r--
info.h
869
B
-rw-rw-r--
inline.c
13.23
KB
-rw-rw-r--
inline.h
914
B
-rw-rw-r--
ipl.c
23.86
KB
-rw-rw-r--
ipl.h
906
B
-rw-rw-r--
jbig.c
18.22
KB
-rw-rw-r--
jbig.h
941
B
-rw-rw-r--
jnx.c
13.8
KB
-rw-rw-r--
jnx.h
866
B
-rw-rw-r--
jp2.c
37.58
KB
-rw-rw-r--
jp2.h
1.2
KB
-rw-rw-r--
jpeg.c
97.27
KB
-rw-rw-r--
jpeg.h
1.04
KB
-rw-rw-r--
json.c
59.77
KB
-rw-rw-r--
json.h
869
B
-rw-rw-r--
jxl.c
11.2
KB
-rw-rw-r--
jxl.h
1.02
KB
-rw-rw-r--
label.c
13.23
KB
-rw-rw-r--
label.h
872
B
-rw-rw-r--
mac.c
11.14
KB
-rw-rw-r--
mac.h
866
B
-rw-rw-r--
magick.c
974.07
KB
-rw-rw-r--
magick.h
1.09
KB
-rw-rw-r--
map.c
16.56
KB
-rw-rw-r--
map.h
866
B
-rw-rw-r--
mask.c
11.61
KB
-rw-rw-r--
mask.h
869
B
-rw-rw-r--
mat.c
55.53
KB
-rw-rw-r--
mat.h
922
B
-rw-rw-r--
matte.c
8.94
KB
-rw-rw-r--
matte.h
872
B
-rw-rw-r--
meta.c
68.08
KB
-rw-rw-r--
meta.h
1.68
KB
-rw-rw-r--
miff.c
91.19
KB
-rw-rw-r--
miff.h
971
B
-rw-rw-r--
mono.c
12.88
KB
-rw-rw-r--
mono.h
869
B
-rw-rw-r--
mpc.c
55.54
KB
-rw-rw-r--
mpc.h
953
B
-rw-rw-r--
mpeg.c
23.5
KB
-rw-rw-r--
mpeg.h
1.33
KB
-rw-rw-r--
mpr.c
9.71
KB
-rw-rw-r--
mpr.h
902
B
-rw-rw-r--
msl.c
281.74
KB
-rw-rw-r--
msl.h
866
B
-rw-rw-r--
mtv.c
14.91
KB
-rw-rw-r--
mtv.h
866
B
-rw-rw-r--
mvg.c
13.94
KB
-rw-rw-r--
mvg.h
866
B
-rw-rw-r--
null.c
10.31
KB
-rw-rw-r--
null.h
869
B
-rw-rw-r--
otb.c
13.67
KB
-rw-rw-r--
otb.h
866
B
-rw-rw-r--
palm.c
39.51
KB
-rw-rw-r--
palm.h
869
B
-rw-rw-r--
pango.c
19
KB
-rw-rw-r--
pango.h
872
B
-rw-rw-r--
pattern.c
40.73
KB
-rw-rw-r--
pattern.h
878
B
-rw-rw-r--
pcd.c
37.94
KB
-rw-rw-r--
pcd.h
945
B
-rw-rw-r--
pcl.c
31.4
KB
-rw-rw-r--
pcl.h
912
B
-rw-rw-r--
pcx.c
41.28
KB
-rw-rw-r--
pcx.h
1.02
KB
-rw-rw-r--
pdb.c
32.93
KB
-rw-rw-r--
pdb.h
911
B
-rw-rw-r--
pdf.c
103.22
KB
-rw-rw-r--
pdf.h
1.03
KB
-rw-rw-r--
pes.c
22.4
KB
-rw-rw-r--
pes.h
906
B
-rw-rw-r--
pgx.c
14.93
KB
-rw-rw-r--
pgx.h
1004
B
-rw-rw-r--
pict.c
75.03
KB
-rw-rw-r--
pict.h
905
B
-rw-rw-r--
pix.c
11.78
KB
-rw-rw-r--
pix.h
866
B
-rw-rw-r--
plasma.c
11.01
KB
-rw-rw-r--
plasma.h
917
B
-rw-rw-r--
png.c
444.96
KB
-rw-rw-r--
png.h
1.29
KB
-rw-rw-r--
pnm.c
86.17
KB
-rw-rw-r--
pnm.h
1.35
KB
-rw-rw-r--
ps.c
74.22
KB
-rw-rw-r--
ps.h
1.1
KB
-rw-rw-r--
ps2.c
41.27
KB
-rw-rw-r--
ps2.h
902
B
-rw-rw-r--
ps3.c
53.38
KB
-rw-rw-r--
ps3.h
902
B
-rw-rw-r--
psd-private.h
1.28
KB
-rw-rw-r--
psd.c
114.67
KB
-rw-rw-r--
psd.h
981
B
-rw-rw-r--
pwp.c
12.87
KB
-rw-rw-r--
pwp.h
907
B
-rw-rw-r--
raw.c
20.72
KB
-rw-rw-r--
raw.h
1.14
KB
-rw-rw-r--
rgb.c
59.63
KB
-rw-rw-r--
rgb.h
977
B
-rw-rw-r--
rgf.c
13.49
KB
-rw-rw-r--
rgf.h
866
B
-rw-rw-r--
rla.c
16.69
KB
-rw-rw-r--
rla.h
866
B
-rw-rw-r--
rle.c
27.75
KB
-rw-rw-r--
rle.h
910
B
-rw-rw-r--
scr.c
10.87
KB
-rw-rw-r--
scr.h
866
B
-rw-rw-r--
screenshot.c
11.24
KB
-rw-rw-r--
screenshot.h
887
B
-rw-rw-r--
sct.c
13.14
KB
-rw-rw-r--
sct.h
904
B
-rw-rw-r--
sfw.c
17.26
KB
-rw-rw-r--
sfw.h
907
B
-rw-rw-r--
sgi.c
40.46
KB
-rw-rw-r--
sgi.h
910
B
-rw-rw-r--
sixel.c
44.92
KB
-rw-rw-r--
sixel.h
909
B
-rw-rw-r--
stegano.c
10.79
KB
-rw-rw-r--
stegano.h
878
B
-rw-rw-r--
sun.c
36.71
KB
-rw-rw-r--
sun.h
953
B
-rw-rw-r--
svg.c
165.72
KB
-rw-rw-r--
svg.h
1.07
KB
-rw-rw-r--
tga.c
34.39
KB
-rw-rw-r--
tga.h
971
B
-rw-rw-r--
thumbnail.c
9.18
KB
-rw-rw-r--
thumbnail.h
884
B
-rw-rw-r--
tiff.c
136.04
KB
-rw-rw-r--
tiff.h
1.24
KB
-rw-rw-r--
tile.c
8.74
KB
-rw-rw-r--
tile.h
869
B
-rw-rw-r--
tim.c
17.1
KB
-rw-rw-r--
tim.h
866
B
-rw-rw-r--
tim2.c
27.08
KB
-rw-rw-r--
tim2.h
945
B
-rw-rw-r--
ttf.c
16.16
KB
-rw-rw-r--
ttf.h
1.18
KB
-rw-rw-r--
txt.c
29.88
KB
-rw-rw-r--
txt.h
1.02
KB
-rw-rw-r--
uil.c
13.55
KB
-rw-rw-r--
uil.h
866
B
-rw-rw-r--
url.c
13.47
KB
-rw-rw-r--
url.h
1010
B
-rw-rw-r--
uyvy.c
13.95
KB
-rw-rw-r--
uyvy.h
905
B
-rw-rw-r--
vicar.c
17.53
KB
-rw-rw-r--
vicar.h
1013
B
-rw-rw-r--
vid.c
13.52
KB
-rw-rw-r--
vid.h
866
B
-rw-rw-r--
viff.c
45.5
KB
-rw-rw-r--
viff.h
949
B
-rw-rw-r--
vips.c
24.88
KB
-rw-rw-r--
vips.h
975
B
-rw-rw-r--
wbmp.c
14.2
KB
-rw-rw-r--
wbmp.h
869
B
-rw-rw-r--
webp.c
36.37
KB
-rw-rw-r--
webp.h
910
B
-rw-rw-r--
wmf.c
87.53
KB
-rw-rw-r--
wmf.h
866
B
-rw-rw-r--
wpg.c
54.39
KB
-rw-rw-r--
wpg.h
909
B
-rw-rw-r--
x.c
8.67
KB
-rw-rw-r--
x.h
860
B
-rw-rw-r--
xbm.c
20.42
KB
-rw-rw-r--
xbm.h
909
B
-rw-rw-r--
xc.c
9.19
KB
-rw-rw-r--
xc.h
900
B
-rw-rw-r--
xcf.c
50.23
KB
-rw-rw-r--
xcf.h
911
B
-rw-rw-r--
xpm.c
36.61
KB
-rw-rw-r--
xpm.h
980
B
-rw-rw-r--
xps.c
14.83
KB
-rw-rw-r--
xps.h
866
B
-rw-rw-r--
xtrn.c
13.23
KB
-rw-rw-r--
xtrn.h
911
B
-rw-rw-r--
xwd.c
33.22
KB
-rw-rw-r--
xwd.h
866
B
-rw-rw-r--
ycbcr.c
50.71
KB
-rw-rw-r--
ycbcr.h
912
B
-rw-rw-r--
yuv.c
31.05
KB
-rw-rw-r--
yuv.h
866
B
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : mpc.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % M M PPPP CCCC % % MM MM P P C % % M M M PPPP C % % M M P C % % M M P CCCC % % % % % % Read/Write Magick Persistant Cache Image Format % % % % Software Design % % Cristy % % March 2000 % % % % % % Copyright 1999-2020 ImageMagick Studio LLC, a non-profit organization % % dedicated to making software imaging solutions freely available. % % % % You may not use this file except in compliance with the License. You may % % obtain a copy of the License at % % % % https://imagemagick.org/script/license.php % % % % Unless required by applicable law or agreed to in writing, software % % distributed under the License is distributed on an "AS IS" BASIS, % % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % % See the License for the specific language governing permissions and % % limitations under the License. % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % */ /* Include declarations. */ #include "MagickCore/studio.h" #include "MagickCore/artifact.h" #include "MagickCore/attribute.h" #include "MagickCore/blob.h" #include "MagickCore/blob-private.h" #include "MagickCore/cache.h" #include "MagickCore/color.h" #include "MagickCore/color-private.h" #include "MagickCore/colormap.h" #include "MagickCore/constitute.h" #include "MagickCore/exception.h" #include "MagickCore/exception-private.h" #include "MagickCore/geometry.h" #include "MagickCore/image.h" #include "MagickCore/image-private.h" #include "MagickCore/linked-list.h" #include "MagickCore/list.h" #include "MagickCore/magick.h" #include "MagickCore/memory_.h" #include "MagickCore/module.h" #include "MagickCore/monitor.h" #include "MagickCore/monitor-private.h" #include "MagickCore/option.h" #include "MagickCore/profile.h" #include "MagickCore/property.h" #include "MagickCore/quantum-private.h" #include "MagickCore/resource_.h" #include "MagickCore/static.h" #include "MagickCore/statistic.h" #include "MagickCore/string_.h" #include "MagickCore/string-private.h" #include "MagickCore/utility.h" #include "MagickCore/version-private.h" /* Forward declarations. */ static MagickBooleanType WriteMPCImage(const ImageInfo *,Image *,ExceptionInfo *); /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % I s M P C % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % IsMPC() returns MagickTrue if the image format type, identified by the % magick string, is an Magick Persistent Cache image. % % The format of the IsMPC method is: % % MagickBooleanType IsMPC(const unsigned char *magick,const size_t length) % % A description of each parameter follows: % % o magick: compare image format pattern against these bytes. % % o length: Specifies the length of the magick string. % */ static MagickBooleanType IsMPC(const unsigned char *magick,const size_t length) { if (length < 14) return(MagickFalse); if (LocaleNCompare((const char *) magick,"id=MagickPixelCache",14) == 0) return(MagickTrue); return(MagickFalse); } /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % R e a d C A C H E I m a g e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % ReadMPCImage() reads an Magick Persistent Cache image file and returns % it. It allocates the memory necessary for the new Image structure and % returns a pointer to the new image. % % The format of the ReadMPCImage method is: % % Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception) % % Decompression code contributed by Kyle Shorter. % % A description of each parameter follows: % % o image_info: the image info. % % o exception: return any errors or warnings in this structure. % */ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception) { char cache_filename[MagickPathExtent], id[MagickPathExtent], keyword[MagickPathExtent], *options; const unsigned char *p; GeometryInfo geometry_info; Image *image; int c; LinkedListInfo *profiles; MagickBooleanType status; MagickOffsetType offset; MagickStatusType flags; register ssize_t i; size_t depth, extent, length; ssize_t count; unsigned int signature; /* Open image file. */ assert(image_info != (const ImageInfo *) NULL); assert(image_info->signature == MagickCoreSignature); if (image_info->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", image_info->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickCoreSignature); image=AcquireImage(image_info,exception); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) { image=DestroyImageList(image); return((Image *) NULL); } (void) CopyMagickString(cache_filename,image->filename,MagickPathExtent-6); AppendImageFormat("cache",cache_filename); c=ReadBlobByte(image); if (c == EOF) { image=DestroyImage(image); return((Image *) NULL); } *id='\0'; (void) memset(keyword,0,sizeof(keyword)); offset=0; do { /* Decode image header; header terminates one character beyond a ':'. */ SetGeometryInfo(&geometry_info); profiles=(LinkedListInfo *) NULL; length=MagickPathExtent; options=AcquireString((char *) NULL); signature=GetMagickSignature((const StringInfo *) NULL); image->depth=8; image->compression=NoCompression; while ((isgraph(c) != MagickFalse) && (c != (int) ':')) { register char *p; if (c == (int) '{') { char *comment; /* Read comment-- any text between { }. */ length=MagickPathExtent; comment=AcquireString((char *) NULL); for (p=comment; comment != (char *) NULL; p++) { c=ReadBlobByte(image); if (c == (int) '\\') c=ReadBlobByte(image); else if ((c == EOF) || (c == (int) '}')) break; if ((size_t) (p-comment+1) >= length) { *p='\0'; length<<=1; comment=(char *) ResizeQuantumMemory(comment,length+ MagickPathExtent,sizeof(*comment)); if (comment == (char *) NULL) break; p=comment+strlen(comment); } *p=(char) c; } if (comment == (char *) NULL) { options=DestroyString(options); ThrowReaderException(ResourceLimitError, "MemoryAllocationFailed"); } *p='\0'; (void) SetImageProperty(image,"comment",comment,exception); comment=DestroyString(comment); c=ReadBlobByte(image); } else if (isalnum(c) != MagickFalse) { /* Get the keyword. */ length=MagickPathExtent-1; p=keyword; do { if (c == (int) '=') break; if ((size_t) (p-keyword) < (MagickPathExtent-1)) *p++=(char) c; c=ReadBlobByte(image); } while (c != EOF); *p='\0'; p=options; while (isspace(c) != 0) c=ReadBlobByte(image); if (c == (int) '=') { /* Get the keyword value. */ c=ReadBlobByte(image); while ((c != (int) '}') && (c != EOF)) { if ((size_t) (p-options+1) >= length) { *p='\0'; length<<=1; options=(char *) ResizeQuantumMemory(options,length+ MagickPathExtent,sizeof(*options)); if (options == (char *) NULL) break; p=options+strlen(options); } *p++=(char) c; c=ReadBlobByte(image); if (c == '\\') { c=ReadBlobByte(image); if (c == (int) '}') { *p++=(char) c; c=ReadBlobByte(image); } } if (*options != '{') if (isspace(c) != 0) break; } if (options == (char *) NULL) ThrowReaderException(ResourceLimitError, "MemoryAllocationFailed"); } *p='\0'; if (*options == '{') (void) CopyMagickString(options,options+1,strlen(options)); /* Assign a value to the specified keyword. */ switch (*keyword) { case 'a': case 'A': { if (LocaleCompare(keyword,"alpha-trait") == 0) { ssize_t alpha_trait; alpha_trait=ParseCommandOption(MagickPixelTraitOptions, MagickFalse,options); if (alpha_trait < 0) break; image->alpha_trait=(PixelTrait) alpha_trait; break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'b': case 'B': { if (LocaleCompare(keyword,"background-color") == 0) { (void) QueryColorCompliance(options,AllCompliance, &image->background_color,exception); break; } if (LocaleCompare(keyword,"blue-primary") == 0) { flags=ParseGeometry(options,&geometry_info); image->chromaticity.blue_primary.x=geometry_info.rho; image->chromaticity.blue_primary.y=geometry_info.sigma; if ((flags & SigmaValue) == 0) image->chromaticity.blue_primary.y= image->chromaticity.blue_primary.x; break; } if (LocaleCompare(keyword,"border-color") == 0) { (void) QueryColorCompliance(options,AllCompliance, &image->border_color,exception); break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'c': case 'C': { if (LocaleCompare(keyword,"class") == 0) { ssize_t storage_class; storage_class=ParseCommandOption(MagickClassOptions, MagickFalse,options); if (storage_class < 0) break; image->storage_class=(ClassType) storage_class; break; } if (LocaleCompare(keyword,"colors") == 0) { image->colors=StringToUnsignedLong(options); break; } if (LocaleCompare(keyword,"colorspace") == 0) { ssize_t colorspace; colorspace=ParseCommandOption(MagickColorspaceOptions, MagickFalse,options); if (colorspace < 0) break; image->colorspace=(ColorspaceType) colorspace; break; } if (LocaleCompare(keyword,"compression") == 0) { ssize_t compression; compression=ParseCommandOption(MagickCompressOptions, MagickFalse,options); if (compression < 0) break; image->compression=(CompressionType) compression; break; } if (LocaleCompare(keyword,"columns") == 0) { image->columns=StringToUnsignedLong(options); break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'd': case 'D': { if (LocaleCompare(keyword,"delay") == 0) { image->delay=StringToUnsignedLong(options); break; } if (LocaleCompare(keyword,"depth") == 0) { image->depth=StringToUnsignedLong(options); break; } if (LocaleCompare(keyword,"dispose") == 0) { ssize_t dispose; dispose=ParseCommandOption(MagickDisposeOptions,MagickFalse, options); if (dispose < 0) break; image->dispose=(DisposeType) dispose; break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'e': case 'E': { if (LocaleCompare(keyword,"endian") == 0) { ssize_t endian; endian=ParseCommandOption(MagickEndianOptions,MagickFalse, options); if (endian < 0) break; image->endian=(EndianType) endian; break; } if (LocaleCompare(keyword,"error") == 0) { image->error.mean_error_per_pixel=StringToDouble(options, (char **) NULL); break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'g': case 'G': { if (LocaleCompare(keyword,"gamma") == 0) { image->gamma=StringToDouble(options,(char **) NULL); break; } if (LocaleCompare(keyword,"green-primary") == 0) { flags=ParseGeometry(options,&geometry_info); image->chromaticity.green_primary.x=geometry_info.rho; image->chromaticity.green_primary.y=geometry_info.sigma; if ((flags & SigmaValue) == 0) image->chromaticity.green_primary.y= image->chromaticity.green_primary.x; break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'i': case 'I': { if (LocaleCompare(keyword,"id") == 0) { (void) CopyMagickString(id,options,MagickPathExtent); break; } if (LocaleCompare(keyword,"iterations") == 0) { image->iterations=StringToUnsignedLong(options); break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'm': case 'M': { if (LocaleCompare(keyword,"magick-signature") == 0) { signature=(unsigned int) StringToUnsignedLong(options); break; } if (LocaleCompare(keyword,"mattecolor") == 0) { (void) QueryColorCompliance(options,AllCompliance, &image->matte_color,exception); break; } if (LocaleCompare(keyword,"maximum-error") == 0) { image->error.normalized_maximum_error=StringToDouble( options,(char **) NULL); break; } if (LocaleCompare(keyword,"mean-error") == 0) { image->error.normalized_mean_error=StringToDouble(options, (char **) NULL); break; } if (LocaleCompare(keyword,"montage") == 0) { (void) CloneString(&image->montage,options); break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'n': case 'N': { if (LocaleCompare(keyword,"number-channels") == 0) { image->number_channels=StringToUnsignedLong(options); break; } if (LocaleCompare(keyword,"number-meta-channels") == 0) { image->number_meta_channels=StringToUnsignedLong(options); if (image->number_meta_channels > MaxPixelChannels) { if (profiles != (LinkedListInfo *) NULL) profiles=DestroyLinkedList(profiles, RelinquishMagickMemory); options=DestroyString(options); ThrowReaderException(CorruptImageError, "ImproperImageHeader"); } break; } break; } case 'o': case 'O': { if (LocaleCompare(keyword,"orientation") == 0) { ssize_t orientation; orientation=ParseCommandOption(MagickOrientationOptions, MagickFalse,options); if (orientation < 0) break; image->orientation=(OrientationType) orientation; break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'p': case 'P': { if (LocaleCompare(keyword,"page") == 0) { char *geometry; geometry=GetPageGeometry(options); (void) ParseAbsoluteGeometry(geometry,&image->page); geometry=DestroyString(geometry); break; } if (LocaleCompare(keyword,"pixel-intensity") == 0) { ssize_t intensity; intensity=ParseCommandOption(MagickPixelIntensityOptions, MagickFalse,options); if (intensity < 0) break; image->intensity=(PixelIntensityMethod) intensity; break; } if (LocaleCompare(keyword,"profile") == 0) { if (profiles == (LinkedListInfo *) NULL) profiles=NewLinkedList(0); (void) AppendValueToLinkedList(profiles, AcquireString(options)); break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'q': case 'Q': { if (LocaleCompare(keyword,"quality") == 0) { image->quality=StringToUnsignedLong(options); break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'r': case 'R': { if (LocaleCompare(keyword,"red-primary") == 0) { flags=ParseGeometry(options,&geometry_info); image->chromaticity.red_primary.x=geometry_info.rho; if ((flags & SigmaValue) != 0) image->chromaticity.red_primary.y=geometry_info.sigma; break; } if (LocaleCompare(keyword,"rendering-intent") == 0) { ssize_t rendering_intent; rendering_intent=ParseCommandOption(MagickIntentOptions, MagickFalse,options); if (rendering_intent < 0) break; image->rendering_intent=(RenderingIntent) rendering_intent; break; } if (LocaleCompare(keyword,"resolution") == 0) { flags=ParseGeometry(options,&geometry_info); image->resolution.x=geometry_info.rho; image->resolution.y=geometry_info.sigma; if ((flags & SigmaValue) == 0) image->resolution.y=image->resolution.x; break; } if (LocaleCompare(keyword,"rows") == 0) { image->rows=StringToUnsignedLong(options); break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 's': case 'S': { if (LocaleCompare(keyword,"scene") == 0) { image->scene=StringToUnsignedLong(options); break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 't': case 'T': { if (LocaleCompare(keyword,"ticks-per-second") == 0) { image->ticks_per_second=(ssize_t) StringToLong(options); break; } if (LocaleCompare(keyword,"tile-offset") == 0) { char *geometry; geometry=GetPageGeometry(options); (void) ParseAbsoluteGeometry(geometry,&image->tile_offset); geometry=DestroyString(geometry); } if (LocaleCompare(keyword,"type") == 0) { ssize_t type; type=ParseCommandOption(MagickTypeOptions,MagickFalse, options); if (type < 0) break; image->type=(ImageType) type; break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'u': case 'U': { if (LocaleCompare(keyword,"units") == 0) { ssize_t units; units=ParseCommandOption(MagickResolutionOptions, MagickFalse,options); if (units < 0) break; image->units=(ResolutionType) units; break; } (void) SetImageProperty(image,keyword,options,exception); break; } case 'w': case 'W': { if (LocaleCompare(keyword,"white-point") == 0) { flags=ParseGeometry(options,&geometry_info); image->chromaticity.white_point.x=geometry_info.rho; image->chromaticity.white_point.y=geometry_info.sigma; if ((flags & SigmaValue) == 0) image->chromaticity.white_point.y= image->chromaticity.white_point.x; break; } (void) SetImageProperty(image,keyword,options,exception); break; } default: { (void) SetImageProperty(image,keyword,options,exception); break; } } } else c=ReadBlobByte(image); while (isspace(c) != 0) c=ReadBlobByte(image); } options=DestroyString(options); (void) ReadBlobByte(image); /* Verify that required image information is defined. */ if ((LocaleCompare(id,"MagickPixelCache") != 0) || (image->storage_class == UndefinedClass) || (image->compression == UndefinedCompression) || (image->columns == 0) || (image->rows == 0) || (image->number_channels > MaxPixelChannels) || (image->number_meta_channels > (MaxPixelChannels-8)) || ((image->number_channels+image->number_meta_channels) >= MaxPixelChannels) || (image->depth == 0) || (image->depth > 64)) { if (profiles != (LinkedListInfo *) NULL) profiles=DestroyLinkedList(profiles,RelinquishMagickMemory); ThrowReaderException(CorruptImageError,"ImproperImageHeader"); } if (signature != GetMagickSignature((const StringInfo *) NULL)) { if (profiles != (LinkedListInfo *) NULL) profiles=DestroyLinkedList(profiles,RelinquishMagickMemory); ThrowReaderException(CacheError,"IncompatibleAPI"); } if (image->montage != (char *) NULL) { register char *p; /* Image directory. */ extent=MagickPathExtent; image->directory=AcquireString((char *) NULL); p=image->directory; length=0; do { *p='\0'; if ((length+MagickPathExtent) >= extent) { /* Allocate more memory for the image directory. */ extent<<=1; image->directory=(char *) ResizeQuantumMemory(image->directory, extent+MagickPathExtent,sizeof(*image->directory)); if (image->directory == (char *) NULL) { if (profiles != (LinkedListInfo *) NULL) profiles=DestroyLinkedList(profiles,RelinquishMagickMemory); ThrowReaderException(CorruptImageError, "UnableToReadImageData"); } p=image->directory+length; } c=ReadBlobByte(image); if (c == EOF) break; *p++=(char) c; length++; } while (c != (int) '\0'); } if (profiles != (LinkedListInfo *) NULL) { const char *name; StringInfo *profile; /* Read image profile blobs. */ ResetLinkedListIterator(profiles); name=(const char *) GetNextValueInLinkedList(profiles); while (name != (const char *) NULL) { length=ReadBlobMSBLong(image); if ((MagickSizeType) length > GetBlobSize(image)) break; profile=AcquireStringInfo(length); if (profile == (StringInfo *) NULL) break; count=ReadBlob(image,length,GetStringInfoDatum(profile)); if (count != (ssize_t) length) { profile=DestroyStringInfo(profile); break; } status=SetImageProfile(image,name,profile,exception); profile=DestroyStringInfo(profile); if (status == MagickFalse) break; name=(const char *) GetNextValueInLinkedList(profiles); } profiles=DestroyLinkedList(profiles,RelinquishMagickMemory); } depth=GetImageQuantumDepth(image,MagickFalse); if (image->storage_class == PseudoClass) { size_t packet_size; unsigned char *colormap; /* Create image colormap. */ packet_size=(size_t) (3UL*depth/8UL); if ((MagickSizeType) (packet_size*image->colors) > GetBlobSize(image)) ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile"); image->colormap=(PixelInfo *) AcquireQuantumMemory(image->colors+1, sizeof(*image->colormap)); if (image->colormap == (PixelInfo *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); if (image->colors != 0) { /* Read image colormap from file. */ colormap=(unsigned char *) AcquireQuantumMemory(image->colors, packet_size*sizeof(*colormap)); if (colormap == (unsigned char *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); count=ReadBlob(image,packet_size*image->colors,colormap); if (count != (ssize_t) (packet_size*image->colors)) { colormap=(unsigned char *) RelinquishMagickMemory(colormap); ThrowReaderException(CorruptImageError, "InsufficientImageDataInFile"); } p=colormap; switch (depth) { default: colormap=(unsigned char *) RelinquishMagickMemory(colormap); ThrowReaderException(CorruptImageError, "ImageDepthNotSupported"); case 8: { unsigned char pixel; for (i=0; i < (ssize_t) image->colors; i++) { p=PushCharPixel(p,&pixel); image->colormap[i].red=(MagickRealType) ScaleCharToQuantum(pixel); p=PushCharPixel(p,&pixel); image->colormap[i].green=(MagickRealType) ScaleCharToQuantum(pixel); p=PushCharPixel(p,&pixel); image->colormap[i].blue=(MagickRealType) ScaleCharToQuantum(pixel); } break; } case 16: { unsigned short pixel; for (i=0; i < (ssize_t) image->colors; i++) { p=PushShortPixel(MSBEndian,p,&pixel); image->colormap[i].red=(MagickRealType) ScaleShortToQuantum(pixel); p=PushShortPixel(MSBEndian,p,&pixel); image->colormap[i].green=(MagickRealType) ScaleShortToQuantum(pixel); p=PushShortPixel(MSBEndian,p,&pixel); image->colormap[i].blue=(MagickRealType) ScaleShortToQuantum(pixel); } break; } case 32: { unsigned int pixel; for (i=0; i < (ssize_t) image->colors; i++) { p=PushLongPixel(MSBEndian,p,&pixel); image->colormap[i].red=(MagickRealType) ScaleLongToQuantum(pixel); p=PushLongPixel(MSBEndian,p,&pixel); image->colormap[i].green=(MagickRealType) ScaleLongToQuantum(pixel); p=PushLongPixel(MSBEndian,p,&pixel); image->colormap[i].blue=(MagickRealType) ScaleLongToQuantum(pixel); } break; } } colormap=(unsigned char *) RelinquishMagickMemory(colormap); } } if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0)) if (image->scene >= (image_info->scene+image_info->number_scenes-1)) break; if ((AcquireMagickResource(WidthResource,image->columns) == MagickFalse) || (AcquireMagickResource(HeightResource,image->rows) == MagickFalse)) ThrowReaderException(ImageError,"WidthOrHeightExceedsLimit"); /* Attach persistent pixel cache. */ status=PersistPixelCache(image,cache_filename,MagickTrue,&offset,exception); if (status == MagickFalse) { status=SetImageExtent(image,image->columns,image->rows,exception); ThrowReaderException(CacheError,"UnableToPersistPixelCache"); } if (EOFBlob(image) != MagickFalse) { ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile", image->filename); break; } /* Proceed to next image. */ do { c=ReadBlobByte(image); } while ((isgraph(c) == MagickFalse) && (c != EOF)); if (c != EOF) { /* Allocate next image structure. */ AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) { status=MagickFalse; break; } image=SyncNextImageInList(image); status=SetImageProgress(image,LoadImagesTag,TellBlob(image), GetBlobSize(image)); if (status == MagickFalse) break; } } while (c != EOF); (void) CloseBlob(image); if (status == MagickFalse) return(DestroyImageList(image)); return(GetFirstImageInList(image)); } /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % R e g i s t e r M P C I m a g e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % RegisterMPCImage() adds properties for the Cache image format to % the list of supported formats. The properties include the image format % tag, a method to read and/or write the format, whether the format % supports the saving of more than one frame to the same file or blob, % whether the format supports native in-memory I/O, and a brief % description of the format. % % The format of the RegisterMPCImage method is: % % size_t RegisterMPCImage(void) % */ ModuleExport size_t RegisterMPCImage(void) { MagickInfo *entry; entry=AcquireMagickInfo("MPC","CACHE", "Magick Persistent Cache image format"); entry->flags|=CoderStealthFlag; (void) RegisterMagickInfo(entry); entry=AcquireMagickInfo("MPC","MPC","Magick Persistent Cache image format"); entry->decoder=(DecodeImageHandler *) ReadMPCImage; entry->encoder=(EncodeImageHandler *) WriteMPCImage; entry->magick=(IsImageFormatHandler *) IsMPC; entry->flags|=CoderDecoderSeekableStreamFlag; (void) RegisterMagickInfo(entry); return(MagickImageCoderSignature); } /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % U n r e g i s t e r M P C I m a g e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % UnregisterMPCImage() removes format registrations made by the % MPC module from the list of supported formats. % % The format of the UnregisterMPCImage method is: % % UnregisterMPCImage(void) % */ ModuleExport void UnregisterMPCImage(void) { (void) UnregisterMagickInfo("CACHE"); (void) UnregisterMagickInfo("MPC"); } /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % W r i t e M P C I m a g e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % WriteMPCImage() writes an Magick Persistent Cache image to a file. % % The format of the WriteMPCImage method is: % % MagickBooleanType WriteMPCImage(const ImageInfo *image_info, % Image *image,ExceptionInfo *exception) % % A description of each parameter follows: % % o image_info: the image info. % % o image: the image. % % o exception: return any errors or warnings in this structure. % */ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { char buffer[MagickPathExtent], cache_filename[MagickPathExtent]; const char *property, *value; MagickBooleanType status; MagickOffsetType offset, scene; register ssize_t i; size_t depth, imageListLength; /* Open persistent cache. */ assert(image_info != (const ImageInfo *) NULL); assert(image_info->signature == MagickCoreSignature); assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickCoreSignature); status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); if (status == MagickFalse) return(status); (void) CopyMagickString(cache_filename,image->filename,MagickPathExtent-6); AppendImageFormat("cache",cache_filename); scene=0; offset=0; imageListLength=GetImageListLength(image); do { /* Write persistent cache meta-information. SetImageStorageClass() required to sync pixel cache. */ (void) SetImageStorageClass(image,image->storage_class,exception); depth=GetImageQuantumDepth(image,MagickTrue); if ((image->storage_class == PseudoClass) && (image->colors > (size_t) (GetQuantumRange(image->depth)+1))) (void) SetImageStorageClass(image,DirectClass,exception); (void) WriteBlobString(image,"id=MagickPixelCache\n"); (void) FormatLocaleString(buffer,MagickPathExtent,"magick-signature=%u\n", GetMagickSignature((const StringInfo *) NULL)); (void) WriteBlobString(image,buffer); (void) FormatLocaleString(buffer,MagickPathExtent, "class=%s colors=%.20g alpha-trait=%s\n",CommandOptionToMnemonic( MagickClassOptions,image->storage_class),(double) image->colors, CommandOptionToMnemonic(MagickPixelTraitOptions,(ssize_t) image->alpha_trait)); (void) WriteBlobString(image,buffer); (void) FormatLocaleString(buffer,MagickPathExtent, "number-channels=%.20g number-meta-channels=%.20g\n", (double) image->number_channels,(double) image->number_meta_channels); (void) WriteBlobString(image,buffer); (void) FormatLocaleString(buffer,MagickPathExtent, "columns=%.20g rows=%.20g depth=%.20g\n",(double) image->columns, (double) image->rows,(double) image->depth); (void) WriteBlobString(image,buffer); if (image->type != UndefinedType) { (void) FormatLocaleString(buffer,MagickPathExtent,"type=%s\n", CommandOptionToMnemonic(MagickTypeOptions,image->type)); (void) WriteBlobString(image,buffer); } (void) FormatLocaleString(buffer,MagickPathExtent,"colorspace=%s\n", CommandOptionToMnemonic(MagickColorspaceOptions,image->colorspace)); (void) WriteBlobString(image,buffer); if (image->intensity != UndefinedPixelIntensityMethod) { (void) FormatLocaleString(buffer,MagickPathExtent, "pixel-intensity=%s\n",CommandOptionToMnemonic( MagickPixelIntensityOptions,image->intensity)); (void) WriteBlobString(image,buffer); } if (image->endian != UndefinedEndian) { (void) FormatLocaleString(buffer,MagickPathExtent,"endian=%s\n", CommandOptionToMnemonic(MagickEndianOptions,image->endian)); (void) WriteBlobString(image,buffer); } if (image->compression != UndefinedCompression) { (void) FormatLocaleString(buffer,MagickPathExtent, "compression=%s quality=%.20g\n",CommandOptionToMnemonic( MagickCompressOptions,image->compression),(double) image->quality); (void) WriteBlobString(image,buffer); } if (image->units != UndefinedResolution) { (void) FormatLocaleString(buffer,MagickPathExtent,"units=%s\n", CommandOptionToMnemonic(MagickResolutionOptions,image->units)); (void) WriteBlobString(image,buffer); } if ((image->resolution.x != 0) || (image->resolution.y != 0)) { (void) FormatLocaleString(buffer,MagickPathExtent, "resolution=%gx%g\n",image->resolution.x,image->resolution.y); (void) WriteBlobString(image,buffer); } if ((image->page.width != 0) || (image->page.height != 0)) { (void) FormatLocaleString(buffer,MagickPathExtent, "page=%.20gx%.20g%+.20g%+.20g\n",(double) image->page.width,(double) image->page.height,(double) image->page.x,(double) image->page.y); (void) WriteBlobString(image,buffer); } else if ((image->page.x != 0) || (image->page.y != 0)) { (void) FormatLocaleString(buffer,MagickPathExtent,"page=%+ld%+ld\n", (long) image->page.x,(long) image->page.y); (void) WriteBlobString(image,buffer); } if ((image->tile_offset.x != 0) || (image->tile_offset.y != 0)) { (void) FormatLocaleString(buffer,MagickPathExtent, "tile-offset=%+ld%+ld\n",(long) image->tile_offset.x,(long) image->tile_offset.y); (void) WriteBlobString(image,buffer); } if ((GetNextImageInList(image) != (Image *) NULL) || (GetPreviousImageInList(image) != (Image *) NULL)) { if (image->scene == 0) (void) FormatLocaleString(buffer,MagickPathExtent, "iterations=%.20g delay=%.20g ticks-per-second=%.20g\n",(double) image->iterations,(double) image->delay,(double) image->ticks_per_second); else (void) FormatLocaleString(buffer,MagickPathExtent,"scene=%.20g " "iterations=%.20g delay=%.20g ticks-per-second=%.20g\n", (double) image->scene,(double) image->iterations,(double) image->delay,(double) image->ticks_per_second); (void) WriteBlobString(image,buffer); } else { if (image->scene != 0) { (void) FormatLocaleString(buffer,MagickPathExtent,"scene=%.20g\n", (double) image->scene); (void) WriteBlobString(image,buffer); } if (image->iterations != 0) { (void) FormatLocaleString(buffer,MagickPathExtent, "iterations=%.20g\n",(double) image->iterations); (void) WriteBlobString(image,buffer); } if (image->delay != 0) { (void) FormatLocaleString(buffer,MagickPathExtent,"delay=%.20g\n", (double) image->delay); (void) WriteBlobString(image,buffer); } if (image->ticks_per_second != UndefinedTicksPerSecond) { (void) FormatLocaleString(buffer,MagickPathExtent, "ticks-per-second=%.20g\n",(double) image->ticks_per_second); (void) WriteBlobString(image,buffer); } } if (image->gravity != UndefinedGravity) { (void) FormatLocaleString(buffer,MagickPathExtent,"gravity=%s\n", CommandOptionToMnemonic(MagickGravityOptions,image->gravity)); (void) WriteBlobString(image,buffer); } if (image->dispose != UndefinedDispose) { (void) FormatLocaleString(buffer,MagickPathExtent,"dispose=%s\n", CommandOptionToMnemonic(MagickDisposeOptions,image->dispose)); (void) WriteBlobString(image,buffer); } if (image->rendering_intent != UndefinedIntent) { (void) FormatLocaleString(buffer,MagickPathExtent, "rendering-intent=%s\n",CommandOptionToMnemonic(MagickIntentOptions, image->rendering_intent)); (void) WriteBlobString(image,buffer); } if (image->gamma != 0.0) { (void) FormatLocaleString(buffer,MagickPathExtent,"gamma=%g\n", image->gamma); (void) WriteBlobString(image,buffer); } if (image->chromaticity.white_point.x != 0.0) { /* Note chomaticity points. */ (void) FormatLocaleString(buffer,MagickPathExtent,"red-primary=" "%g,%g green-primary=%g,%g blue-primary=%g,%g\n", image->chromaticity.red_primary.x,image->chromaticity.red_primary.y, image->chromaticity.green_primary.x, image->chromaticity.green_primary.y, image->chromaticity.blue_primary.x, image->chromaticity.blue_primary.y); (void) WriteBlobString(image,buffer); (void) FormatLocaleString(buffer,MagickPathExtent, "white-point=%g,%g\n",image->chromaticity.white_point.x, image->chromaticity.white_point.y); (void) WriteBlobString(image,buffer); } if (image->orientation != UndefinedOrientation) { (void) FormatLocaleString(buffer,MagickPathExtent, "orientation=%s\n",CommandOptionToMnemonic(MagickOrientationOptions, image->orientation)); (void) WriteBlobString(image,buffer); } if (image->profiles != (void *) NULL) { const char *name; const StringInfo *profile; /* Write image profile names. */ ResetImageProfileIterator(image); for (name=GetNextImageProfile(image); name != (const char *) NULL; ) { profile=GetImageProfile(image,name); if (profile != (StringInfo *) NULL) { (void) FormatLocaleString(buffer,MagickPathExtent,"profile=%s\n", name); (void) WriteBlobString(image,buffer); } name=GetNextImageProfile(image); } } if (image->montage != (char *) NULL) { (void) FormatLocaleString(buffer,MagickPathExtent,"montage=%s\n", image->montage); (void) WriteBlobString(image,buffer); } ResetImagePropertyIterator(image); property=GetNextImageProperty(image); while (property != (const char *) NULL) { (void) FormatLocaleString(buffer,MagickPathExtent,"%s=",property); (void) WriteBlobString(image,buffer); value=GetImageProperty(image,property,exception); if (value != (const char *) NULL) { size_t length; length=strlen(value); for (i=0; i < (ssize_t) length; i++) if (isspace((int) ((unsigned char) value[i])) != 0) break; if ((i == (ssize_t) length) && (i != 0)) (void) WriteBlob(image,length,(const unsigned char *) value); else { (void) WriteBlobByte(image,'{'); if (strchr(value,'}') == (char *) NULL) (void) WriteBlob(image,length,(const unsigned char *) value); else for (i=0; i < (ssize_t) length; i++) { if (value[i] == (int) '}') (void) WriteBlobByte(image,'\\'); (void) WriteBlobByte(image,(unsigned char) value[i]); } (void) WriteBlobByte(image,'}'); } } (void) WriteBlobByte(image,'\n'); property=GetNextImageProperty(image); } (void) WriteBlobString(image,"\f\n:\032"); if (image->montage != (char *) NULL) { /* Write montage tile directory. */ if (image->directory != (char *) NULL) (void) WriteBlobString(image,image->directory); (void) WriteBlobByte(image,'\0'); } if (image->profiles != 0) { const char *name; const StringInfo *profile; /* Write image profile blobs. */ ResetImageProfileIterator(image); name=GetNextImageProfile(image); while (name != (const char *) NULL) { profile=GetImageProfile(image,name); (void) WriteBlobMSBLong(image,(unsigned int) GetStringInfoLength(profile)); (void) WriteBlob(image,GetStringInfoLength(profile), GetStringInfoDatum(profile)); name=GetNextImageProfile(image); } } if (image->storage_class == PseudoClass) { size_t packet_size; unsigned char *colormap, *q; /* Allocate colormap. */ packet_size=(size_t) (3UL*depth/8UL); colormap=(unsigned char *) AcquireQuantumMemory(image->colors, packet_size*sizeof(*colormap)); if (colormap == (unsigned char *) NULL) return(MagickFalse); /* Write colormap to file. */ q=colormap; for (i=0; i < (ssize_t) image->colors; i++) { switch (depth) { default: { colormap=(unsigned char *) RelinquishMagickMemory(colormap); ThrowWriterException(CorruptImageError,"ImageDepthNotSupported"); break; } case 32: { unsigned int pixel; pixel=ScaleQuantumToLong(ClampToQuantum(image->colormap[i].red)); q=PopLongPixel(MSBEndian,pixel,q); pixel=ScaleQuantumToLong(ClampToQuantum( image->colormap[i].green)); q=PopLongPixel(MSBEndian,pixel,q); pixel=ScaleQuantumToLong(ClampToQuantum(image->colormap[i].blue)); q=PopLongPixel(MSBEndian,pixel,q); break; } case 16: { unsigned short pixel; pixel=ScaleQuantumToShort(ClampToQuantum(image->colormap[i].red)); q=PopShortPixel(MSBEndian,pixel,q); pixel=ScaleQuantumToShort(ClampToQuantum( image->colormap[i].green)); q=PopShortPixel(MSBEndian,pixel,q); pixel=ScaleQuantumToShort(ClampToQuantum( image->colormap[i].blue)); q=PopShortPixel(MSBEndian,pixel,q); break; } case 8: { unsigned char pixel; pixel=(unsigned char) ScaleQuantumToChar(ClampToQuantum( image->colormap[i].red)); q=PopCharPixel(pixel,q); pixel=(unsigned char) ScaleQuantumToChar(ClampToQuantum( image->colormap[i].green)); q=PopCharPixel(pixel,q); pixel=(unsigned char) ScaleQuantumToChar(ClampToQuantum( image->colormap[i].blue)); q=PopCharPixel(pixel,q); break; } } } (void) WriteBlob(image,packet_size*image->colors,colormap); colormap=(unsigned char *) RelinquishMagickMemory(colormap); } /* Initialize persistent pixel cache. */ status=PersistPixelCache(image,cache_filename,MagickFalse,&offset, exception); if (status == MagickFalse) ThrowWriterException(CacheError,"UnableToPersistPixelCache"); if (GetNextImageInList(image) == (Image *) NULL) break; image=SyncNextImageInList(image); if (image->progress_monitor != (MagickProgressMonitor) NULL) { status=image->progress_monitor(SaveImagesTag,scene, imageListLength,image->client_data); if (status == MagickFalse) break; } scene++; } while (image_info->adjoin != MagickFalse); (void) CloseBlob(image); return(status); }
Close