Fixed build when using graphicmagicks backend

This commit is contained in:
emeric
2024-07-06 14:12:58 +02:00
parent d1324c1c3a
commit 437f9d63ed
5 changed files with 11 additions and 2 deletions
@@ -21,6 +21,7 @@
#include <array>
#include "RawImage.hpp"
#include "core/ILogger.hpp"
#include "core/ITraceLogger.hpp"
@@ -28,11 +29,13 @@ namespace lms::image
{
std::unique_ptr<IRawImage> decodeImage(const std::byte* encodedData, std::size_t encodedDataSize)
{
LMS_SCOPED_TRACE_DETAILED("Image", "DecodeBuffer");
return std::make_unique<GraphicsMagick::RawImage>(encodedData, encodedDataSize);
}
std::unique_ptr<IRawImage> decodeImage(const std::filesystem::path& path)
{
LMS_SCOPED_TRACE_DETAILED("Image", "DecodeFile");
return std::make_unique<GraphicsMagick::RawImage>(path);
}
@@ -20,6 +20,7 @@
#include "JPEGImage.hpp"
#include "core/ILogger.hpp"
#include "core/ITraceLogger.hpp"
#include "image/Exception.hpp"
#include "RawImage.hpp"
@@ -28,6 +29,8 @@ namespace lms::image::GraphicsMagick
{
JPEGImage::JPEGImage(const RawImage& rawImage, unsigned quality)
{
LMS_SCOPED_TRACE_DETAILED("Image", "WriteJPEG");
try
{
Magick::Image image{ rawImage.getMagickImage() };
@@ -25,6 +25,7 @@
#include <magick/resource.h>
#include "core/ILogger.hpp"
#include "core/ITraceLogger.hpp"
#include "image/Exception.hpp"
#include "JPEGImage.hpp"
@@ -90,6 +91,8 @@ namespace lms::image::GraphicsMagick
{
try
{
LMS_SCOPED_TRACE_DETAILED("Image", "Resize");
_image.resize(Magick::Geometry{ static_cast<unsigned int>(width), static_cast<unsigned int>(width) });
}
catch (Magick::Exception& e)
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Emeric Poupon
* Copyright (C) 2024 Emeric Poupon
*
* This file is part of LMS.
*