So, I made this program for the game and I need help making it more automatic.
The program takes an image and then displays it. I am doing this on textures in OpenGL. When I take a screenshot, itβs usually around 700x400. I enter the height and width into my program, resize the image to 1024x1024 (making it a POT texture for better compatibility), adding blank space (the original image remains in the upper left corner and reaches (700,400) and the rest is just empty, somebody knows the term for this?), and then upload it to my program and adjust the angles so that only a part from (0,0) to (700,400) is shown.
The way I handle image display. Now I would like to do this automatically. So I would take a 700x400 image, pass it to a program that gets the width and height of the image (700x400), resize it to 1024x1024, add some empty space, and then load it.
So does anyone know a C ++ library capable of doing this? I will still take a screenshot manually.
I am using Simple OpenGL Image Library (SOIL) to upload an image (.bmp) and convert it to a texture.
Thank!
source
share