UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TiffImageWrapper.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "ImageWrapperBase.h"
6
7#if WITH_LIBTIFF
8
9struct tiff;
10typedef struct tiff TIFF;
11
13{
15 {
16 public:
18
19 FTiffImageWrapper() = default;
21 FTiffImageWrapper& operator=(FTiffImageWrapper&&) = default;
22
23 FTiffImageWrapper(const FTiffImageWrapper&) = delete;
24 FTiffImageWrapper& operator=(const FTiffImageWrapper&) = delete;
25
26 // FImageWrapperBase Interface
27 virtual void Compress(int32 Quality) override;
28 virtual void Uncompress(const ERGBFormat InFormat, int32 InBitDepth) override;
29 virtual void Uncompress(const ERGBFormat InFormat, int32 InBitDepth, FDecompressedImageOutput& OutDecompressedImage) override;
30 virtual bool SetCompressed(const void* InCompressedData, int64 InCompressedSize) override;
31
32 virtual bool CanSetRawFormat(const ERGBFormat InFormat, const int32 InBitDepth) const override;
33 virtual ERawImageFormat::Type GetSupportedRawFormat(const ERawImageFormat::Type InFormat) const override;
34
35 private:
37
38 void ReleaseTiffImage();
39
40 // Unpack the compressed data into the raw buffer. It will also add the alpha channel when needed.
41 template<class DataTypeDest>
43
44 template<class DataTypeDest, class DataTypeSrc, class Adapter>
46
47 template<class DataTypeDest, class DataTypeSrc>
49
50 template<class DataTypeDest, class DataTypeSrc, class Adapter>
52
53 template<class DataTypeDest, class DataTypeSrc, bool bIsTiled, class ReadWriteAdapter>
55
56 // Postion in the buffer pass as a memory file to LibTiff
57 int64 CurrentPosition = 0;
58
59 TIFF* Tiff = nullptr;
60
62 uint16 Compression = 0;
63 uint16 BitsPerSample = 0;
64 uint16 SamplesPerPixel = 0;
66
70
71 friend struct FTIFFReadMemoryFile;
72
73 virtual void Reset() override
74 {
76
78
79 CurrentPosition = 0;
80 Photometric = 0;
81 Compression = 0;
82 BitsPerSample = 0;
83 SamplesPerPixel = 0;
84 SampleFormat = 0;
85
86 SubImageBuffer.Empty();
87 }
88 };
89}
90#endif // WITH_LIBTIFF
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition Platform.h:1127
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
ERGBFormat
Definition IImageWrapper.h:76
uint8_t uint8
Definition binka_ue_file_header.h:8
uint16_t uint16
Definition binka_ue_file_header.h:7
Definition ImageWrapperBase.h:17
virtual void Reset()
Definition ImageWrapperBase.cpp:22
Definition UnrealString.h.inl:34
Type
Definition ImageCore.h:57
Definition HdrImageWrapper.cpp:10
Definition ImageWrapperOutputTypes.h:11