Skip to content

Instantly share code, notes, and snippets.

@varun04
Created August 4, 2021 11:17
Show Gist options
  • Select an option

  • Save varun04/7041460ea43ea89aa1821c57bab32a04 to your computer and use it in GitHub Desktop.

Select an option

Save varun04/7041460ea43ea89aa1821c57bab32a04 to your computer and use it in GitHub Desktop.
func isFrameComplete(at index: Int) -> Bool {
assert(frameCount > index)
if index == frameCount - 1 {
return CGImageSourceGetStatus(imageSource) == .statusComplete
}
return CGImageSourceGetStatusAtIndex(imageSource, index) == .statusComplete
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment