tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

gen-many-images.py (634B)


      1 # This Source Code Form is subject to the terms of the Mozilla Public
      2 # License, v. 2.0. If a copy of the MPL was not distributed with this
      3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      4 
      5 SIZE = 8
      6 
      7 with open("../benchmarks/many-images.yaml", "w") as text_file:
      8    text_file.write("root:\n")
      9    text_file.write("  items:\n")
     10    for y in range(0, 64):
     11        yb = SIZE * y
     12        for x in range(0, 128):
     13            xb = SIZE * x
     14            text_file.write("    - image: solid-color({0}, {1}, 0, 255, {2}, {2})\n".format(x, y, SIZE))
     15            text_file.write("      bounds: {0} {1} {2} {2}\n".format(xb, yb, SIZE))