Skip to content

Commit

Permalink
removed Image class debug
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacey committed Sep 29, 2023
1 parent 29c7fde commit 80546be
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ enum class ImageLibrary : char { QImage, OIIO, BuiltIn };
namespace ngl
{

#define IMAGE_DEBUG_ON 1

void Image::info()
{
if constexpr (g_imageLib == ImageLibrary::QImage)
Expand Down Expand Up @@ -260,9 +258,7 @@ void Image::saveFrameBufferToFile(std::string_view _fname, int _x, int _y, int _
//----------------------------------------------------------------------------------------------------------------------
bool Image::load(std::string_view _fName,bool _flipY) noexcept
{
#ifdef IMAGE_DEBUG_ON
NGLMessage::addMessage("loading with QImage");
#endif

QImage image;
bool loaded = image.load(_fName.data());
image = image.mirrored(false, _flipY);
Expand Down Expand Up @@ -305,10 +301,6 @@ bool Image::load(std::string_view _fName,bool _flipY) noexcept
}
}
}
#ifdef IMAGE_DEBUG_ON

NGLMessage::addMessage(fmt::format("size {0} x {1} channels {2}", m_width, m_height, m_channels), Colours::WHITE, TimeFormat::TIME);
#endif

return true;
}
Expand All @@ -328,10 +320,6 @@ bool Image::load(std::string_view _fname,bool _flipY) noexcept
{
using namespace OIIO;

#ifdef IMAGE_DEBUG_ON
NGLMessage::addMessage("loading with OpenImageIO");
;
#endif

auto in = ImageInput::open(_fname.data());
if(!in)
Expand Down Expand Up @@ -386,9 +374,6 @@ bool Image::load(std::string_view _fname,bool _flipY) noexcept
stbi_set_flip_vertically_on_load(_flipY);

unsigned char *img = stbi_load(fname, &w, &h, &ch, 0);
#ifdef IMAGE_DEBUG_ON
NGLMessage::addMessage("loading with Internal Image Libs");
#endif
if(img != nullptr)
{
NGLMessage::addMessage(fmt::format("loaded {} Width {} Height {} Channels {}", fname, w, h, ch));
Expand Down

0 comments on commit 80546be

Please sign in to comment.