C++ Essence Library 0.1.0
A Utility Library for Modern C++ Programming
Loading...
Searching...
No Matches
essence::imaging::abstract::image_header_extractor Class Reference

Extracts a general image header from image file data. More...

#include <image_header_extractor.hpp>

Public Member Functions

template<typename T >
requires (!std::same_as<std::decay_t<T>, image_header_extractor>)
 image_header_extractor (T &&value)
 
io::abstract::bitstream_type_hint hint () const
 Gets the underlying type hint.
 
std::optional< image_general_headerget (std::istream &stream) const
 Extracts the general image header from a standard input stream.
 
std::optional< image_general_headerget (std::span< const std::byte > buffer) const
 Extracts the general image header from a memory buffer.
 

Detailed Description

Extracts a general image header from image file data.

Member Function Documentation

◆ get() [1/2]

std::optional< image_general_header > essence::imaging::abstract::image_header_extractor::get ( std::istream & stream) const
inlinenodiscard

Extracts the general image header from a standard input stream.

Parameters
streamThe input stream.
Returns
The image header if succeeds; otherwise std::nullopt.

◆ get() [2/2]

std::optional< image_general_header > essence::imaging::abstract::image_header_extractor::get ( std::span< const std::byte > buffer) const
inlinenodiscard

Extracts the general image header from a memory buffer.

Parameters
bufferThe memory buffer.
Returns
The image header if succeeds; otherwise std::nullopt.

◆ hint()

io::abstract::bitstream_type_hint essence::imaging::abstract::image_header_extractor::hint ( ) const
inlinenodiscard

Gets the underlying type hint.

Returns
The type hint.

The documentation for this class was generated from the following file: