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

Separate image+base64 vs. import #243

Closed
dakom opened this issue Aug 1, 2019 · 3 comments · Fixed by #244
Closed

Separate image+base64 vs. import #243

dakom opened this issue Aug 1, 2019 · 3 comments · Fixed by #244

Comments

@dakom
Copy link
Contributor

dakom commented Aug 1, 2019

There are two steps to loading images:

  1. Parse the data, and determine if it's a uri, raw bytes, etc.
  2. Load the results of that into a proper image

Step 1 is totally internal to the crate and doesn't have any dependencies. Makes sense that this is behind the "import" feature.

However, step 2 has external dependencies, and in some environments (e.g. the web), loading the data would be done some other way.

Can I request that anything which depends on image_crate be put behind some other feature flag, perhaps "import-image-data" ? (the import_image_data function itself, from import, could be put behind this as well)

@bwasty
Copy link
Member

bwasty commented Aug 1, 2019

Hmm, it's not just the image crate - base64 is also not required on the web (since the browser can decode data URIs) and should not be included I think.

@dakom dakom changed the title Separate image vs. import Separate image+base64 vs. import Aug 5, 2019
@dakom
Copy link
Contributor Author

dakom commented Aug 5, 2019

good point! updated the title to reflect that :)

@dakom
Copy link
Contributor Author

dakom commented Aug 5, 2019

From trying it out with an external loader that doesn't use the reference, I think they'd travel together - but they should both be excluded

Will make a PR which separates "import" vs. `import_data_reference"

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

Successfully merging a pull request may close this issue.

2 participants