Skip to content

Conversation

@kpentaris
Copy link

@nguyenq
Copy link
Owner

nguyenq commented Apr 24, 2024

Normally, bytes per line = bytes per pixel * image width, as mentioned in:

https://stackoverflow.com/questions/51590161/bytes-per-pixel-bytes-per-line-how-to-use-function-nativesetimagebytes-in-tes
https://stackoverflow.com/questions/9513227/what-is-meant-by-bytesperline-in-qimage

Can you cite some references that support your formula? And please attach an image file that would fail in the current implementation.

Thanks.

@kpentaris
Copy link
Author

Here is an SO question that explains this (also has a link to MSDN docs): https://stackoverflow.com/questions/29912303/stride-and-padding-of-an-image

@nguyenq
Copy link
Owner

nguyenq commented May 27, 2024

Can you attach a sample image that would cause the problem with the current version? It would help in testing pre- and post-fix.

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