Add an option to skip the wad overlay for thumbs.
This commit is contained in:
parent
d93923c6f7
commit
1632ef7bbc
1 changed files with 6 additions and 4 deletions
|
|
@ -8,12 +8,13 @@ class Thumb(dcc.doom_base.WadMap):
|
||||||
def get_parser(self, prog_name):
|
def get_parser(self, prog_name):
|
||||||
parser = super().get_parser(prog_name)
|
parser = super().get_parser(prog_name)
|
||||||
parser.add_argument("--index", action="store_true")
|
parser.add_argument("--index", action="store_true")
|
||||||
|
parser.add_argument("--noov", action="store_true")
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
def take_action(self, parsed_args):
|
def take_action(self, parsed_args):
|
||||||
base = self.base_thumb_path()
|
base = self.base_thumb_path()
|
||||||
text = self.text_thumb_path()
|
text = self.text_thumb_path()
|
||||||
overlay = self.thumnail_overlay_path()
|
overlay = self.thumb_overlay_path()
|
||||||
with (
|
with (
|
||||||
wand.image.Image(filename=base) as bi,
|
wand.image.Image(filename=base) as bi,
|
||||||
wand.color.Color("transparent") as tc
|
wand.color.Color("transparent") as tc
|
||||||
|
|
@ -22,6 +23,7 @@ class Thumb(dcc.doom_base.WadMap):
|
||||||
ti.border(tc, 5, 5)
|
ti.border(tc, 5, 5)
|
||||||
bi.composite(ti, gravity="south_west")
|
bi.composite(ti, gravity="south_west")
|
||||||
|
|
||||||
|
if not parsed_args.noov:
|
||||||
with wand.image.Image(filename=overlay) as mdi:
|
with wand.image.Image(filename=overlay) as mdi:
|
||||||
mdi.border(tc, 5, 5)
|
mdi.border(tc, 5, 5)
|
||||||
bi.composite(mdi, gravity="north_west")
|
bi.composite(mdi, gravity="north_west")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue