Skip to content

Commit

Permalink
Fix OSD positioning in PNG files
Browse files Browse the repository at this point in the history
kirek007 committed Jan 31, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 22a95e6 commit e101760
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
@@ -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)
@@ -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:

0 comments on commit e101760

Please sign in to comment.