RetainJpegFormat

RetainJpegFormat

#Overview

name: RetainJpegFormat

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 2 C++ source files.

#Summary

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEditor.ini:260, section: [TextureImporter]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Interchange/Runtime/Source/Import/Private/Texture/InterchangeTextureFactory.cpp:682

Scope (from outer to inner):

file
namespace    UE::Interchange::Private::InterchangeTextureFactory
function     FTexturePayloadVariant GetTexturePayload

Source code excerpt:

						|| Translator->GetClass() == UInterchangeUEJPEGTranslator::StaticClass())
					{
						// Honor setting from TextureImporter.RetainJpegFormat in Editor.ini if it exists (ideally we should deprecate this as it is confusing and probably not thread safe)
						const bool bShouldImportRawCache = bShoudImportCompressedImage;
						if (GConfig->GetBool(TEXT("TextureImporter"), TEXT("RetainJpegFormat"), bShoudImportCompressedImage, GEditorIni) && bShouldImportRawCache != bShoudImportCompressedImage)
						{
							UE_LOG(LogInterchangeImport, Log, TEXT("JPEG file [%s]: Pipeline setting 'bPreferCompressedSourceData' has been overridden by Editor setting 'RetainJpegFormat'."), *SourceData->GetFilename());
						}
					}

					if (bShoudImportCompressedImage && TextureTranslator->SupportCompressedTexturePayloadData())

#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Factories/EditorFactories.cpp:2956

Scope (from outer to inner):

file
function     bool UTextureFactory::ImportImage

Source code excerpt:

				{
					// For now this option is opt in via the config files once there is no technical risk this will become the default path.
					GConfig->GetBool(TEXT("TextureImporter"), TEXT("RetainJpegFormat"), bRetainJpegFormat, GEditorIni);
				}
				if ( bRetainJpegFormat)
				{
					// does not decode jpeg, just to get width/height :
					TSharedPtr<IImageWrapper> JpegImageWrapper = ImageWrapperModule.CreateImageWrapper(ImageFormat);
					if (JpegImageWrapper.IsValid() && JpegImageWrapper->SetCompressed(Buffer, Length))