/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #include "ImageLoaderPng.hpp" #include "Base/Utils.hpp" #include #include #include namespace OpenVulkano::Image { std::unique_ptr ImageLoaderPng::loadFromFile(const std::string& filePath) { Array buffer = OpenVulkano::Utils::ReadFile(filePath); return loadData(reinterpret_cast(buffer.Data()), static_cast(buffer.Size())); } std::unique_ptr ImageLoaderPng::loadFromMemory(const std::vector& buffer) { return loadData(buffer.data(), static_cast(buffer.size())); } }