Skip to content

ImageLoader does not return exact pixel values? #2067

Answered by ibgreen
nilscb asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for reporting, wasn't aware of this. For image loading, loaders.gl relies on the browser's built in decoding. Perhaps the browser takes some shortcuts with rounding etc to parse faster?

IIRC on a modern desktop browser loaders.gl parses images to ImageBitmap before calling getImageData and the ImageBitmap constructor has a few options that you should be able to pass through with options.image.imageBitmap: {...}. But I can't see anything that would reasonably cause such off-by-one errors...

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@nilscb
Comment options

@ibgreen
Comment options

@nilscb
Comment options

Answer selected by nilscb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants