~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to utils/optimize_pngs.py

  • Committer: The Widelands Bunnybot
  • Date: 2024-10-19 13:45:54 UTC
  • Revision ID: bunnybot@widelands.org-20241019134554-kz2gcbecf0y7bd7n
170 files were automatically formatted.

(by bunnybot)
5a9087b08ab9bbc48795ff0f7f1f370f60108b1a

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    """Command line tool for optimizing PNG file.
24
24
 
25
25
    Searches for the tool and defines its call parameters.
 
26
 
26
27
    """
27
28
 
28
29
    def __init__(self, name, options, inplace=False):
51
52
        overwrites the input file.
52
53
 
53
54
        Otherwise, returns false and does nothing
 
55
 
54
56
        """
55
57
        log('%s:' % (self._name))
56
58
        _file_handle1, temp_in = tempfile.mkstemp(self._name, 'png')
94
96
    """Search for all pngs in the subdir.
95
97
 
96
98
    Restrict to filename prefix if it is not empty.
 
99
 
97
100
    """
98
101
    pngs = []
99
102
    for root, dirs, files in os.walk(directory):