We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I know ok_png_read() can get png info, but how can I get bitmap data and write it to a file?
ok_png_read()
The text was updated successfully, but these errors were encountered:
I try to use this sentence to write a file, but output is not correct. I mean output file size is correct, but content is not.
fwrite(image->data, sizeof(uint8_t), image->width * image->height * 4, file)
Sorry, something went wrong.
Is this library could decode png to bmp?
ok-file-formats doesn't have an encoders, so if you want to encode to BMP you'll have to use a different library (or write it yourself).
ok-file-formats
As far as the code sample goes, it looks like you're creating a RAW file.
What do you mean by "output is not correct"?
How to check the output RAW file is correct? I use XnView software to open it, but it doesn't looks like a real image.
Never mind, I get it. Thanks a lot.
No branches or pull requests
I know
ok_png_read()
can get png info, but how can I get bitmap data and write it to a file?The text was updated successfully, but these errors were encountered: