27 lines
901 B
C++
27 lines
901 B
C++
#include <ReTexture/rTexture.h>
|
|
#include <iostream>
|
|
|
|
int main() {
|
|
auto* bmp = new RTexture("testImages/1.bmp", {RTextureFlag::INVERT_Y});
|
|
std::cout << "Bitmap Width: " << bmp->width << std::endl;
|
|
std::cout << "Bitmap Height: " << bmp->height << std::endl;
|
|
|
|
if (bmp->format == RTextureFormat::RGB)
|
|
std::cout << "Bitmap Format: RGB" << std::endl;
|
|
|
|
if (bmp->format == RTextureFormat::RGBA)
|
|
std::cout << "Bitmap Format: RGBA" << std::endl;
|
|
delete bmp;
|
|
|
|
auto* png = new RTexture("testImages/1.png", {RTextureFlag::INVERT_Y});
|
|
std::cout << "PNG width: " << png->width << std::endl;
|
|
std::cout << "PNG height: " << png->height << std::endl;
|
|
|
|
if (png->format == RTextureFormat::RGB)
|
|
std::cout << "PNG Format: RGB" << std::endl;
|
|
|
|
if (png->format == RTextureFormat::RGBA)
|
|
std::cout << "PNG Format: RGBA" << std::endl;
|
|
delete png;
|
|
}
|