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

Update config type definition #429

Merged
merged 3 commits into from
Aug 19, 2022
Merged

Conversation

andyedinborough
Copy link
Contributor

mimeType is used to properly decode src, which can be a Buffer or Uint8Array

`mimeType` is used to properly decode `src`, which can be a Buffer or Uint8Array
@rollingversions
Copy link

rollingversions bot commented Aug 19, 2022

Change Log for @ericblade/quagga2 (unreleased → 1.0.0)

Bug Fixes

  • Surfaces typed support for additional config options

    Adds mimeType and shows src supports Buffer | Uint8Array

Edit changelog

Errors were encountered while parsing:

  • package.json

Change log has not been updated since latest commit Update Changelog

@ericblade
Copy link
Owner

Hi @andyedinborough ! Thanks for the submission!!

I'm not seeing anything in the code anywhere that references a mimeType parameter. Was this something that was missed in the commit? Or is it something that is provided externally somewhere?

Thanks!

@andyedinborough
Copy link
Contributor Author

Let me check the original code, but for my use-case (passing in raw data), it's necessary for the image data to be properly decoded.

@andyedinborough
Copy link
Contributor Author

Sorry, it was mime, see https://github.com/serratus/quaggaJS/blob/master/example/node-test-with-buffer.js. I was looking at the variable name that I was passing in.

@ericblade
Copy link
Owner

Aha! ok, i see that in input_stream.ts line 45, where it calls GetPixels with a url and a mime type.

mimeType makes more sense. I'm going to make a note to make it mimeType in the future, and document it.

Thanks for your submission!

@ericblade ericblade merged commit 3ce16f1 into ericblade:master Aug 19, 2022
@ericblade ericblade added this to the 2.x milestone Sep 5, 2022
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 this pull request may close these issues.

2 participants