-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from deepghs/dev/bg
dev(narugo): add background resource
- Loading branch information
Showing
12 changed files
with
1,118 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
imgutils.resource.background | ||
======================================= | ||
|
||
.. currentmodule:: imgutils.resource.background | ||
|
||
.. automodule:: imgutils.resource.background | ||
|
||
|
||
BackgroundImageSet | ||
------------------------------------------ | ||
|
||
.. autoclass:: BackgroundImageSet | ||
:members: __init__, list_image_files, get_image_file, get_image, random_image_file, random_image | ||
|
||
|
||
|
||
list_bg_image_files | ||
------------------------------------------ | ||
|
||
.. autofunction:: list_bg_image_files | ||
|
||
|
||
|
||
get_bg_image_file | ||
------------------------------------------ | ||
|
||
.. autofunction:: get_bg_image_file | ||
|
||
|
||
|
||
get_bg_image | ||
------------------------------------------ | ||
|
||
.. autofunction:: get_bg_image | ||
|
||
|
||
|
||
random_bg_image_file | ||
------------------------------------------ | ||
|
||
.. autofunction:: random_bg_image_file | ||
|
||
|
||
|
||
random_bg_image | ||
------------------------------------------ | ||
|
||
.. autofunction:: random_bg_image | ||
|
||
|
||
|
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,16 @@ | ||
import random | ||
|
||
from imgutils.resource import list_bg_image_files, get_bg_image | ||
from plot import image_plot | ||
|
||
if __name__ == '__main__': | ||
filenames = random.sample(list_bg_image_files(), 9) | ||
|
||
image_plot( | ||
*( | ||
(get_bg_image(filename), filename) | ||
for filename in filenames | ||
), | ||
columns=3, | ||
figsize=(14, 10), | ||
) |
593 changes: 593 additions & 0 deletions
593
docs/source/api_doc/resource/background_full.plot.py.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,14 @@ | ||
imgutils.resource | ||
===================== | ||
|
||
.. currentmodule:: imgutils.resource | ||
|
||
.. automodule:: imgutils.resource | ||
|
||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
|
||
background | ||
|
||
|
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,5 @@ | ||
""" | ||
Overview: | ||
Quickly get some basic resources. E.g. high quality background images. | ||
""" | ||
from .background import * |
Oops, something went wrong.