-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #2
- Loading branch information
Showing
8 changed files
with
97 additions
and
45,582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
.vscode | ||
token.json | ||
__pycache__ | ||
build | ||
dist | ||
*.egg-info | ||
|
||
gradient.jpg | ||
gradient-fried.jpg | ||
gradient-fried-blue.jpg | ||
human-fried.jpg | ||
human-fried-blue.jpg | ||
human-fried-blue.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include deeppyer/flare.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import argparse | ||
import asyncio | ||
|
||
from PIL import Image | ||
|
||
from . import deepfry | ||
|
||
|
||
def main(): | ||
parser = argparse.ArgumentParser(description='Deepfry an image.') | ||
parser.add_argument('-v', '--version', action='version', version='%(prog)s 1.0.0', help='Display program version.') | ||
parser.add_argument('-o', '--output', help='Filename to output to.') | ||
parser.add_argument('-f', '--flares', help='Try and detect faces for adding lens flares.', action='store_true', | ||
default=False) | ||
parser.add_argument('file', metavar='FILE', help='File to deepfry.') | ||
args = parser.parse_args() | ||
|
||
img = Image.open(args.file) | ||
out = args.output or './deepfried.jpg' | ||
|
||
loop = asyncio.get_event_loop() | ||
img = loop.run_until_complete(deepfry(img, flares=args.flares)) | ||
|
||
img.save(out, 'jpeg') |
File renamed without changes
Oops, something went wrong.