Replies: 1 comment
-
[...] I had thought allocating memory sized for image_width * image_height * num_channels [...]
Sounds like you want to preallocate and write to a buffer as you
described and then use `stb_image_write.h` to save it to disk.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using
stb
to read/write existing pngs without issue, but I'm writing an art program and need to generate a new image. Is this possible? I had thought allocating memory sized forimage_width * image_height * num_channels
and passing it along tostbi_load_from_memory
would work but clearly the data is not correct.Any information is appreciated, thank you!
Beta Was this translation helpful? Give feedback.
All reactions