Feature request: make glfwRescaleImage public

nobody wrote on Monday, December 17, 2007:

Hi,

First of all, thumbs up for the excellent GLFW library! Reminds me of the good old Amiga: lightweight and easy to use.

I have a simple feature request that requires only 1 minute of work.

I needed to load a TGA image, figure out the exact sizes of the image, and then I needed to rescale it to a power of two and generate mip-maps.

If I understand it correctly, the GLFW image loading functions don’t return the original size of the image when it gets rescaled.

Instead of loading the image twice, I made the _glfwRescaleImage function public, so I could first call glfwReadImage to get the details of the original image, and then just call glfwRescaleImage to rescale it, as is done internally in the GLFW library.

What about making glfwRescaleImage available to everyone? It could also be handy if you have a user-generated image, and then you want to scale it down and generate mipmaps.

Cheers,
Peter

elmindreda wrote on Tuesday, December 18, 2007:

The image loading API is going to be removed in 3.0 and will not be added to until then.

Please see this discussion for details:

https://sourceforge.net/forum/forum.php?thread_id=1771372&forum_id=247562