FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_image::anonymous_namespace{image.hpp} Namespace Reference

Functions

 ENUM (ImageFormat, JPG, PNG)
 
Value< void > resize_impl (fs::path const &path_file_src, fs::path const &path_file_dst, uint32_t width, uint32_t height)
 Internal implementation for resizing an image.
 

Function Documentation

◆ resize_impl()

Value< void > ns_image::anonymous_namespace{image.hpp}::resize_impl ( fs::path const & path_file_src,
fs::path const & path_file_dst,
uint32_t width,
uint32_t height )
inline

Internal implementation for resizing an image.

Reads an image file, determines its format (JPG or PNG), and resizes it using ImageMagick to the specified dimensions. The resize maintains aspect ratio by using the larger dimension (width or height) as the constraint.

Parameters
path_file_srcPath to the source image file
path_file_dstPath to the destination image file
widthTarget width for the resized image
heightTarget height for the resized image
Returns
Value<void> Nothing on success, or error if file doesn't exist, format is invalid, or ImageMagick resize fails

Definition at line 55 of file image.hpp.

Here is the call graph for this function:
Here is the caller graph for this function: