Skip to content

An image manager tool previously developed for imgui I would like to submit to the imgui wiki #8606

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

Open
Half-People opened this issue Apr 30, 2025 · 3 comments

Comments

@Half-People
Copy link

Version/Branch of Dear ImGui:

any

Back-ends:

any

Compiler, OS:

Window10 + MSVC 2019

Full config/build information:

No response

Details:

An image manager tool previously developed for imgui I would like to submit to the imgui wiki:

HImGuiImageManager is a powerful C++ library for Dear ImGui, designed to streamline image loading, display, and management. It supports loading images from files, memory, or URLs, with built-in GIF animation support, image buttons, and custom drawing capabilities. Perfect for creating dynamic and visually rich ImGui interfaces.

TestPorject

Logo

PorjectGitHub URL : https://github.com/Half-People/HImGuiImageManager

Screenshots/Video:

Image

Image

Minimal, Complete and Verifiable Example code:

	HImage* image = 0;
	HImageManager::ImageLoader::GetImage_gif("Logo.gif", image, 1500, 1.5, [](uint8_t* data, int w, int h, char fmt) -> void* {
		static GLFWimage tex;
		tex.pixels = data;
		tex.height = h;
		tex.width = w;
		glfwSetWindowIcon(Windows, 1, &tex);
		return (void*)0; }, [](void*) {});
@ocornut
Copy link
Owner

ocornut commented May 7, 2025

I think it would be worth investigating how this can fit within the upcoming #8465 paradigm of allowing backends to create/destroy textures, to remove the requirement for a macros. It may need rework of the WIP branch.

@ocornut
Copy link
Owner

ocornut commented May 9, 2025

Btw it feels like this shouldn't be a library specific to imgui, it is basically a texture loader and cache and could be used elsewhere.
The only imgui code in there seems to be the loading fallback (rendering a filled rect + animated loading).

@Half-People
Copy link
Author

Yes, you are right. This is actually a universal texture loader. It just happens to mention ImGui a little bit.
The origin of this project is that last year many of my friends asked me how to load images in ImGui. I thought, why don’t I make an image manager and manage everything by myself? Then I made this project. Unfortunately, I was too lazy to write MD, so I put it in my warehouse and never finished it until I used AI to help me write MD files some time ago.

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

2 participants