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

ImageIO check format support in two phases #1410

Open
dzenanz opened this issue Nov 11, 2019 · 0 comments · May be fixed by #1418

Comments

@dzenanz
Copy link
Member

@dzenanz dzenanz commented Nov 11, 2019

Description

The way the IO factory works is that for every ImageIO it is constructed and then "CanRead" is called to determine if it's the correct one to use. If every ImageIO open the file, checks, and closes the file it will slow down this process ( consider network or remote files ).

Expected behavior

There have been recent improvements for the ImageIOs to report the extensions it can read. To pursue this feature further I'd recommend making the IO Factory construction two passes:

  1. Check the extension of the file is supported for each IO, if found then use that ImageIO.
  2. Then check the CanRead method which may open the file.

Additional Information

Suggested by @blowekamp in #1407.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.