Mageia Bugzilla – Attachment 12886 Details for
Bug 29002
python-pillow new security issues CVE-2021-2528[7-9], CVE-2021-2529[0-3], CVE-2021-2792[1-3], CVE-2021-2867[5-8], CVE-2021-34552
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Convert images to PNG format.
convertz (text/x-python3), 453 bytes, created by
Len Lawrence
on 2021-08-03 16:59:09 CEST
(
hide
)
Description:
Convert images to PNG format.
Filename:
MIME Type:
Creator:
Len Lawrence
Created:
2021-08-03 16:59:09 CEST
Size:
453 bytes
patch
obsolete
>#!/bin/env python3 ># Convert an input file to a JPEG file with the same root name ># $ ./convert abc.png > >from __future__ import print_function >import os, sys >from PIL import Image > >for infile in sys.argv[1:]: > f, e = os.path.splitext(infile) > outfile = f + ".png" > if infile != outfile: > try: > Image.open(infile).save(outfile) > except IOError: > print("cannot convert", infile) > Image.open(outfile).show()
#!/bin/env python3 # Convert an input file to a JPEG file with the same root name # $ ./convert abc.png from __future__ import print_function import os, sys from PIL import Image for infile in sys.argv[1:]: f, e = os.path.splitext(infile) outfile = f + ".png" if infile != outfile: try: Image.open(infile).save(outfile) except IOError: print("cannot convert", infile) Image.open(outfile).show()
View Attachment As Raw
Actions:
View
Attachments on
bug 29002
:
12885
| 12886