UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
JpegImageWrapper.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "ImageWrapperBase.h"
7
8#if WITH_UNREALJPEG
9
10#if WITH_LIBJPEGTURBO
11using tjhandle = void*;
12#endif // WITH_LIBJPEGTURBO
13
20 : public FImageWrapperBase
21{
22public:
23
25 // NumComponents == 1 for GrayscaleJPEG , but not supported by TJPEG path so currently broken
27
28 virtual ~FJpegImageWrapper();
29 virtual void Reset() override;
30
31public:
32
33 //~ FImageWrapperBase interface
34
35 virtual bool SetCompressed(const void* InCompressedData, int64 InCompressedSize) override;
36 virtual void Uncompress(const ERGBFormat InFormat, int32 InBitDepth) override;
37 virtual void Compress(int32 Quality) override;
38
39 virtual bool CanSetRawFormat(const ERGBFormat InFormat, const int32 InBitDepth) const override;
41
42private:
43
44 int32 NumComponents;
45
46#if WITH_LIBJPEGTURBO
48 void CompressTurbo(int32 Quality);
50#endif // WITH_LIBJPEGTURBO
51
52#if WITH_LIBJPEGTURBO
53 tjhandle Decompressor;
54#endif // WITH_LIBJPEGTURBO
55};
56
57
58#endif //WITH_JPEG
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
Definition ImageWrapperBase.h:17
virtual void Uncompress(const ERGBFormat InFormat, int32 InBitDepth)=0
virtual void Reset()
Definition ImageWrapperBase.cpp:22
virtual bool SetCompressed(const void *InCompressedData, int64 InCompressedSize) override
Definition ImageWrapperBase.cpp:104
virtual bool CanSetRawFormat(const ERGBFormat InFormat, const int32 InBitDepth) const =0
virtual ERawImageFormat::Type GetSupportedRawFormat(const ERawImageFormat::Type InFormat) const =0
Type
Definition ImageCore.h:57