diff --git a/d3/d57/PPL_8cpp_source.html b/d3/d57/PPL_8cpp_source.html index 2ba71d2ac..1e147114c 100644 --- a/d3/d57/PPL_8cpp_source.html +++ b/d3/d57/PPL_8cpp_source.html @@ -374,7 +374,7 @@
vtfpp::ImageConversion::ResizeFilter
ResizeFilter
Definition: ImageConversion.h:352
vtfpp::ImageConversion::FileFormat
FileFormat
Definition: ImageConversion.h:326
vtfpp::ImageConversion::convertImageDataToFormat
std::vector< std::byte > convertImageDataToFormat(std::span< const std::byte > imageData, ImageFormat oldFormat, ImageFormat newFormat, uint16_t width, uint16_t height)
Converts an image from one format to another.
Definition: ImageConversion.cpp:774
-
vtfpp::ImageConversion::resizeImageData
std::vector< std::byte > resizeImageData(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t height, uint16_t newHeight, bool srgb, ResizeFilter filter, ResizeEdge edge=ResizeEdge::CLAMP)
Resize given image data to the new dimensions.
Definition: ImageConversion.cpp:1401
+
vtfpp::ImageConversion::resizeImageData
std::vector< std::byte > resizeImageData(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t height, uint16_t newHeight, bool srgb, ResizeFilter filter, ResizeEdge edge=ResizeEdge::CLAMP)
Resize given image data to the new dimensions.
Definition: ImageConversion.cpp:1404
vtfpp::ImageFormatDetails::getDataLength
constexpr uint32_t getDataLength(ImageFormat format, uint16_t width, uint16_t height, uint16_t sliceCount=1)
Definition: ImageFormats.h:570
vtfpp
Definition: ImageConversion.h:13
vtfpp::ImageFormat
ImageFormat
Definition: ImageFormats.h:7
diff --git a/d4/df2/ImageConversion_8cpp_source.html b/d4/df2/ImageConversion_8cpp_source.html index 569e342c6..f659d6ec0 100644 --- a/d4/df2/ImageConversion_8cpp_source.html +++ b/d4/df2/ImageConversion_8cpp_source.html @@ -1451,106 +1451,109 @@
1323 inPixels.begin(), inPixels.end(), outPixels.begin(), [](uint16_t pixel) -> ImagePixel::RGBA16161616 {
1324 return {pixel, 0, 0, 0xffff};
1325 });
-
1326 }
-
1327 case 2: {
-
1328 struct RG1616 {
-
1329 uint16_t r;
-
1330 uint16_t g;
-
1331 };
-
1332 std::span<RG1616> inPixels{reinterpret_cast<RG1616*>(stbImage.get()), outPixels.size()};
-
1333 std::transform(
-
1334#ifdef SOURCEPP_BUILD_WITH_TBB
-
1335 std::execution::par_unseq,
-
1336#endif
-
1337 inPixels.begin(), inPixels.end(), outPixels.begin(), [](RG1616 pixel) -> ImagePixel::RGBA16161616 {
-
1338 return {pixel.r, pixel.g, 0, 0xffff};
-
1339 });
-
1340 }
-
1341 case 3: {
-
1342 struct RGB161616 {
-
1343 uint16_t r;
-
1344 uint16_t g;
-
1345 uint16_t b;
-
1346 };
-
1347 std::span<RGB161616> inPixels{reinterpret_cast<RGB161616*>(stbImage.get()), outPixels.size()};
-
1348 std::transform(
-
1349#ifdef SOURCEPP_BUILD_WITH_TBB
-
1350 std::execution::par_unseq,
-
1351#endif
-
1352 inPixels.begin(), inPixels.end(), outPixels.begin(), [](RGB161616 pixel) -> ImagePixel::RGBA16161616 {
-
1353 return {pixel.r, pixel.g, pixel.b, 0xffff};
-
1354 });
-
1355 }
-
1356 default:
-
1357 return {};
-
1358 }
-
1359 } else {
-
1360 return {};
-
1361 }
-
1362
-
1363 return {reinterpret_cast<std::byte*>(stbImage.get()), reinterpret_cast<std::byte*>(stbImage.get()) + ImageFormatDetails::getDataLength(format, width, height)};
-
1364 }
+
1326 return out;
+
1327 }
+
1328 case 2: {
+
1329 struct RG1616 {
+
1330 uint16_t r;
+
1331 uint16_t g;
+
1332 };
+
1333 std::span<RG1616> inPixels{reinterpret_cast<RG1616*>(stbImage.get()), outPixels.size()};
+
1334 std::transform(
+
1335#ifdef SOURCEPP_BUILD_WITH_TBB
+
1336 std::execution::par_unseq,
+
1337#endif
+
1338 inPixels.begin(), inPixels.end(), outPixels.begin(), [](RG1616 pixel) -> ImagePixel::RGBA16161616 {
+
1339 return {pixel.r, pixel.g, 0, 0xffff};
+
1340 });
+
1341 return out;
+
1342 }
+
1343 case 3: {
+
1344 struct RGB161616 {
+
1345 uint16_t r;
+
1346 uint16_t g;
+
1347 uint16_t b;
+
1348 };
+
1349 std::span<RGB161616> inPixels{reinterpret_cast<RGB161616*>(stbImage.get()), outPixels.size()};
+
1350 std::transform(
+
1351#ifdef SOURCEPP_BUILD_WITH_TBB
+
1352 std::execution::par_unseq,
+
1353#endif
+
1354 inPixels.begin(), inPixels.end(), outPixels.begin(), [](RGB161616 pixel) -> ImagePixel::RGBA16161616 {
+
1355 return {pixel.r, pixel.g, pixel.b, 0xffff};
+
1356 });
+
1357 return out;
+
1358 }
+
1359 default:
+
1360 return {};
+
1361 }
+
1362 } else {
+
1363 return {};
+
1364 }
1365
-
1366 // 8-bit or less single frame image
-
1367 const std::unique_ptr<stbi_uc, void(*)(void*)> stbImage{
-
1368 stbi_load_from_memory(reinterpret_cast<const stbi_uc*>(fileData.data()), static_cast<int>(fileData.size()), &width, &height, &channels, 0),
-
1369 &stbi_image_free,
-
1370 };
-
1371 if (!stbImage) {
-
1372 return {};
-
1373 }
-
1374
-
1375 switch (channels) {
-
1376 case 1: format = ImageFormat::I8; break;
-
1377 case 2: format = ImageFormat::UV88; break;
-
1378 case 3: format = ImageFormat::RGB888; break;
-
1379 case 4: format = ImageFormat::RGBA8888; break;
-
1380 default: return {};
-
1381 }
-
1382
-
1383 return {reinterpret_cast<std::byte*>(stbImage.get()), reinterpret_cast<std::byte*>(stbImage.get()) + ImageFormatDetails::getDataLength(format, width, height)};
-
1384}
+
1366 return {reinterpret_cast<std::byte*>(stbImage.get()), reinterpret_cast<std::byte*>(stbImage.get()) + ImageFormatDetails::getDataLength(format, width, height)};
+
1367 }
+
1368
+
1369 // 8-bit or less single frame image
+
1370 const std::unique_ptr<stbi_uc, void(*)(void*)> stbImage{
+
1371 stbi_load_from_memory(reinterpret_cast<const stbi_uc*>(fileData.data()), static_cast<int>(fileData.size()), &width, &height, &channels, 0),
+
1372 &stbi_image_free,
+
1373 };
+
1374 if (!stbImage) {
+
1375 return {};
+
1376 }
+
1377
+
1378 switch (channels) {
+
1379 case 1: format = ImageFormat::I8; break;
+
1380 case 2: format = ImageFormat::UV88; break;
+
1381 case 3: format = ImageFormat::RGB888; break;
+
1382 case 4: format = ImageFormat::RGBA8888; break;
+
1383 default: return {};
+
1384 }
1385
-
1386uint16_t ImageConversion::getResizedDim(uint16_t n, ResizeMethod method) {
-
1387 switch (method) {
-
1388 case ResizeMethod::NONE: break;
-
1389 case ResizeMethod::POWER_OF_TWO_BIGGER: return std::bit_ceil(n);
-
1390 case ResizeMethod::POWER_OF_TWO_SMALLER: return std::bit_floor(n);
-
1391 case ResizeMethod::POWER_OF_TWO_NEAREST: return math::nearestPowerOf2(n);
-
1392 }
-
1393 return n;
-
1394}
-
1395
-
1396void ImageConversion::setResizedDims(uint16_t& width, ResizeMethod widthResize, uint16_t& height, ResizeMethod heightResize) {
-
1397 width = getResizedDim(width, widthResize);
-
1398 height = getResizedDim(height, heightResize);
-
1399}
-
1400
-
1401std::vector<std::byte> ImageConversion::resizeImageData(std::span<const std::byte> imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t height, uint16_t newHeight, bool srgb, ResizeFilter filter, ResizeEdge edge) {
-
1402 if (imageData.empty() || format == ImageFormat::EMPTY) {
-
1403 return {};
-
1404 }
-
1405 const auto pixelLayout = ::imageFormatToSTBIRPixelLayout(format);
-
1406 if (pixelLayout == -1) {
-
1407 const auto containerFormat = ImageFormatDetails::containerFormat(format);
-
1408 const auto in = convertImageDataToFormat(imageData, format, containerFormat, width, height);
-
1409 std::vector<std::byte> intermediary(ImageFormatDetails::getDataLength(containerFormat, newWidth, newHeight));
-
1410 stbir_resize(in.data(), width, height, ImageFormatDetails::bpp(containerFormat) / 8 * width, intermediary.data(), newWidth, newHeight, ImageFormatDetails::bpp(containerFormat) / 8 * newWidth, static_cast<stbir_pixel_layout>(::imageFormatToSTBIRPixelLayout(containerFormat)), static_cast<stbir_datatype>(::imageFormatToSTBIRDataType(containerFormat, srgb)), STBIR_EDGE_CLAMP, static_cast<stbir_filter>(filter));
-
1411 return convertImageDataToFormat(intermediary, containerFormat, format, newWidth, newHeight);
-
1412 }
-
1413 std::vector<std::byte> out(ImageFormatDetails::getDataLength(format, newWidth, newHeight));
-
1414 stbir_resize(imageData.data(), width, height, ImageFormatDetails::bpp(format) / 8 * width, out.data(), newWidth, newHeight, ImageFormatDetails::bpp(format) / 8 * newWidth, static_cast<stbir_pixel_layout>(pixelLayout), static_cast<stbir_datatype>(::imageFormatToSTBIRDataType(format, srgb)), static_cast<stbir_edge>(edge), static_cast<stbir_filter>(filter));
-
1415 return out;
-
1416}
-
1417
-
1418std::vector<std::byte> ImageConversion::resizeImageDataStrict(std::span<const std::byte> imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t& widthOut, ResizeMethod widthResize, uint16_t height, uint16_t newHeight, uint16_t& heightOut, ResizeMethod heightResize, bool srgb, ResizeFilter filter, ResizeEdge edge) {
-
1419 if (imageData.empty() || format == ImageFormat::EMPTY) {
-
1420 return {};
-
1421 }
-
1422 widthOut = getResizedDim(newWidth, widthResize);
-
1423 heightOut = getResizedDim(newHeight, heightResize);
-
1424 return resizeImageData(imageData, format, width, widthOut, height, heightOut, srgb, filter, edge);
-
1425}
+
1386 return {reinterpret_cast<std::byte*>(stbImage.get()), reinterpret_cast<std::byte*>(stbImage.get()) + ImageFormatDetails::getDataLength(format, width, height)};
+
1387}
+
1388
+
1389uint16_t ImageConversion::getResizedDim(uint16_t n, ResizeMethod method) {
+
1390 switch (method) {
+
1391 case ResizeMethod::NONE: break;
+
1392 case ResizeMethod::POWER_OF_TWO_BIGGER: return std::bit_ceil(n);
+
1393 case ResizeMethod::POWER_OF_TWO_SMALLER: return std::bit_floor(n);
+
1394 case ResizeMethod::POWER_OF_TWO_NEAREST: return math::nearestPowerOf2(n);
+
1395 }
+
1396 return n;
+
1397}
+
1398
+
1399void ImageConversion::setResizedDims(uint16_t& width, ResizeMethod widthResize, uint16_t& height, ResizeMethod heightResize) {
+
1400 width = getResizedDim(width, widthResize);
+
1401 height = getResizedDim(height, heightResize);
+
1402}
+
1403
+
1404std::vector<std::byte> ImageConversion::resizeImageData(std::span<const std::byte> imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t height, uint16_t newHeight, bool srgb, ResizeFilter filter, ResizeEdge edge) {
+
1405 if (imageData.empty() || format == ImageFormat::EMPTY) {
+
1406 return {};
+
1407 }
+
1408 const auto pixelLayout = ::imageFormatToSTBIRPixelLayout(format);
+
1409 if (pixelLayout == -1) {
+
1410 const auto containerFormat = ImageFormatDetails::containerFormat(format);
+
1411 const auto in = convertImageDataToFormat(imageData, format, containerFormat, width, height);
+
1412 std::vector<std::byte> intermediary(ImageFormatDetails::getDataLength(containerFormat, newWidth, newHeight));
+
1413 stbir_resize(in.data(), width, height, ImageFormatDetails::bpp(containerFormat) / 8 * width, intermediary.data(), newWidth, newHeight, ImageFormatDetails::bpp(containerFormat) / 8 * newWidth, static_cast<stbir_pixel_layout>(::imageFormatToSTBIRPixelLayout(containerFormat)), static_cast<stbir_datatype>(::imageFormatToSTBIRDataType(containerFormat, srgb)), STBIR_EDGE_CLAMP, static_cast<stbir_filter>(filter));
+
1414 return convertImageDataToFormat(intermediary, containerFormat, format, newWidth, newHeight);
+
1415 }
+
1416 std::vector<std::byte> out(ImageFormatDetails::getDataLength(format, newWidth, newHeight));
+
1417 stbir_resize(imageData.data(), width, height, ImageFormatDetails::bpp(format) / 8 * width, out.data(), newWidth, newHeight, ImageFormatDetails::bpp(format) / 8 * newWidth, static_cast<stbir_pixel_layout>(pixelLayout), static_cast<stbir_datatype>(::imageFormatToSTBIRDataType(format, srgb)), static_cast<stbir_edge>(edge), static_cast<stbir_filter>(filter));
+
1418 return out;
+
1419}
+
1420
+
1421std::vector<std::byte> ImageConversion::resizeImageDataStrict(std::span<const std::byte> imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t& widthOut, ResizeMethod widthResize, uint16_t height, uint16_t newHeight, uint16_t& heightOut, ResizeMethod heightResize, bool srgb, ResizeFilter filter, ResizeEdge edge) {
+
1422 if (imageData.empty() || format == ImageFormat::EMPTY) {
+
1423 return {};
+
1424 }
+
1425 widthOut = getResizedDim(newWidth, widthResize);
+
1426 heightOut = getResizedDim(newHeight, heightResize);
+
1427 return resizeImageData(imageData, format, width, widthOut, height, heightOut, srgb, filter, edge);
+
1428}
VTFPP_REMAP_TO_8
#define VTFPP_REMAP_TO_8(value, shift)
VTFPP_REMAP_FROM_8
#define VTFPP_REMAP_FROM_8(value, shift)
VTFPP_CASE_CONVERT_AND_BREAK
#define VTFPP_CASE_CONVERT_AND_BREAK(InputType, r, g, b, a)
@@ -1564,8 +1567,8 @@
sourcepp
Definition: Adler32.h:8
vtfpp::ImageConversion::convertFileToImageData
std::vector< std::byte > convertFileToImageData(std::span< const std::byte > fileData, ImageFormat &format, int &width, int &height, int &frameCount)
Definition: ImageConversion.cpp:1086
vtfpp::ImageConversion::convertImageDataToFile
std::vector< std::byte > convertImageDataToFile(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t height, FileFormat fileFormat=FileFormat::DEFAULT)
Converts image data to a PNG or EXR file. EXR format will be used for floating-point image formats.
Definition: ImageConversion.cpp:882
-
vtfpp::ImageConversion::setResizedDims
void setResizedDims(uint16_t &width, ResizeMethod widthResize, uint16_t &height, ResizeMethod heightResize)
Set the new image dimensions given a resize method.
Definition: ImageConversion.cpp:1396
-
vtfpp::ImageConversion::getResizedDim
uint16_t getResizedDim(uint16_t n, ResizeMethod method)
Get the new image size given a resize method.
Definition: ImageConversion.cpp:1386
+
vtfpp::ImageConversion::setResizedDims
void setResizedDims(uint16_t &width, ResizeMethod widthResize, uint16_t &height, ResizeMethod heightResize)
Set the new image dimensions given a resize method.
Definition: ImageConversion.cpp:1399
+
vtfpp::ImageConversion::getResizedDim
uint16_t getResizedDim(uint16_t n, ResizeMethod method)
Get the new image size given a resize method.
Definition: ImageConversion.cpp:1389
vtfpp::ImageConversion::ResizeEdge
ResizeEdge
Definition: ImageConversion.h:344
vtfpp::ImageConversion::ResizeFilter
ResizeFilter
Definition: ImageConversion.h:352
vtfpp::ImageConversion::getDefaultFileFormatForImageFormat
FileFormat getDefaultFileFormatForImageFormat(ImageFormat format)
PNG for integer formats, EXR for floating point formats.
Definition: ImageConversion.cpp:877
@@ -1575,9 +1578,9 @@
vtfpp::ImageConversion::FileFormat
FileFormat
Definition: ImageConversion.h:326
vtfpp::ImageConversion::FileFormat::PNG
@ PNG
vtfpp::ImageConversion::FileFormat::EXR
@ EXR
-
vtfpp::ImageConversion::resizeImageDataStrict
std::vector< std::byte > resizeImageDataStrict(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t &widthOut, ResizeMethod widthResize, uint16_t height, uint16_t newHeight, uint16_t &heightOut, ResizeMethod heightResize, bool srgb, ResizeFilter filter, ResizeEdge edge=ResizeEdge::CLAMP)
Resize given image data to the new dimensions, where the new width and height are governed by the res...
Definition: ImageConversion.cpp:1418
+
vtfpp::ImageConversion::resizeImageDataStrict
std::vector< std::byte > resizeImageDataStrict(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t &widthOut, ResizeMethod widthResize, uint16_t height, uint16_t newHeight, uint16_t &heightOut, ResizeMethod heightResize, bool srgb, ResizeFilter filter, ResizeEdge edge=ResizeEdge::CLAMP)
Resize given image data to the new dimensions, where the new width and height are governed by the res...
Definition: ImageConversion.cpp:1421
vtfpp::ImageConversion::convertImageDataToFormat
std::vector< std::byte > convertImageDataToFormat(std::span< const std::byte > imageData, ImageFormat oldFormat, ImageFormat newFormat, uint16_t width, uint16_t height)
Converts an image from one format to another.
Definition: ImageConversion.cpp:774
-
vtfpp::ImageConversion::resizeImageData
std::vector< std::byte > resizeImageData(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t height, uint16_t newHeight, bool srgb, ResizeFilter filter, ResizeEdge edge=ResizeEdge::CLAMP)
Resize given image data to the new dimensions.
Definition: ImageConversion.cpp:1401
+
vtfpp::ImageConversion::resizeImageData
std::vector< std::byte > resizeImageData(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t height, uint16_t newHeight, bool srgb, ResizeFilter filter, ResizeEdge edge=ResizeEdge::CLAMP)
Resize given image data to the new dimensions.
Definition: ImageConversion.cpp:1404
vtfpp::ImageDimensions::getMipDim
constexpr uint32_t getMipDim(uint8_t mip, uint16_t dim)
Definition: ImageFormats.h:531
vtfpp::ImageFormatDetails::alpha
constexpr int8_t alpha(ImageFormat format)
Definition: ImageFormats.h:287
vtfpp::ImageFormatDetails::green
constexpr int8_t green(ImageFormat format)
Definition: ImageFormats.h:132
diff --git a/d5/d61/namespacevtfpp_1_1ImageConversion.html b/d5/d61/namespacevtfpp_1_1ImageConversion.html index 8185eb75b..10b4c3736 100644 --- a/d5/d61/namespacevtfpp_1_1ImageConversion.html +++ b/d5/d61/namespacevtfpp_1_1ImageConversion.html @@ -680,7 +680,7 @@

