Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

feature request - load/decode an image #4

Closed
acidjazz opened this issue Apr 3, 2018 · 3 comments
Closed

feature request - load/decode an image #4

acidjazz opened this issue Apr 3, 2018 · 3 comments
Labels
wontfix This will not be worked on

Comments

@acidjazz
Copy link
Contributor

acidjazz commented Apr 3, 2018

this is a request to have something the equivalent of decodeImage from the dart image package allowing me to load an image using native functionality so it doesn't take as long.

@btastic
Copy link
Owner

btastic commented Apr 3, 2018

Okay, so.. what is the goal of this feature request?

We can load an image into memory using native methods, but I can't return a reference or an array back to dart, since a reference would only work with native tools, and an array would mean copying the whole array in the same fashion the dart image package would do.

@acidjazz
Copy link
Contributor Author

acidjazz commented Apr 3, 2018

I'm just looking for a way to get a File into an Image w/out having to isolate and wait 10 seconds, so far the only way I can see to do that is with decodeImage()

@btastic
Copy link
Owner

btastic commented Apr 3, 2018

Well the problem is that a File or an Image is just something that holds onto a List<int> internally. So we still have to manage the way from decoding an image on their native platforms, and transferring the bytes back to dart.

There is no magic function that will make it go fast. Once you want the bytes within a dart object, the language (VM) will take time to copy the bytes to the dart counterpart (List<int>)

I am not a dart expert by any means, but thats what I read from the other repository's guys answer to the problem. Reading the bytes and copying it into an array. Thats not going to be fast, as far as I know..

@btastic btastic added the wontfix This will not be worked on label Jun 8, 2018
@btastic btastic closed this as completed Jun 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants