Start assets component image signature tests
This commit is contained in:
20
src/assets/image_format.h
Normal file
20
src/assets/image_format.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include "foundation/result.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <span>
|
||||
|
||||
namespace pp::assets {
|
||||
|
||||
enum class ImageFormat {
|
||||
png,
|
||||
jpeg,
|
||||
};
|
||||
|
||||
[[nodiscard]] pp::foundation::Result<ImageFormat> detect_image_format(
|
||||
std::span<const std::byte> bytes) noexcept;
|
||||
|
||||
[[nodiscard]] const char* image_format_name(ImageFormat format) noexcept;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user