Skip to content

Commit

Permalink
Merge pull request #31 from kirek007:mruszczyk/fix-train
Browse files Browse the repository at this point in the history
Fix OSD positioning in PNG files
  • Loading branch information
kirek007 authored Jan 31, 2023
2 parents 22a95e6 + e101760 commit 52907fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ def merge_images(img, overlay, x, y, zoom):
# Image ranges
y1, y2 = max(0, y), min(img.shape[0], y + img_overlay_res.shape[0])
x1, x2 = max(0, x), min(img.shape[1], x + img_overlay_res.shape[1])

# Overlay ranges
y1o, y2o = max(0, -y), min(img_overlay_res.shape[0], img.shape[0] - y)
x1o, x2o = max(0, -x), min(img_overlay_res.shape[1], img.shape[1] - x)
Expand Down Expand Up @@ -669,7 +668,7 @@ def main(self):
osd_time = raw_osd_frame.startTime
Utils.merge_images(frame, osd_frame, self.config.offset_left,
self.config.offset_top, self.config.osd_zoom)
osd_frame_no_srt = osd_frame
osd_frame_no_srt = frame

if self.srt and self.config.include_srt:
if srt_time < calc_video_time:
Expand Down

0 comments on commit 52907fa

Please sign in to comment.