Rename to better fit the scope of this project. Allow loading an image from Color3* & Color4*
28 lines
975 B
C++
28 lines
975 B
C++
#include <ReImage/Image.h>
|
|
#include <iostream>
|
|
|
|
using namespace ReImage;
|
|
int main() {
|
|
auto* bmp = new Image("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 Image("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;
|
|
}
|