fixing gifchop loading error to wait until img.onload