Files
o3de/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.h
T
Qing Tao 2ae8477683 ATOM-13512 Altering IBL ImageProcessor .preset Does Not Force Assets to Rebuild (#5639)
Changes include:
- Move config files from ImageProcessingAtom/Config/ folder to ImageProcessingAtom/Assets/Config/ folder so it can be watched as source depencies.
- Change GetSuggestedPreset function so it can return certain preset for certain file name.
- Move file mask mappings from preset to ImageBuilder.settings. But the file masks in preset can still be used.
- Changed from using project config folder's imageBuilder.Settings for override to using it as json merge patch.
- Expose GetFileHash function in AssetBuilderSDK api.


Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>
2021-11-16 15:25:13 -08:00

33 lines
1006 B
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <Atom/ImageProcessing/ImageObject.h>
#include <AzCore/Asset/AssetCommon.h>
namespace ImageProcessingAtom
{
namespace Utils
{
EPixelFormat RHIFormatToPixelFormat(AZ::RHI::Format rhiFormat, bool& isSRGB);
AZ::RHI::Format PixelFormatToRHIFormat(EPixelFormat pixelFormat, bool isSrgb);
AZ::Data::Asset<AZ::RPI::StreamingImageAsset> LoadImageAsset(const AZ::Data::AssetId& assetId);
IImageObjectPtr LoadImageFromImageAsset(const AZ::Data::AssetId& assetId);
IImageObjectPtr LoadImageFromImageAsset(const AZ::Data::Asset<AZ::RPI::StreamingImageAsset>& asset);
bool SaveImageToDdsFile(IImageObjectPtr image, AZStd::string_view filePath);
bool NeedAlphaChannel(EAlphaContent alphaContent);
}
}