Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mcychan authored Nov 24, 2022
1 parent 38b9dc8 commit 987c429
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions nQuantCpp/nQuantCpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace fs = std::filesystem;
#include "EdgeAwareSQuantizer.h"
#include "SpatialQuantizer.h"
#include "DivQuantizer.h"
#include "Dl3Quantizer.h"
#include "MedianCut.h"
#include "Otsu.h"
#include <unordered_map>
Expand All @@ -35,7 +36,7 @@ ostream& tcout = cout;
GdiplusStartupInput m_gdiplusStartupInput;
ULONG_PTR m_gdiplusToken;

wstring algs[] = { L"PNN", L"PNNLAB", L"NEU", L"WU", L"EAS", L"SPA", L"DIV", L"MMC", L"OTSU" };
wstring algs[] = { L"PNN", L"PNNLAB", L"NEU", L"WU", L"EAS", L"SPA", L"DIV", L"DL3", L"MMC", L"OTSU" };
unordered_map<LPCTSTR, CLSID> extensionMap;

void PrintUsage()
Expand Down Expand Up @@ -165,7 +166,11 @@ bool QuantizeImage(const wstring& algorithm, const wstring& sourceFile, wstring&
else if (algorithm == L"DIV") {
DivQuant::DivQuantizer divQuantizer;
bSucceeded = divQuantizer.QuantizeImage(pSource, pDest.get(), nMaxColors, dither);
}
}
else if (algorithm == L"DL3") {
Dl3Quant::Dl3Quantizer dl3Quantizer;
bSucceeded = dl3Quantizer.QuantizeImage(pSource, pDest.get(), nMaxColors, dither);
}
else if (algorithm == L"MMC") {
MedianCutQuant::MedianCut mmcQuantizer;
bSucceeded = mmcQuantizer.QuantizeImage(pSource, pDest.get(), nMaxColors, dither);
Expand Down
Binary file modified nQuantCpp/nQuantCpp.rc
Binary file not shown.

0 comments on commit 987c429

Please sign in to comment.