aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-07-07 20:31:41 +0530
committerGitHub <noreply@github.com>2020-07-07 20:31:41 +0530
commitdc8ce30476f9abcbb9ddacec33c4ed55e13e3ca6 (patch)
treede4dda2ced71951997aaed86c6b1f8d3589101de /src
parent2979cbce0ce5d0d0c2450ae92304c56eb9f4e55b (diff)
parentbce0d339aca6cdd61079cccf629ce225b3debf01 (diff)
Merge pull request #7 from navanchauhan/deepsource-fix-217ada94
Remove unused variables
Diffstat (limited to 'src')
-rw-r--r--src/VHSImage.py4
-rw-r--r--src/VHSVideo.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/VHSImage.py b/src/VHSImage.py
index b9042d2..fc21adc 100644
--- a/src/VHSImage.py
+++ b/src/VHSImage.py
@@ -81,7 +81,7 @@ def mod_image_repeat_rows(
elif repeat:
try:
pixels[x, y] = row_to_repeat[x + offsets[num_repeats]]
- except Exception as e:
+ except Exception:
pixels[x, y] = row_to_repeat[x - offsets[num_repeats]]
else:
pixels[x, y] = (r, g, b)
@@ -104,7 +104,7 @@ def add_date(img_path, out_name="image.jpg", bottom_offset=0):
date_str_2 = date_obj.strftime("%b. %d %Y")
corner_offset = 50
img = Image.open(img_path)
- width, height = img.size
+ _, height = img.size
draw = ImageDraw.Draw(img)
font = ImageFont.truetype("src/VCR_OSD_MONO_1.001.ttf", 64)
draw.text(
diff --git a/src/VHSVideo.py b/src/VHSVideo.py
index 9de2d66..7e23ad0 100644
--- a/src/VHSVideo.py
+++ b/src/VHSVideo.py
@@ -65,7 +65,7 @@ def generateVideo(outfile, path, infile):
for i in range(len(files)):
filename = path + str(files[i])
img = cv2.imread(filename)
- height, width, layers = img.shape
+ height, width, _ = img.shape
size = (width, height)
frame_array.append(img)
out = cv2.VideoWriter(outfile, cv2.VideoWriter_fourcc(*"MP4V"), fps, size)