You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
FImage is now the standard preferred type for a bag of pixels FImageView can point at pixels without owning an allocation ERawImageFormat (FImage) converts to ETextureSourceFormat FImageUtils provides generic load/save and get/set from FImage major cleanup in the ImageWrappers new preferred API is through ImageWrapperModule Compress/Decompress SetRaw/GetRaw functions cleaned up to not have undefined behavior on unexpected formats ImageWrapper output added for HDR,BMP,TGA RGBA32F format added and supported throughout import/export EditorFactories import/export made more generic, most image types handled the same way using FImage now Deprecate old TSF RGBA order pixel formats Fix many crashes or bad handling of unusual pixel formats Pixel access functions should be used instead of switches on pixel type #preflight 6230ade7e65a7e65d68a187c #rb julien.stjean,martins.mozeiko,dan.thompson,fabian.giesen [CL 19397199 by charles bloom in ue5-main branch]
58 lines
1.4 KiB
C++
58 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreTypes.h"
|
|
#include "ImageWrapperBase.h"
|
|
|
|
|
|
/**
|
|
* BMP implementation of the helper class
|
|
*/
|
|
class FBmpImageWrapper
|
|
: public FImageWrapperBase
|
|
{
|
|
public:
|
|
|
|
/** Default Constructor. */
|
|
FBmpImageWrapper(bool bInHasHeader = true, bool bInHalfHeight = false);
|
|
|
|
public:
|
|
|
|
/** Helper function used to uncompress BMP data from a buffer */
|
|
void UncompressBMPData(const ERGBFormat InFormat, const int32 InBitDepth);
|
|
|
|
/**
|
|
* Load the header information, returns true if successful.
|
|
*
|
|
* @return true if successful
|
|
*/
|
|
bool LoadBMPHeader();
|
|
|
|
/**
|
|
* Load the sub-header information, returns true if successful.
|
|
*
|
|
* @return true if successful
|
|
*/
|
|
bool LoadBMPInfoHeader();
|
|
|
|
public:
|
|
|
|
//~ FImageWrapper interface
|
|
|
|
virtual void Compress(int32 Quality) override;
|
|
virtual void Uncompress(const ERGBFormat InFormat, int32 InBitDepth) override;
|
|
virtual bool SetCompressed(const void* InCompressedData, int64 InCompressedSize) override;
|
|
|
|
virtual bool CanSetRawFormat(const ERGBFormat InFormat, const int32 InBitDepth) const override;
|
|
virtual ERawImageFormat::Type GetSupportedRawFormat(const ERawImageFormat::Type InFormat) const override;
|
|
|
|
private:
|
|
|
|
/** Whether this file has a BMP file header */
|
|
bool bHasHeader;
|
|
|
|
/** BMP as a sub-format of ICO stores its height as half their actual size */
|
|
bool bHalfHeight;
|
|
};
|