Fix error checking when rendering single frame
This commit is contained in:
parent
83b8c8ea12
commit
8033e9fef5
@ -241,8 +241,11 @@ def render_image(
|
||||
ff.truncate()
|
||||
cd = create_canvas(data, f.width, f.canvas_x, f.canvas_y, ans.width, ans.height, 3 if ans.mode == 'rgb' else 4)
|
||||
ff.write(cd)
|
||||
if get_multiple_frames:
|
||||
if unseen:
|
||||
raise ConvertFailed(path, f'Failed to render {len(unseen)} out of {len(m)} frames of animation')
|
||||
elif not ans.frames[0].path:
|
||||
raise ConvertFailed(path, 'Failed to render image')
|
||||
|
||||
return ans
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user