Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't Progressively Download and Decode JPEGs on iOS. #18

Open
DavidPhillipOster opened this issue Dec 2, 2016 · 2 comments
Open

Comments

@DavidPhillipOster
Copy link

The title of this github repository is "Download and decode progressive JPEGs on iOS." But it doesn't do the very thing that Progressive JPEG was invented to do:

Progressively download and decode JPEGs on iOS

It misuses NSURLSession to grab ALL the data (a process that takes 99% of the total time) then decodes it.

Please rewrite to use NSURLSession in stream mode, so that is passed to your CGDataProvider in bursts, decoding what you can and writing it to the screen as the data comes in.

In CCBufferedImageDecoder , you create your CGDataProvider with an NSData, but by the time you have the NSData, 99% of the time of fetching and displaying the image has already elapsed, making progressive jpeg decoding pointless.

@DavidPhillipOster DavidPhillipOster changed the title Doesn't Download and decode progressive JPEGs on iOS. Doesn't Progressively Download and Decode JPEGs on iOS. Dec 3, 2016
@oferRounds
Copy link

@DavidPhillipOster did you find any solution to this? Seeing it as well

@DavidPhillipOster
Copy link
Author

no, I've outlined the solution: use a CGDataProvider that in turn is driven from a NSURLSession in stream mode, but I haven't implemented it (I haven't needed it), and this project has seen no check ins in years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants