Skip to content

Commit

Permalink
precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
FredHappyface committed Mar 30, 2024
1 parent d4ae6d5 commit 3f4cc50
Show file tree
Hide file tree
Showing 23 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ repos:
- id: optimize-svg
- id: optimize-webp

exclude: "tests/data|documentation/reference"
exclude: "tests/test_.*|documentation/reference"
4 changes: 4 additions & 0 deletions imageedit/effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,16 @@ def doConvertBlackAndWhiteFilter(image: Image.Image, mode: str):
img = image.convert("L")
img.thumbnail((1, 1))
averageColour = img.getpixel((0, 0))

# Default tp "filter-lighter"
def threshold(pixel) -> int:
return 0 if pixel > averageColour else 255

if mode == "filter-darker":

def threshold(pixel) -> int:
return 0 if pixel < averageColour else 255

converted = image.convert("L").point(threshold, mode="1")
return converted.convert("RGBA")

Expand Down
Binary file added main/input/ewestickerScreenshots/dark-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main/input/ewestickerScreenshots/dark-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main/input/ewestickerScreenshots/dark-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main/input/ewestickerScreenshots/dark-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main/input/ewestickerScreenshots/dark-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main/input/ewestickerScreenshots/dark-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main/input/ewestickerScreenshots/dark-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main/input/ewestickerScreenshots/lang-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main/input/ewestickerScreenshots/lang-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main/input/ewestickerScreenshots/light-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main/input/ewestickerScreenshots/light-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added main/input/ewestickerScreenshots/light-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed main/input/ewestickerScreenshots/screenshot-1.png
Binary file not shown.
Binary file removed main/input/ewestickerScreenshots/screenshot-2.png
Binary file not shown.
Binary file removed main/input/ewestickerScreenshots/screenshot-3.png
Binary file not shown.
Binary file removed main/input/ewestickerScreenshots/screenshot-4.png
Binary file not shown.
Binary file removed main/input/ewestickerScreenshots/screenshot-5.png
Binary file not shown.
Binary file removed main/input/ewestickerScreenshots/screenshot-6.png
Binary file not shown.
Binary file removed main/input/ewestickerScreenshots/screenshot-7.png
Binary file not shown.
2 changes: 1 addition & 1 deletion main/make_phone_screenshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
),
Layer(
"screenshot",
effects.resize(screenshot, 750-80, 1678-190),
effects.resize(screenshot, 750 - 80, 1678 - 190),
offsets=(80, 190),
),
Layer("overlay", OVERLAY),
Expand Down
Binary file modified main/resources/pixel6Screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3f4cc50

Please sign in to comment.