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.128.171.149
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 : webp.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % W W EEEEE BBBB PPPP % % W W E B B P P % % W W W EEE BBBB PPPP % % WW WW E B B P % % W W EEEEE BBBB P % % % % % % Read/Write WebP Image Format % % % % Software Design % % Cristy % % March 2011 % % % % % % 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/blob.h" #include "MagickCore/blob-private.h" #include "MagickCore/client.h" #include "MagickCore/colorspace-private.h" #include "MagickCore/display.h" #include "MagickCore/exception.h" #include "MagickCore/exception-private.h" #include "MagickCore/image.h" #include "MagickCore/image-private.h" #include "MagickCore/list.h" #include "MagickCore/magick.h" #include "MagickCore/monitor.h" #include "MagickCore/monitor-private.h" #include "MagickCore/memory_.h" #include "MagickCore/option.h" #include "MagickCore/pixel-accessor.h" #include "MagickCore/profile.h" #include "MagickCore/property.h" #include "MagickCore/quantum-private.h" #include "MagickCore/static.h" #include "MagickCore/string_.h" #include "MagickCore/string-private.h" #include "MagickCore/module.h" #include "MagickCore/utility.h" #include "MagickCore/xwindow.h" #include "MagickCore/xwindow-private.h" #if defined(MAGICKCORE_WEBP_DELEGATE) #include <webp/decode.h> #include <webp/encode.h> #if defined(MAGICKCORE_WEBPMUX_DELEGATE) #include <webp/mux.h> #include <webp/demux.h> #endif #endif /* Forward declarations. */ #if defined(MAGICKCORE_WEBP_DELEGATE) static MagickBooleanType WriteWEBPImage(const ImageInfo *,Image *,ExceptionInfo *); #endif /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % I s W E B P % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % IsWEBP() returns MagickTrue if the image format type, identified by the % magick string, is WebP. % % The format of the IsWEBP method is: % % MagickBooleanType IsWEBP(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 IsWEBP(const unsigned char *magick,const size_t length) { if (length < 12) return(MagickFalse); if (LocaleNCompare((const char *) magick+8,"WEBP",4) == 0) return(MagickTrue); return(MagickFalse); } #if defined(MAGICKCORE_WEBP_DELEGATE) /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % R e a d W E B P I m a g e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % ReadWEBPImage() reads an image in the WebP image format. % % The format of the ReadWEBPImage method is: % % Image *ReadWEBPImage(const ImageInfo *image_info, % ExceptionInfo *exception) % % A description of each parameter follows: % % o image_info: the image info. % % o exception: return any errors or warnings in this structure. % */ static inline uint32_t ReadWebPLSBWord( const unsigned char *magick_restrict data) { register const unsigned char *p; register uint32_t value; p=data; value=(uint32_t) (*p++); value|=((uint32_t) (*p++)) << 8; value|=((uint32_t) (*p++)) << 16; value|=((uint32_t) (*p++)) << 24; return(value); } static MagickBooleanType IsWEBPImageLossless(const unsigned char *stream, const size_t length) { #define VP8_CHUNK_INDEX 15 #define LOSSLESS_FLAG 'L' #define EXTENDED_HEADER 'X' #define VP8_CHUNK_HEADER "VP8" #define VP8_CHUNK_HEADER_SIZE 3 #define RIFF_HEADER_SIZE 12 #define VP8X_CHUNK_SIZE 10 #define TAG_SIZE 4 #define CHUNK_SIZE_BYTES 4 #define CHUNK_HEADER_SIZE 8 #define MAX_CHUNK_PAYLOAD (~0U-CHUNK_HEADER_SIZE-1) size_t offset; /* Read simple header. */ if (length <= VP8_CHUNK_INDEX) return(MagickFalse); if (stream[VP8_CHUNK_INDEX] != EXTENDED_HEADER) return(stream[VP8_CHUNK_INDEX] == LOSSLESS_FLAG ? MagickTrue : MagickFalse); /* Read extended header. */ offset=RIFF_HEADER_SIZE+TAG_SIZE+CHUNK_SIZE_BYTES+VP8X_CHUNK_SIZE; while (offset <= (length-TAG_SIZE-TAG_SIZE-4)) { uint32_t chunk_size, chunk_size_pad; chunk_size=ReadWebPLSBWord(stream+offset+TAG_SIZE); if (chunk_size > MAX_CHUNK_PAYLOAD) break; chunk_size_pad=(CHUNK_HEADER_SIZE+chunk_size+1) & ~1; if (memcmp(stream+offset,VP8_CHUNK_HEADER,VP8_CHUNK_HEADER_SIZE) == 0) return(*(stream+offset+VP8_CHUNK_HEADER_SIZE) == LOSSLESS_FLAG ? MagickTrue : MagickFalse); offset+=chunk_size_pad; } return(MagickFalse); } static int FillBasicWEBPInfo(Image *image,const uint8_t *stream,size_t length, WebPDecoderConfig *configure) { WebPBitstreamFeatures *magick_restrict features = &configure->input; int webp_status; webp_status=WebPGetFeatures(stream,length,features); if (webp_status != VP8_STATUS_OK) return(webp_status); image->columns=(size_t) features->width; image->rows=(size_t) features->height; image->depth=8; image->alpha_trait=features->has_alpha != 0 ? BlendPixelTrait : UndefinedPixelTrait; return(webp_status); } static int ReadSingleWEBPImage(Image *image,const uint8_t *stream, size_t length,WebPDecoderConfig *configure,ExceptionInfo *exception, MagickBooleanType is_first) { int webp_status; register unsigned char *p; size_t canvas_width, canvas_height, image_width, image_height; ssize_t x_offset, y_offset, y; WebPDecBuffer *magick_restrict webp_image = &configure->output; MagickBooleanType status; if (is_first) { canvas_width=image->columns; canvas_height=image->rows; x_offset=image->page.x; y_offset=image->page.y; image->page.x=0; image->page.y=0; } else { x_offset=0; y_offset=0; } webp_status=FillBasicWEBPInfo(image,stream,length,configure); image_width=image->columns; image_height=image->rows; if (is_first) { image->columns=canvas_width; image->rows=canvas_height; } if (webp_status != VP8_STATUS_OK) return(webp_status); if (IsWEBPImageLossless(stream,length) != MagickFalse) image->quality=100; webp_status=WebPDecode(stream,length,configure); if (webp_status != VP8_STATUS_OK) return(webp_status); p=(unsigned char *) webp_image->u.RGBA.rgba; for (y=0; y < (ssize_t) image->rows; y++) { register Quantum *q; register ssize_t x; q=QueueAuthenticPixels(image,0,y,image->columns,1,exception); if (q == (Quantum *) NULL) break; for (x=0; x < (ssize_t) image->columns; x++) { if ((x >= x_offset && x < x_offset + image_width) && (y >= y_offset && y < y_offset + image_height)) { SetPixelRed(image,ScaleCharToQuantum(*p++),q); SetPixelGreen(image,ScaleCharToQuantum(*p++),q); SetPixelBlue(image,ScaleCharToQuantum(*p++),q); SetPixelAlpha(image,ScaleCharToQuantum(*p++),q); } else { SetPixelRed(image,0,q); SetPixelGreen(image,0,q); SetPixelBlue(image,0,q); SetPixelAlpha(image,0,q); } q+=GetPixelChannels(image); } if (SyncAuthenticPixels(image,exception) == MagickFalse) break; status=SetImageProgress(image,LoadImageTag,(MagickOffsetType) y, image->rows); if (status == MagickFalse) break; } WebPFreeDecBuffer(webp_image); #if defined(MAGICKCORE_WEBPMUX_DELEGATE) { StringInfo *profile; uint32_t webp_flags = 0; WebPData chunk, content; WebPMux *mux; /* Extract any profiles. */ content.bytes=stream; content.size=length; mux=WebPMuxCreate(&content,0); (void) memset(&chunk,0,sizeof(chunk)); WebPMuxGetFeatures(mux,&webp_flags); if (webp_flags & ICCP_FLAG) { WebPMuxGetChunk(mux,"ICCP",&chunk); profile=BlobToStringInfo(chunk.bytes,chunk.size); if (profile != (StringInfo *) NULL) { SetImageProfile(image,"ICC",profile,exception); profile=DestroyStringInfo(profile); } } if (webp_flags & EXIF_FLAG) { WebPMuxGetChunk(mux,"EXIF",&chunk); profile=BlobToStringInfo(chunk.bytes,chunk.size); if (profile != (StringInfo *) NULL) { SetImageProfile(image,"EXIF",profile,exception); profile=DestroyStringInfo(profile); } } if (webp_flags & XMP_FLAG) { WebPMuxGetChunk(mux,"XMP",&chunk); profile=BlobToStringInfo(chunk.bytes,chunk.size); if (profile != (StringInfo *) NULL) { SetImageProfile(image,"XMP",profile,exception); profile=DestroyStringInfo(profile); } } WebPMuxDelete(mux); } #endif return(webp_status); } #if defined(MAGICKCORE_WEBPMUX_DELEGATE) static int ReadAnimatedWEBPImage(const ImageInfo *image_info,Image *image, uint8_t *stream,size_t length,WebPDecoderConfig *configure, ExceptionInfo *exception) { Image *original_image; int image_count, webp_status; size_t canvas_width, canvas_height; WebPData data; WebPDemuxer *demux; WebPIterator iter; image_count=0; webp_status=0; original_image=image; webp_status=FillBasicWEBPInfo(image,stream,length,configure); canvas_width=image->columns; canvas_height=image->rows; data.bytes=stream; data.size=length; demux=WebPDemux(&data); if (WebPDemuxGetFrame(demux,1,&iter)) { do { if (image_count != 0) { AcquireNextImage(image_info,image,exception); if (GetNextImageInList(image) == (Image *) NULL) break; image=SyncNextImageInList(image); CloneImageProperties(image,original_image); image->page.x=iter.x_offset; image->page.y=iter.y_offset; webp_status=ReadSingleWEBPImage(image,iter.fragment.bytes, iter.fragment.size,configure,exception,MagickFalse); } else { image->page.x=iter.x_offset; image->page.y=iter.y_offset; webp_status=ReadSingleWEBPImage(image,iter.fragment.bytes, iter.fragment.size,configure,exception,MagickTrue); } if (webp_status != VP8_STATUS_OK) break; image->page.width=canvas_width; image->page.height=canvas_height; image->ticks_per_second=100; image->delay=iter.duration/10; if (iter.dispose_method == WEBP_MUX_DISPOSE_BACKGROUND) image->dispose=BackgroundDispose; image_count++; } while (WebPDemuxNextFrame(&iter)); WebPDemuxReleaseIterator(&iter); } WebPDemuxDelete(demux); return(webp_status); } #endif static Image *ReadWEBPImage(const ImageInfo *image_info, ExceptionInfo *exception) { #define ThrowWEBPException(severity,tag) \ { \ if (stream != (unsigned char *) NULL) \ stream=(unsigned char*) RelinquishMagickMemory(stream); \ if (webp_image != (WebPDecBuffer *) NULL) \ WebPFreeDecBuffer(webp_image); \ ThrowReaderException(severity,tag); \ } Image *image; int webp_status; MagickBooleanType status; size_t length; ssize_t count; unsigned char header[12], *stream; WebPDecoderConfig configure; WebPDecBuffer *magick_restrict webp_image = &configure.output; /* 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); } stream=(unsigned char *) NULL; if (WebPInitDecoderConfig(&configure) == 0) ThrowReaderException(ResourceLimitError,"UnableToDecodeImageFile"); webp_image->colorspace=MODE_RGBA; count=ReadBlob(image,12,header); if (count != 12) ThrowWEBPException(CorruptImageError,"InsufficientImageDataInFile"); status=IsWEBP(header,count); if (status == MagickFalse) ThrowWEBPException(CorruptImageError,"CorruptImage"); length=(size_t) (ReadWebPLSBWord(header+4)+8); if (length < 12) ThrowWEBPException(CorruptImageError,"CorruptImage"); if (length > GetBlobSize(image)) ThrowWEBPException(CorruptImageError,"InsufficientImageDataInFile"); stream=(unsigned char *) AcquireQuantumMemory(length,sizeof(*stream)); if (stream == (unsigned char *) NULL) ThrowWEBPException(ResourceLimitError,"MemoryAllocationFailed"); (void) memcpy(stream,header,12); count=ReadBlob(image,length-12,stream+12); if (count != (ssize_t) (length-12)) ThrowWEBPException(CorruptImageError,"InsufficientImageDataInFile"); webp_status=FillBasicWEBPInfo(image,stream,length,&configure); if (webp_status == VP8_STATUS_OK) { if (configure.input.has_animation) { #if defined(MAGICKCORE_WEBPMUX_DELEGATE) webp_status=ReadAnimatedWEBPImage(image_info,image,stream,length, &configure,exception); #else webp_status=VP8_STATUS_UNSUPPORTED_FEATURE; #endif } else { webp_status=ReadSingleWEBPImage(image,stream,length,&configure,exception,MagickFalse); } } if (webp_status != VP8_STATUS_OK) switch (webp_status) { case VP8_STATUS_OUT_OF_MEMORY: { ThrowWEBPException(ResourceLimitError,"MemoryAllocationFailed"); break; } case VP8_STATUS_INVALID_PARAM: { ThrowWEBPException(CorruptImageError,"invalid parameter"); break; } case VP8_STATUS_BITSTREAM_ERROR: { ThrowWEBPException(CorruptImageError,"CorruptImage"); break; } case VP8_STATUS_UNSUPPORTED_FEATURE: { ThrowWEBPException(CoderError,"DataEncodingSchemeIsNotSupported"); break; } case VP8_STATUS_SUSPENDED: { ThrowWEBPException(CorruptImageError,"decoder suspended"); break; } case VP8_STATUS_USER_ABORT: { ThrowWEBPException(CorruptImageError,"user abort"); break; } case VP8_STATUS_NOT_ENOUGH_DATA: { ThrowWEBPException(CorruptImageError,"InsufficientImageDataInFile"); break; } default: ThrowWEBPException(CorruptImageError,"CorruptImage"); } stream=(unsigned char*) RelinquishMagickMemory(stream); (void) CloseBlob(image); return(image); } #endif /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % R e g i s t e r W E B P I m a g e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % RegisterWEBPImage() adds attributes for the WebP image format to % the list of supported formats. The attributes 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 RegisterWEBPImage method is: % % size_t RegisterWEBPImage(void) % */ ModuleExport size_t RegisterWEBPImage(void) { char version[MagickPathExtent]; MagickInfo *entry; *version='\0'; entry=AcquireMagickInfo("WEBP","WEBP","WebP Image Format"); #if defined(MAGICKCORE_WEBP_DELEGATE) entry->decoder=(DecodeImageHandler *) ReadWEBPImage; entry->encoder=(EncodeImageHandler *) WriteWEBPImage; (void) FormatLocaleString(version,MagickPathExtent,"libwebp %d.%d.%d [%04X]", (WebPGetEncoderVersion() >> 16) & 0xff, (WebPGetEncoderVersion() >> 8) & 0xff, (WebPGetEncoderVersion() >> 0) & 0xff,WEBP_ENCODER_ABI_VERSION); #endif entry->mime_type=ConstantString("image/webp"); entry->flags|=CoderDecoderSeekableStreamFlag; #if !defined(MAGICKCORE_WEBPMUX_DELEGATE) entry->flags^=CoderAdjoinFlag; #endif entry->magick=(IsImageFormatHandler *) IsWEBP; if (*version != '\0') entry->version=ConstantString(version); (void) RegisterMagickInfo(entry); return(MagickImageCoderSignature); } /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % U n r e g i s t e r W E B P I m a g e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % UnregisterWEBPImage() removes format registrations made by the WebP module % from the list of supported formats. % % The format of the UnregisterWEBPImage method is: % % UnregisterWEBPImage(void) % */ ModuleExport void UnregisterWEBPImage(void) { (void) UnregisterMagickInfo("WEBP"); } #if defined(MAGICKCORE_WEBP_DELEGATE) /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % W r i t e W E B P I m a g e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % WriteWEBPImage() writes an image in the WebP image format. % % The format of the WriteWEBPImage method is: % % MagickBooleanType WriteWEBPImage(const ImageInfo *image_info, % Image *image) % % A description of each parameter follows. % % o image_info: the image info. % % o image: The image. % */ #if WEBP_ENCODER_ABI_VERSION >= 0x0100 static int WebPEncodeProgress(int percent,const WebPPicture* picture) { #define EncodeImageTag "Encode/Image" Image *image; MagickBooleanType status; image=(Image *) picture->user_data; status=SetImageProgress(image,EncodeImageTag,percent-1,100); return(status == MagickFalse ? 0 : 1); } #endif #if !defined(MAGICKCORE_WEBPMUX_DELEGATE) static int WebPEncodeWriter(const unsigned char *stream,size_t length, const WebPPicture *const picture) { Image *image; image=(Image *) picture->custom_ptr; return(length != 0 ? (WriteBlob(image,length,stream) == (ssize_t) length) : 1); } #endif typedef struct PictureMemory { MemoryInfo *pixel_info; struct PictureMemory *next; } PictureMemory; static MagickBooleanType WriteSingleWEBPImage(const ImageInfo *image_info, Image *image,WebPPicture *picture,PictureMemory *picture_memory, ExceptionInfo *exception) { MagickBooleanType status = MagickFalse; register uint32_t *magick_restrict q; ssize_t y; #if WEBP_ENCODER_ABI_VERSION >= 0x0100 picture->progress_hook=WebPEncodeProgress; picture->user_data=(void *) image; #endif picture->width=(int) image->columns; picture->height=(int) image->rows; picture->argb_stride=(int) image->columns; picture->use_argb=1; /* Allocate memory for pixels. */ (void) TransformImageColorspace(image,sRGBColorspace,exception); picture_memory->pixel_info=AcquireVirtualMemory(image->columns,image->rows* sizeof(*(picture->argb))); if (picture_memory->pixel_info == (MemoryInfo *) NULL) ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); picture->argb=(uint32_t *) GetVirtualMemoryBlob(picture_memory->pixel_info); /* Convert image to WebP raster pixels. */ q=picture->argb; for (y=0; y < (ssize_t) image->rows; y++) { register const Quantum *magick_restrict p; register ssize_t x; p=GetVirtualPixels(image,0,y,image->columns,1,exception); if (p == (const Quantum *) NULL) break; for (x=0; x < (ssize_t) image->columns; x++) { *q++=(uint32_t) (image->alpha_trait != UndefinedPixelTrait ? (uint32_t) ScaleQuantumToChar(GetPixelAlpha(image,p)) << 24 : 0xff000000) | ((uint32_t) ScaleQuantumToChar(GetPixelRed(image,p)) << 16) | ((uint32_t) ScaleQuantumToChar(GetPixelGreen(image,p)) << 8) | ((uint32_t) ScaleQuantumToChar(GetPixelBlue(image,p))); p+=GetPixelChannels(image); } status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y, image->rows); if (status == MagickFalse) break; } return status; } #if defined(MAGICKCORE_WEBPMUX_DELEGATE) static void FreePictureMemoryList (PictureMemory* head) { PictureMemory* next; while(head != NULL) { next = head->next; if(head->pixel_info != NULL) RelinquishVirtualMemory(head->pixel_info); free(head); head = next; } } static MagickBooleanType WriteAnimatedWEBPImage(const ImageInfo *image_info, Image *image,WebPConfig *configure,WebPMemoryWriter *writer_info, ExceptionInfo *exception) { Image *first_image; PictureMemory *current, *head; size_t effective_delta = 0, frame_timestamp = 0; WebPAnimEncoder *enc; WebPAnimEncoderOptions enc_options; WebPData webp_data; WebPPicture picture; WebPAnimEncoderOptionsInit(&enc_options); if (image_info->verbose) enc_options.verbose = 1; image=CoalesceImages(image, exception); first_image=image; enc=WebPAnimEncoderNew((int) image->page.width,(int) image->page.height, &enc_options); head=(PictureMemory *) calloc(sizeof(*head),1); current=head; while (image != NULL) { if (WebPPictureInit(&picture) == 0) ThrowWriterException(ResourceLimitError,"UnableToEncodeImageFile"); WriteSingleWEBPImage(image_info, image, &picture, current, exception); effective_delta = image->delay*1000/image->ticks_per_second; if (effective_delta < 10) effective_delta = 100; /* Consistent with gif2webp */ frame_timestamp+=effective_delta; WebPAnimEncoderAdd(enc,&picture,(int) frame_timestamp,configure); image = GetNextImageInList(image); current->next=(PictureMemory *) calloc(sizeof(*head), 1); current = current->next; } webp_data.bytes=writer_info->mem; webp_data.size=writer_info->size; WebPAnimEncoderAssemble(enc, &webp_data); WebPMemoryWriterClear(writer_info); writer_info->size=webp_data.size; writer_info->mem=(unsigned char *) webp_data.bytes; WebPAnimEncoderDelete(enc); DestroyImageList(first_image); FreePictureMemoryList(head); return(MagickTrue); } #endif static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info, Image *image,ExceptionInfo * exception) { const char *value; int webp_status; MagickBooleanType status; WebPAuxStats statistics; WebPConfig configure; #if defined(MAGICKCORE_WEBPMUX_DELEGATE) WebPMemoryWriter writer_info; #endif WebPPicture picture; PictureMemory memory = {0}; /* Open output image file. */ 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); if ((image->columns > 16383UL) || (image->rows > 16383UL)) ThrowWriterException(ImageError,"WidthOrHeightExceedsLimit"); status=OpenBlob(image_info,image,WriteBinaryBlobMode,exception); if (status == MagickFalse) return(status); if (WebPConfigInit(&configure) == 0) ThrowWriterException(ResourceLimitError,"UnableToEncodeImageFile"); if (WebPPictureInit(&picture) == 0) ThrowWriterException(ResourceLimitError,"UnableToEncodeImageFile"); #if !defined(MAGICKCORE_WEBPMUX_DELEGATE) picture.writer=WebPEncodeWriter; picture.custom_ptr=(void *) image; #else WebPMemoryWriterInit(&writer_info); picture.writer=WebPMemoryWrite; picture.custom_ptr=(&writer_info); #endif picture.stats=(&statistics); if (image->quality != UndefinedCompressionQuality) configure.quality=(float) image->quality; if (image->quality >= 100) configure.lossless=1; value=GetImageOption(image_info,"webp:lossless"); if (value != (char *) NULL) configure.lossless=(int) ParseCommandOption(MagickBooleanOptions, MagickFalse,value); value=GetImageOption(image_info,"webp:method"); if (value != (char *) NULL) configure.method=StringToInteger(value); value=GetImageOption(image_info,"webp:image-hint"); if (value != (char *) NULL) { if (LocaleCompare(value,"default") == 0) configure.image_hint=WEBP_HINT_DEFAULT; if (LocaleCompare(value,"photo") == 0) configure.image_hint=WEBP_HINT_PHOTO; if (LocaleCompare(value,"picture") == 0) configure.image_hint=WEBP_HINT_PICTURE; #if WEBP_ENCODER_ABI_VERSION >= 0x0200 if (LocaleCompare(value,"graph") == 0) configure.image_hint=WEBP_HINT_GRAPH; #endif } value=GetImageOption(image_info,"webp:target-size"); if (value != (char *) NULL) configure.target_size=StringToInteger(value); value=GetImageOption(image_info,"webp:target-psnr"); if (value != (char *) NULL) configure.target_PSNR=(float) StringToDouble(value,(char **) NULL); value=GetImageOption(image_info,"webp:segments"); if (value != (char *) NULL) configure.segments=StringToInteger(value); value=GetImageOption(image_info,"webp:sns-strength"); if (value != (char *) NULL) configure.sns_strength=StringToInteger(value); value=GetImageOption(image_info,"webp:filter-strength"); if (value != (char *) NULL) configure.filter_strength=StringToInteger(value); value=GetImageOption(image_info,"webp:filter-sharpness"); if (value != (char *) NULL) configure.filter_sharpness=StringToInteger(value); value=GetImageOption(image_info,"webp:filter-type"); if (value != (char *) NULL) configure.filter_type=StringToInteger(value); value=GetImageOption(image_info,"webp:auto-filter"); if (value != (char *) NULL) configure.autofilter=(int) ParseCommandOption(MagickBooleanOptions, MagickFalse,value); value=GetImageOption(image_info,"webp:alpha-compression"); if (value != (char *) NULL) configure.alpha_compression=StringToInteger(value); value=GetImageOption(image_info,"webp:alpha-filtering"); if (value != (char *) NULL) configure.alpha_filtering=StringToInteger(value); value=GetImageOption(image_info,"webp:alpha-quality"); if (value != (char *) NULL) configure.alpha_quality=StringToInteger(value); value=GetImageOption(image_info,"webp:pass"); if (value != (char *) NULL) configure.pass=StringToInteger(value); value=GetImageOption(image_info,"webp:show-compressed"); if (value != (char *) NULL) configure.show_compressed=StringToInteger(value); value=GetImageOption(image_info,"webp:preprocessing"); if (value != (char *) NULL) configure.preprocessing=StringToInteger(value); value=GetImageOption(image_info,"webp:partitions"); if (value != (char *) NULL) configure.partitions=StringToInteger(value); value=GetImageOption(image_info,"webp:partition-limit"); if (value != (char *) NULL) configure.partition_limit=StringToInteger(value); #if WEBP_ENCODER_ABI_VERSION >= 0x0201 value=GetImageOption(image_info,"webp:emulate-jpeg-size"); if (value != (char *) NULL) configure.emulate_jpeg_size=(int) ParseCommandOption(MagickBooleanOptions, MagickFalse,value); value=GetImageOption(image_info,"webp:low-memory"); if (value != (char *) NULL) configure.low_memory=(int) ParseCommandOption(MagickBooleanOptions, MagickFalse,value); value=GetImageOption(image_info,"webp:thread-level"); if (value != (char *) NULL) configure.thread_level=StringToInteger(value); #endif #if WEBP_ENCODER_ABI_VERSION >= 0x020e value=GetImageOption(image_info,"webp:use-sharp-yuv"); if (value != (char *) NULL) configure.use_sharp_yuv=StringToInteger(value); #endif if (WebPValidateConfig(&configure) == 0) ThrowWriterException(ResourceLimitError,"UnableToEncodeImageFile"); WriteSingleWEBPImage(image_info,image,&picture,&memory,exception); #if defined(MAGICKCORE_WEBPMUX_DELEGATE) if ((image_info->adjoin != MagickFalse) && (GetPreviousImageInList(image) == (Image *) NULL) && (GetNextImageInList(image) != (Image *) NULL) && (image->iterations != 1)) WriteAnimatedWEBPImage(image_info,image,&configure,&writer_info,exception); #endif webp_status=WebPEncode(&configure,&picture); if (webp_status == 0) { const char *message; switch (picture.error_code) { case VP8_ENC_ERROR_OUT_OF_MEMORY: { message="out of memory"; break; } case VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY: { message="bitstream out of memory"; break; } case VP8_ENC_ERROR_NULL_PARAMETER: { message="NULL parameter"; break; } case VP8_ENC_ERROR_INVALID_CONFIGURATION: { message="invalid configuration"; break; } case VP8_ENC_ERROR_BAD_DIMENSION: { message="bad dimension"; break; } case VP8_ENC_ERROR_PARTITION0_OVERFLOW: { message="partition 0 overflow (> 512K)"; break; } case VP8_ENC_ERROR_PARTITION_OVERFLOW: { message="partition overflow (> 16M)"; break; } case VP8_ENC_ERROR_BAD_WRITE: { message="bad write"; break; } case VP8_ENC_ERROR_FILE_TOO_BIG: { message="file too big (> 4GB)"; break; } #if WEBP_ENCODER_ABI_VERSION >= 0x0100 case VP8_ENC_ERROR_USER_ABORT: { message="user abort"; break; } #endif default: { message="unknown exception"; break; } } (void) ThrowMagickException(exception,GetMagickModule(),CorruptImageError, (char *) message,"`%s'",image->filename); } #if defined(MAGICKCORE_WEBPMUX_DELEGATE) { const StringInfo *profile; WebPData chunk, image_chunk; WebPMux *mux; WebPMuxError mux_error; /* Set image profiles (if any). */ image_chunk.bytes=writer_info.mem; image_chunk.size=writer_info.size; mux_error=WEBP_MUX_OK; (void) memset(&chunk,0,sizeof(chunk)); mux=WebPMuxNew(); profile=GetImageProfile(image,"ICC"); if ((profile != (StringInfo *) NULL) && (mux_error == WEBP_MUX_OK)) { chunk.bytes=GetStringInfoDatum(profile); chunk.size=GetStringInfoLength(profile); mux_error=WebPMuxSetChunk(mux,"ICCP",&chunk,0); } profile=GetImageProfile(image,"EXIF"); if ((profile != (StringInfo *) NULL) && (mux_error == WEBP_MUX_OK)) { chunk.bytes=GetStringInfoDatum(profile); chunk.size=GetStringInfoLength(profile); mux_error=WebPMuxSetChunk(mux,"EXIF",&chunk,0); } profile=GetImageProfile(image,"XMP"); if ((profile != (StringInfo *) NULL) && (mux_error == WEBP_MUX_OK)) { chunk.bytes=GetStringInfoDatum(profile); chunk.size=GetStringInfoLength(profile); mux_error=WebPMuxSetChunk(mux,"XMP",&chunk,0); } if (mux_error != WEBP_MUX_OK) (void) ThrowMagickException(exception,GetMagickModule(), ResourceLimitError,"UnableToEncodeImageFile","`%s'",image->filename); if (chunk.size != 0) { WebPData picture_profiles; /* Replace original container with image profile (if any). */ picture_profiles.bytes=writer_info.mem; picture_profiles.size=writer_info.size; WebPMuxSetImage(mux,&image_chunk,1); mux_error=WebPMuxAssemble(mux,&picture_profiles); WebPMemoryWriterClear(&writer_info); writer_info.size=picture_profiles.size; writer_info.mem=(unsigned char *) picture_profiles.bytes; } WebPMuxDelete(mux); } (void) WriteBlob(image,writer_info.size,writer_info.mem); #endif picture.argb=(uint32_t *) NULL; WebPPictureFree(&picture); #if defined(MAGICKCORE_WEBPMUX_DELEGATE) WebPMemoryWriterClear(&writer_info); #endif (void) CloseBlob(image); RelinquishVirtualMemory(memory.pixel_info); return(webp_status == 0 ? MagickFalse : MagickTrue); } #endif
Close