Skip to content
New issue

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

rewrite in c++ #1

Open
KatekovAnton opened this issue Apr 25, 2023 · 0 comments
Open

rewrite in c++ #1

KatekovAnton opened this issue Apr 25, 2023 · 0 comments

Comments

@KatekovAnton
Copy link
Owner

load image with stb

int w = 0, h = 0, comp_num = 0;
    res.data = stbi_load_from_memory(buffer.getPointer(), (int)buffer.getDataSize(), &w, &h, &comp_num, 0);
    res.w = (short)w;
    res.h = (short)h;
    res.comp_num = comp_num;

then resize with the same lib: https://github.com/nothings/stb/blob/master/stb_image_resize.h

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

No branches or pull requests

1 participant