Skip to content

Commit d2586b4

Browse files
authored
Merge pull request #15 from zaz/master
fix #14: webpmux_animate not running
2 parents aa7400f + ff33c48 commit d2586b4

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

Diff for: README.md

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[Webptools v0.0.7](https://pypi.org/project/webptools/)
1+
[Webptools v0.0.8](https://pypi.org/project/webptools/)
22

33
webptools is a Webp image conversion package for the python.
44

@@ -122,7 +122,7 @@ from webptools import webpmux_add
122122
# for XMP metadata: xmp
123123
# for EXIF metadata: exif
124124
print(webpmux_add(input_image="in.webp", output_image="icc_container.webp",
125-
icc_profile="image_profile.icc", option="icc", logging="-v"))
125+
icc_profile="image_profile.icc", option="icc"))
126126
```
127127

128128
## Extract ICC profile,XMP metadata and EXIF metadata
@@ -137,8 +137,7 @@ from webptools import webpmux_extract
137137
# for XMP metadata: xmp
138138
# for EXIF metadata: exif
139139
print(webpmux_extract(input_image="anim_container.webp",
140-
icc_profile="image_profile.icc", option="icc",
141-
logging="-v"))
140+
icc_profile="image_profile.icc", option="icc"))
142141
```
143142

144143
## Strip ICC profile,XMP metadata and EXIF metadata
@@ -153,8 +152,7 @@ from webptools import webpmux_strip
153152
# for XMP metadata: xmp
154153
# for EXIF metadata: exif
155154
print(webpmux_strip(input_image="icc_container.webp",
156-
output_image="without_icc.webp", option="icc",
157-
logging="-v"))
155+
output_image="without_icc.webp", option="icc"))
158156

159157

160158
```
@@ -198,7 +196,7 @@ from webptools import webpmux_animate
198196
input = ["./frames/tmp-0.webp +100", "./frames/tmp-1.webp +100",
199197
"./frames/tmp-2.webp +100"]
200198
print(webpmux_animate(input_images=input, output_image="anim_container.webp",
201-
loop="10", bgcolor="255,255,255,255", logging="-v"))
199+
loop="10", bgcolor="255,255,255,255"))
202200

203201
```
204202

@@ -210,8 +208,7 @@ from webptools import webpmux_getframe
210208

211209
# pass input_image(.webp image) path ,output_image and frame number
212210
print(webpmux_getframe(input_image="anim_container.webp",
213-
output_image="frame_2.webp", frame_number="2",
214-
logging="-v"))
211+
output_image="frame_2.webp", frame_number="2"))
215212

216213

217214
```

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="webptools",
8-
version="0.0.7",
8+
version="0.0.8",
99
scripts=['webptools/webplib.py'],
1010
author="scionoftech",
1111
description="webptools is a Webp image conversion package for python",

Diff for: webptools/webplib.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def gifwebp(input_image: str, output_image: str, option: str,
160160
# ****************** webpmux *********************** #
161161

162162
def webpmux_add(input_image: str, output_image: str, icc_profile: str,
163-
option: str, logging: str = "-v", bin_path: str = None) -> Dict:
163+
option: str, logging: str = "", bin_path: str = None) -> Dict:
164164
"""
165165
Add ICC profile,XMP metadata and EXIF metadata #
166166
@@ -186,7 +186,7 @@ def webpmux_add(input_image: str, output_image: str, icc_profile: str,
186186

187187

188188
def webpmux_extract(input_image: str, icc_profile: str, option: str,
189-
logging: str = "-v", bin_path: str = None) -> Dict:
189+
logging: str = "", bin_path: str = None) -> Dict:
190190
"""
191191
Extract ICC profile,XMP metadata and EXIF metadata
192192
@@ -209,7 +209,7 @@ def webpmux_extract(input_image: str, icc_profile: str, option: str,
209209

210210

211211
def webpmux_strip(input_image: str, output_image: str, option: str,
212-
logging: str = "-v", bin_path: str = None) -> Dict:
212+
logging: str = "", bin_path: str = None) -> Dict:
213213
"""
214214
Strip ICC profile,XMP metadata and EXIF metadata
215215
@@ -232,7 +232,7 @@ def webpmux_strip(input_image: str, output_image: str, option: str,
232232

233233

234234
def webpmux_animate(input_images: List, output_image: str, loop: str,
235-
bgcolor: str, logging: str = "-v", bin_path: str = None) -> Dict:
235+
bgcolor: str, logging: str = "", bin_path: str = None) -> Dict:
236236
"""
237237
Create an animated WebP file from Webp images
238238
@@ -252,7 +252,7 @@ def webpmux_animate(input_images: List, output_image: str, loop: str,
252252
for frame in input_images:
253253
files += f" -frame {frame}"
254254

255-
cmd = f"{getwebpmux(bin_path=bin_path)} {files} -loop {loop} bgcolor {bgcolor} -o {output_image} {logging}"
255+
cmd = f"{getwebpmux(bin_path=bin_path)} {files} -loop {loop} -bgcolor {bgcolor} -o {output_image} {logging}"
256256
p = subprocess.Popen(cmd, shell=True, stdin=None, stdout=subprocess.PIPE,
257257
stderr=subprocess.PIPE)
258258
(stdout, stderr) = p.communicate()
@@ -262,7 +262,7 @@ def webpmux_animate(input_images: List, output_image: str, loop: str,
262262

263263

264264
def webpmux_getframe(input_image: str, output_image: str,
265-
frame_number: str, logging: str = "-v", bin_path: str = None) -> Dict:
265+
frame_number: str, logging: str = "", bin_path: str = None) -> Dict:
266266
"""
267267
Get the a frame from an animated WebP file
268268

0 commit comments

Comments
 (0)