Compare commits

...

2 commits

2 changed files with 7 additions and 5 deletions

View file

@ -80,7 +80,7 @@ class Text(dcc.doom_base.WadMap):
width=self.thumbnail_width width=self.thumbnail_width
) as img: ) as img:
self.draw_text( self.draw_text(
img, text, img, text, wrap_dist=0.95
) )
img.trim() img.trim()
img.reset_coords() img.reset_coords()

View file

@ -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,9 +23,10 @@ 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")
with wand.image.Image(filename=overlay) as mdi: if not parsed_args.noov:
mdi.border(tc, 5, 5) with wand.image.Image(filename=overlay) as mdi:
bi.composite(mdi, gravity="north_west") mdi.border(tc, 5, 5)
bi.composite(mdi, gravity="north_west")
if parsed_args.index: if parsed_args.index:
with wand.image.Image( with wand.image.Image(