Merge pull request #7 from navanchauhan/deepsource-fix-217ada94

Remove unused variables
This commit is contained in:
Navan Chauhan 2020-07-07 20:31:41 +05:30 committed by GitHub
commit dc8ce30476
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -81,7 +81,7 @@ def mod_image_repeat_rows(
elif repeat: elif repeat:
try: try:
pixels[x, y] = row_to_repeat[x + offsets[num_repeats]] 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]] pixels[x, y] = row_to_repeat[x - offsets[num_repeats]]
else: else:
pixels[x, y] = (r, g, b) 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") date_str_2 = date_obj.strftime("%b. %d %Y")
corner_offset = 50 corner_offset = 50
img = Image.open(img_path) img = Image.open(img_path)
width, height = img.size _, height = img.size
draw = ImageDraw.Draw(img) draw = ImageDraw.Draw(img)
font = ImageFont.truetype("src/VCR_OSD_MONO_1.001.ttf", 64) font = ImageFont.truetype("src/VCR_OSD_MONO_1.001.ttf", 64)
draw.text( draw.text(

View File

@ -65,7 +65,7 @@ def generateVideo(outfile, path, infile):
for i in range(len(files)): for i in range(len(files)):
filename = path + str(files[i]) filename = path + str(files[i])
img = cv2.imread(filename) img = cv2.imread(filename)
height, width, layers = img.shape height, width, _ = img.shape
size = (width, height) size = (width, height)
frame_array.append(img) frame_array.append(img)
out = cv2.VideoWriter(outfile, cv2.VideoWriter_fourcc(*"MP4V"), fps, size) out = cv2.VideoWriter(outfile, cv2.VideoWriter_fourcc(*"MP4V"), fps, size)