Verified Commit b739736e authored by Hugo Kerstens's avatar Hugo Kerstens
Browse files

Use continue instead of else

parent 3f870b35
...@@ -109,10 +109,11 @@ def get(exam_id, problem_id, submission_id, full_page=False): ...@@ -109,10 +109,11 @@ def get(exam_id, problem_id, submission_id, full_page=False):
for raw_image in raw_images: for raw_image in raw_images:
if max_width == raw_image.shape[1]: if max_width == raw_image.shape[1]:
resized_images.append(raw_image) resized_images.append(raw_image)
else: continue
factor = max_width / raw_image.shape[1]
new_height = int(factor * raw_image.shape[0]) factor = max_width / raw_image.shape[1]
resized_images.append(cv2.resize(raw_image, (max_width, new_height))) new_height = int(factor * raw_image.shape[0])
resized_images.append(cv2.resize(raw_image, (max_width, new_height)))
stitched_image = np.concatenate(tuple(resized_images), axis=0) stitched_image = np.concatenate(tuple(resized_images), axis=0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment