28 lines
1001 B
C++
28 lines
1001 B
C++
#include <ReTexture/Texture.h>
|
|
#include <iostream>
|
|
|
|
using namespace ReTexture;
|
|
int main() {
|
|
auto* bmp = new SoftwareTexture("testImages/1.bmp", {TextureFlag::INVERT_Y});
|
|
std::cout << "Bitmap Width: " << bmp->getWidth() << std::endl;
|
|
std::cout << "Bitmap Height: " << bmp->getHeight() << std::endl;
|
|
|
|
if (bmp->getTextureFormat() == TextureFormat::RGB)
|
|
std::cout << "Bitmap Format: RGB" << std::endl;
|
|
|
|
if (bmp->getTextureFormat() == TextureFormat::RGBA)
|
|
std::cout << "Bitmap Format: RGBA" << std::endl;
|
|
delete bmp;
|
|
|
|
auto* png = new SoftwareTexture("testImages/1.png", TextureFlag::INVERT_Y);
|
|
std::cout << "PNG width: " << png->getWidth() << std::endl;
|
|
std::cout << "PNG height: " << png->getHeight() << std::endl;
|
|
|
|
if (png->getTextureFormat() == TextureFormat::RGB)
|
|
std::cout << "PNG Format: RGB" << std::endl;
|
|
|
|
if (png->getTextureFormat() == TextureFormat::RGBA)
|
|
std::cout << "PNG Format: RGBA" << std::endl;
|
|
delete png;
|
|
}
|