Definition at line 1386 of file ImageConversion.cpp.

+

Definition at line 1389 of file ImageConversion.cpp.

@@ -754,7 +754,7 @@

Definition at line 1401 of file ImageConversion.cpp.

+

Definition at line 1404 of file ImageConversion.cpp.

@@ -852,7 +852,7 @@

Definition at line 1418 of file ImageConversion.cpp.

+

Definition at line 1421 of file ImageConversion.cpp.

@@ -896,7 +896,7 @@

Definition at line 1396 of file ImageConversion.cpp.

+

Definition at line 1399 of file ImageConversion.cpp.

diff --git a/da/d01/ImageConversion_8h_source.html b/da/d01/ImageConversion_8h_source.html index b32cd42e7..227d9660a 100644 --- a/da/d01/ImageConversion_8h_source.html +++ b/da/d01/ImageConversion_8h_source.html @@ -543,8 +543,8 @@
typename member_type< T >::type member_type_t
Definition: Templates.h:21
std::vector< std::byte > convertFileToImageData(std::span< const std::byte > fileData, ImageFormat &format, int &width, int &height, int &frameCount)
std::vector< std::byte > convertImageDataToFile(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t height, FileFormat fileFormat=FileFormat::DEFAULT)
Converts image data to a PNG or EXR file. EXR format will be used for floating-point image formats.
-
void setResizedDims(uint16_t &width, ResizeMethod widthResize, uint16_t &height, ResizeMethod heightResize)
Set the new image dimensions given a resize method.
-
uint16_t getResizedDim(uint16_t n, ResizeMethod method)
Get the new image size given a resize method.
+
void setResizedDims(uint16_t &width, ResizeMethod widthResize, uint16_t &height, ResizeMethod heightResize)
Set the new image dimensions given a resize method.
+
uint16_t getResizedDim(uint16_t n, ResizeMethod method)
Get the new image size given a resize method.
@@ -572,10 +572,10 @@ -
std::vector< std::byte > resizeImageDataStrict(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t &widthOut, ResizeMethod widthResize, uint16_t height, uint16_t newHeight, uint16_t &heightOut, ResizeMethod heightResize, bool srgb, ResizeFilter filter, ResizeEdge edge=ResizeEdge::CLAMP)
Resize given image data to the new dimensions, where the new width and height are governed by the res...
+
std::vector< std::byte > resizeImageDataStrict(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t &widthOut, ResizeMethod widthResize, uint16_t height, uint16_t newHeight, uint16_t &heightOut, ResizeMethod heightResize, bool srgb, ResizeFilter filter, ResizeEdge edge=ResizeEdge::CLAMP)
Resize given image data to the new dimensions, where the new width and height are governed by the res...
std::vector< std::byte > convertImageDataToFormat(std::span< const std::byte > imageData, ImageFormat oldFormat, ImageFormat newFormat, uint16_t width, uint16_t height)
Converts an image from one format to another.
bool applyChannelToImageData(std::span< std::byte > imageData, std::span< const std::byte > channelData, auto P::*channel)
Applies a single channel to the given image data.
-
std::vector< std::byte > resizeImageData(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t height, uint16_t newHeight, bool srgb, ResizeFilter filter, ResizeEdge edge=ResizeEdge::CLAMP)
Resize given image data to the new dimensions.
+
std::vector< std::byte > resizeImageData(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t height, uint16_t newHeight, bool srgb, ResizeFilter filter, ResizeEdge edge=ResizeEdge::CLAMP)
Resize given image data to the new dimensions.
ImageFormat
Definition: ImageFormats.h:7
diff --git a/dd/d09/VTF_8cpp_source.html b/dd/d09/VTF_8cpp_source.html index 28bbf54bc..845e82e87 100644 --- a/dd/d09/VTF_8cpp_source.html +++ b/dd/d09/VTF_8cpp_source.html @@ -1575,13 +1575,13 @@
std::vector< std::byte > convertFileToImageData(std::span< const std::byte > fileData, ImageFormat &format, int &width, int &height, int &frameCount)
std::vector< std::byte > convertImageDataToFile(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t height, FileFormat fileFormat=FileFormat::DEFAULT)
Converts image data to a PNG or EXR file. EXR format will be used for floating-point image formats.
-
void setResizedDims(uint16_t &width, ResizeMethod widthResize, uint16_t &height, ResizeMethod heightResize)
Set the new image dimensions given a resize method.
+
void setResizedDims(uint16_t &width, ResizeMethod widthResize, uint16_t &height, ResizeMethod heightResize)
Set the new image dimensions given a resize method.
std::vector< std::byte > convertSeveralImageDataToFormat(std::span< const std::byte > imageData, ImageFormat oldFormat, ImageFormat newFormat, uint8_t mipCount, uint16_t frameCount, uint16_t faceCount, uint16_t width, uint16_t height, uint16_t sliceCount)
Converts several images from one format to another.
std::vector< std::byte > convertImageDataToFormat(std::span< const std::byte > imageData, ImageFormat oldFormat, ImageFormat newFormat, uint16_t width, uint16_t height)
Converts an image from one format to another.
-
std::vector< std::byte > resizeImageData(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t height, uint16_t newHeight, bool srgb, ResizeFilter filter, ResizeEdge edge=ResizeEdge::CLAMP)
Resize given image data to the new dimensions.
+
std::vector< std::byte > resizeImageData(std::span< const std::byte > imageData, ImageFormat format, uint16_t width, uint16_t newWidth, uint16_t height, uint16_t newHeight, bool srgb, ResizeFilter filter, ResizeEdge edge=ResizeEdge::CLAMP)
Resize given image data to the new dimensions.
constexpr uint32_t getMipDim(uint8_t mip, uint16_t dim)
Definition: ImageFormats.h:531
constexpr uint8_t getRecommendedMipCountForDims(ImageFormat format, uint16_t width, uint16_t height)
Definition: ImageFormats.h:538
constexpr bool large(ImageFormat format)
Definition: ImageFormats.h:477