Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ void overwriteIcon(std::string tid, std::string imagePath)
{
brls::Logger::info("Image is loaded");
unsigned char* data = NULL;
data = (unsigned char*)malloc(256 * 256 * 3 * sizeof(unsigned char));
data = (unsigned char*)malloc(256 * 256 * channels * sizeof(unsigned char));

if (stbir_resize_uint8(img, width, height, 0, data, 256, 256, 256 * 3, 3))
if (stbir_resize_uint8(img, width, height, 0, data, 256, 256, 256 * channels, channels))
{
brls::Logger::info("resize good");
}
Expand All @@ -124,6 +124,8 @@ void overwriteIcon(std::string tid, std::string imagePath)
{
brls::Application::notify("Icon could not be saved");
};
stbi_image_free(img);
free(data);
}
}

Expand Down