Skip to content

Crash in ReadBarcodes with ImageFormat::RGBA #796

Closed Answered by mattmcde78
mattmcde78 asked this question in Q&A
Discussion options

You must be logged in to vote

My apologies as it turned out to be my mistake. When calling stbi_load, I was passing in a value of 3 for desired channels and not 0 as the example code does. This caused it to return only RGB (24bits per pixel) data. However, ImageFormat::RGBA (30bits per pixel) was then used to construct the ImageView which caused it to read past the buffer returned by stbi_load.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mattmcde78
Comment options

Answer selected by mattmcde78
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy