Skip to content

Commit

Permalink
Updated FreeImageRe v0.2 -> v0.3
Browse files Browse the repository at this point in the history
agruzdev committed Apr 20, 2024
1 parent 3afe23b commit 615034e
Showing 6 changed files with 52 additions and 13 deletions.
15 changes: 14 additions & 1 deletion 3rdParty/freeimage/Readme.md
Original file line number Diff line number Diff line change
@@ -39,9 +39,22 @@ Version 0.2:
- Added basic support for YUV images
- Added basic support for Float32 complex images
- Added function FreeImage_ConvertToColor
- Added function FreeImage_FindMinMax
- Added function FreeImage_FindMinMax and FreeImage_FindMinMaxValue
- Added function FreeImage_TmoClamp and corresponding enum FITMO_CLAMP
- Added function FreeImage_TmoLinear and corresponding enum FITMO_LINEAR
- Added function FreeImage_DrawBitmap
- Added function FreeImage_GetColorType2
- Added function FreeImage_MakeHistogram
- Updated zlib till v1.3.1
- Updated OpenEXR till v3.2.2
- Updated OpenJPEG till v2.5.2
- Updaged LibJPEG till jpeg-9f
- Updated LibPNG till v1.6.43
- Updated LibTIFF till v4.6.0
- Updated LibWebP till v1.3.2
- Updated LibRaw till v0.21.2

Version 0.3:
- Fixed the vulnerability CVE-2023-47993
- Added API for querying versions of compiled dependencies

21 changes: 21 additions & 0 deletions 3rdParty/freeimage/include/FreeImage.h
Original file line number Diff line number Diff line change
@@ -41,6 +41,8 @@
#define FREEIMAGE_MINOR_VERSION 18
#define FREEIMAGE_RELEASE_SERIAL 0

#define FREEIMAGE_RESURRECTED 1

// Compiler options ---------------------------------------------------------

#include <inttypes.h>
@@ -661,6 +663,15 @@ typedef void (DLL_CALLCONV *FI_InitProc)(Plugin *plugin, int format_id);

#endif // PLUGINS

// Dependency info struct

FI_STRUCT (FIDEPENDENCY) {
const char* name;
const char* fullVersion; // Might include more components than major and minor digits, depends on each library style
uint32_t majorVersion;
uint32_t minorVersion;
};


// Load / Save flag constants -----------------------------------------------

@@ -807,6 +818,16 @@ DLL_API const char *DLL_CALLCONV FreeImage_GetCopyrightMessage(void);
DLL_API const char *DLL_CALLCONV FreeImageRe_GetVersion(void);
DLL_API void DLL_CALLCONV FreeImageRe_GetVersionNumbers(int* major, int* minor);

/**
* Returns number of linked dependencies
*/
DLL_API uint32_t DLL_CALLCONV FreeImage_GetDependenciesCount(void);
/**
* Returns dependency info.
* The address to FIDEPENDENCY should not be released manually.
*/
DLL_API const FIDEPENDENCY* DLL_CALLCONV FreeImage_GetDependencyInfo(uint32_t index);

// Message output functions -------------------------------------------------

typedef void (*FreeImage_OutputMessageFunction)(FREE_IMAGE_FORMAT fif, const char *msg);
Binary file modified 3rdParty/freeimage/lib/linux64/libFreeImage.so
Binary file not shown.
Binary file modified 3rdParty/freeimage/lib/win64/FreeImage.dll
Binary file not shown.
Binary file modified 3rdParty/freeimage/lib/win64/FreeImage.lib
Binary file not shown.
29 changes: 17 additions & 12 deletions src/AboutWidget.cpp
Original file line number Diff line number Diff line change
@@ -41,23 +41,28 @@ AboutWidget::AboutWidget(QWidget* parent)
text->setPaddings(8, 0, 4, 0);

QVector<QString> textLines;
textLines.push_back("Version: " + QString::number(Global::kVersionMajor) + "." + QString::number(Global::kVersionMinor));
textLines.push_back("Copyright 2018-2023 " + Global::kOrganizationName);
textLines.push_back("");
textLines.push_back("Using:");
textLines.push_back(" Qt v" + QString(qVersion()));
textLines.push_back(" FreeImageRe v" + QString(FreeImageRe_GetVersion()) + " (" + QString::number(FREEIMAGE_MAJOR_VERSION) + "." + QString::number(FREEIMAGE_MINOR_VERSION) + ")");
textLines.push_back("");
textLines.push_back("");
textLines.push_back("Controls:");
textLines.emplace_back("Version: " + QString::number(Global::kVersionMajor) + "." + QString::number(Global::kVersionMinor));
textLines.emplace_back("Copyright 2018-2024 " + Global::kOrganizationName);
textLines.emplace_back("");
textLines.emplace_back("Dependencies:");
textLines.emplace_back(" Qt v" + QString(qVersion()));
textLines.emplace_back(" FreeImageRe v" + QString(FreeImageRe_GetVersion()) + " (" + QString::number(FREEIMAGE_MAJOR_VERSION) + "." + QString::number(FREEIMAGE_MINOR_VERSION) + ")");
for (uint32_t depIdx = 0; depIdx < FreeImage_GetDependenciesCount(); ++depIdx) {
if (const auto* depInfo = FreeImage_GetDependencyInfo(depIdx)) {
textLines.emplace_back(" - " + QString(depInfo->name) + " v" + QString(depInfo->fullVersion));
}
}
textLines.emplace_back("");
textLines.emplace_back("Controls:");
for (const auto& [action, keys] : Controls::getInstance().printControls()) {
textLines.push_back(" " + action + " | " + keys);
textLines.emplace_back(" " + action + " | " + keys);
}
textLines.emplace_back("");
text->setColumnSeperator('|');
text->appendColumnOffset(225);
text->appendColumnOffset(300);
text->setText(textLines);

setFixedSize(400, 90 + textLines.size() * 16);
setFixedSize(500, 90 + textLines.size() * 16);

update();
show();

0 comments on commit 615034e

Please sign in to comment.