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

Load an image then save a new one will increase the file size? #1

Open
Morphlng opened this issue Aug 3, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@Morphlng
Copy link

Morphlng commented Aug 3, 2022

Reproducible Code

#include "tgafunc.h"

int main(){
    uint8_t* data;
    tga_info* info;
    tga_load(&data, &info, "./assets/cut_fish/base_color.tga");

    tga_save_from_info(data, info, "./output.tga");

    tga_free_data(data);
    tga_free_info(info);
    return 0;
}

The original file "base_color.tga" is 8.64MB, and the output.tga is 12MB.

Why is that?

This may cause the image that foolrenderer produces much bigger than it should be.

@cadenji cadenji added the enhancement New feature or request label Aug 3, 2022
@cadenji
Copy link
Owner

cadenji commented Aug 3, 2022

Because tgafunc currently does not support RLE compression, image data is stored in raw, so the file becomes larger. I will add RLE in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants