Skip to content

Commit

Permalink
icon masking
Browse files Browse the repository at this point in the history
  • Loading branch information
machineonamission committed Sep 13, 2021
1 parent 3c88f7b commit 714fb75
Show file tree
Hide file tree
Showing 623 changed files with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions downsizesettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@
"shitboard/Library/Themes/shitboard.theme/Bundles/com.apple.preferences-framework",
"shitboard/Library/Themes/shitboard.theme/Bundles/com.apple.Preferences",
]
mask = Image.open("mask@512px.png")
mask1x = mask.resize((29, 29))
mask2x = mask.resize((29 * 2, 29 * 2))
mask3x = mask.resize((29 * 3, 29 * 3))

for icon in Path(inpath).glob("*.png"):
print(icon)
im = Image.open(icon)
im1x = im.resize((29, 29), resample=Image.NEAREST)
im2x = im.resize((29 * 2, 29 * 2), resample=Image.NEAREST)
im3x = im.resize((29 * 3, 29 * 3), resample=Image.NEAREST)
im1x = Image.new("RGBA", (29, 29))
im1x.paste(im.resize((29, 29), resample=Image.NEAREST), (0, 0), mask1x)
im2x = Image.new("RGBA", (29 * 2, 29 * 2))
im2x.paste(im.resize((29 * 2, 29 * 2), resample=Image.NEAREST), (0, 0), mask2x)
im3x = Image.new("RGBA", (29 * 3, 29 * 3))
im3x.paste(im.resize((29 * 3, 29 * 3), resample=Image.NEAREST), (0, 0), mask3x)
for outpath in outpaths:
im1x.save(f"{outpath}/{icon.stem}{icon.suffix}")
im2x.save(f"{outpath}/{icon.stem}@2x{icon.suffix}")
Expand Down
Binary file added mask@512px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Loading

0 comments on commit 714fb75

Please sign in to comment.