summaryrefslogtreecommitdiff
path: root/plugins/AdvaImg/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-01-26 17:38:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-01-26 17:38:31 +0300
commitdea9c030340e50324eba97c72a27c151bed12e1c (patch)
tree6fc156f40f52a9fc6e6b29e60001959477ee1a5e /plugins/AdvaImg/src/main.cpp
parentc6e8f8223cab9d799593b7b2cfa22134aa9745d6 (diff)
AdvaImg:
- freeimage extracted to the separate library; - FI_INTERFACE removed, all references to it are replaced with direct calls of FreeImage_* functions; - unified project for AdvaImg
Diffstat (limited to 'plugins/AdvaImg/src/main.cpp')
-rw-r--r--plugins/AdvaImg/src/main.cpp433
1 files changed, 6 insertions, 427 deletions
diff --git a/plugins/AdvaImg/src/main.cpp b/plugins/AdvaImg/src/main.cpp
index 799f8bc102..a3b74d15a5 100644
--- a/plugins/AdvaImg/src/main.cpp
+++ b/plugins/AdvaImg/src/main.cpp
@@ -24,16 +24,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <windows.h>
-#include <commdlg.h>
-#include <malloc.h>
-
-#include <m_imgsrvc.h>
-
-#include "newpluginapi.h"
-#include "version.h"
-
-#include "libpng/png.h"
+#include "stdafx.h"
static const PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
@@ -48,151 +39,6 @@ static const PLUGININFOEX pluginInfoEx = {
{0x7c070f7c, 0x459e, 0x46b7, {0x8e, 0x6d, 0xbc, 0x6e, 0xfa, 0xa2, 0x2f, 0x78}}
};
-/*
-* freeimage helper functions
-*/
-
-// Correct alpha from bitmaps loaded without it (it cames with 0 and should be 255)
-// originally in loadavatars...
-
-static void FI_CorrectBitmap32Alpha(HBITMAP hBitmap, BOOL force)
-{
- BITMAP bmp;
- DWORD dwLen;
- BYTE *p;
- int x, y;
- BOOL fixIt;
-
- GetObject(hBitmap, sizeof(bmp), &bmp);
-
- if (bmp.bmBitsPixel != 32)
- return;
-
- dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8);
- p = (BYTE *)malloc(dwLen);
- if (p == nullptr)
- return;
- memset(p, 0, dwLen);
-
- GetBitmapBits(hBitmap, dwLen, p);
-
- fixIt = TRUE;
- for (y = 0; fixIt && y < bmp.bmHeight; ++y) {
- BYTE *px = p + bmp.bmWidth * 4 * y;
-
- for (x = 0; fixIt && x < bmp.bmWidth; ++x)
- {
- if (px[3] != 0 && !force)
- {
- fixIt = FALSE;
- }
- else
- {
- px[3] = 255;
- }
-
- px += 4;
- }
- }
-
- if (fixIt)
- SetBitmapBits(hBitmap, dwLen, p);
-
- free(p);
-}
-
-/*
-* needed for per pixel transparent images. Such images should then be rendered by
-* using AlphaBlend() with AC_SRC_ALPHA
-* dwFlags will be set to AVS_PREMULTIPLIED
-* return TRUE if the image has at least one pixel with transparency
-*/
-static BOOL FreeImage_PreMultiply(HBITMAP hBitmap)
-{
- BOOL transp = FALSE;
-
- BITMAP bmp;
- GetObject(hBitmap, sizeof(bmp), &bmp);
- if (bmp.bmBitsPixel == 32) {
- int width = bmp.bmWidth;
- int height = bmp.bmHeight;
- int dwLen = width * height * 4;
- BYTE *p = (BYTE *)malloc(dwLen);
- if (p != nullptr) {
- GetBitmapBits(hBitmap, dwLen, p);
-
- for (int y = 0; y < height; ++y) {
- BYTE *px = p + width * 4 * y;
- for (int x = 0; x < width; ++x) {
- BYTE alpha = px[3];
- if (alpha < 255) {
- transp = TRUE;
-
- px[0] = px[0] * alpha/255;
- px[1] = px[1] * alpha/255;
- px[2] = px[2] * alpha/255;
- }
-
- px += 4;
- }
- }
-
- if (transp)
- dwLen = SetBitmapBits(hBitmap, dwLen, p);
- free(p);
- }
- }
-
- return transp;
-}
-
-static HBITMAP FreeImage_CreateHBITMAPFromDIB(FIBITMAP *in)
-{
- FIBITMAP *dib = nullptr;
- int bpp = FreeImage_GetBPP(in);
-
- if (bpp == 48)
- dib = FreeImage_ConvertTo24Bits(in);
- else if (FreeImage_GetBPP(in) > 32)
- dib = FreeImage_ConvertTo32Bits(in);
- else
- dib = in;
-
- BYTE *ptPixels;
- BITMAPINFO *info = FreeImage_GetInfo(dib);
- HBITMAP hBmp = CreateDIBSection(nullptr, info, DIB_RGB_COLORS, (void **)&ptPixels, nullptr, 0);
- if (ptPixels != nullptr)
- memmove(ptPixels, FreeImage_GetBits(dib), FreeImage_GetPitch(dib) * FreeImage_GetHeight(dib));
-
- if (dib != in)
- FreeImage_Unload(dib);
-
- return hBmp;
-}
-
-static FIBITMAP *FreeImage_CreateDIBFromHBITMAP(HBITMAP hBmp)
-{
- BITMAP bm;
-
- if(hBmp) {
- GetObject(hBmp, sizeof(BITMAP), (LPSTR) &bm);
- FIBITMAP *dib = FreeImage_Allocate(bm.bmWidth, bm.bmHeight, bm.bmBitsPixel,0,0,0);
- // The GetDIBits function clears the biClrUsed and biClrImportant BITMAPINFO members (dont't know why)
- // So we save these infos below. This is needed for palettized images only.
- int nColors = FreeImage_GetColorsUsed(dib);
- HDC dc = GetDC(nullptr);
- int Success = GetDIBits(dc, hBmp, 0, FreeImage_GetHeight(dib),
- FreeImage_GetBits(dib), FreeImage_GetInfo(dib), DIB_RGB_COLORS);
- ReleaseDC(nullptr, dc);
- // restore BITMAPINFO members
- FreeImage_GetInfoHeader(dib)->biClrUsed = nColors;
- FreeImage_GetInfoHeader(dib)->biClrImportant = nColors;
- return dib;
- }
- return nullptr;
-}
-
-
// Resize /////////////////////////////////////////////////////////////////////////////////////////
@@ -202,7 +48,7 @@ static FIBITMAP *FreeImage_CreateDIBFromHBITMAP(HBITMAP hBmp)
// lParam = NULL
// return NULL on error, ResizeBitmap->hBmp if don't need to resize or a new HBITMAP if resized
-static INT_PTR serviceBmpFilterResizeBitmap(WPARAM wParam,LPARAM lParam)
+static INT_PTR serviceBmpFilterResizeBitmap(WPARAM wParam,LPARAM)
{
BITMAP bminfo;
int width, height;
@@ -324,57 +170,9 @@ static INT_PTR serviceBmpFilterResizeBitmap(WPARAM wParam,LPARAM lParam)
}
}
-FIBITMAP* FreeImage_LoadFromMem(FREE_IMAGE_FORMAT fif, fiio_mem_handle *handle, int flags)
-{
- if (handle && handle->data) {
- FIMEMORY *hmem = FreeImage_OpenMemory((BYTE *)handle->data, handle->datalen);
- FREE_IMAGE_FORMAT _fif = (fif != FIF_UNKNOWN) ? fif : FreeImage_GetFileTypeFromMemory(hmem, 0);
- FIBITMAP *dib = FreeImage_LoadFromMemory(_fif, hmem, flags);
- FreeImage_CloseMemory(hmem);
- }
-
- return nullptr;
-}
-
-FIMEMORY* FreeImage_SaveToMem(FREE_IMAGE_FORMAT fif, FIBITMAP *dib, fiio_mem_handle *handle, int flags)
-{
- if (handle) {
- FIMEMORY *hmem = FreeImage_OpenMemory(nullptr, 0);
- if(fif == FIF_UNKNOWN)
- fif = FIF_BMP;
- handle->curpos = 0;
- FreeImage_SaveToMemory(fif, dib, hmem, flags);
- FreeImage_AcquireMemory(hmem, (BYTE **)&handle->data, (DWORD *)&handle->datalen);
- return hmem;
- }
- return nullptr;
-}
-
///////////////////////////////////////////////////////////////////////////////
// Load - initializes the plugin instance
-FI_INTERFACE feif = {0};
-
-/*
-* caller MUST supply the desired version in wParam
-* if it doesn't match, error will be returned
-*/
-
-static INT_PTR serviceGetInterface(WPARAM wParam, LPARAM lParam)
-{
- FI_INTERFACE **ppfe = (FI_INTERFACE **)lParam;
-
- if ((DWORD)wParam != FI_IF_VERSION)
- return CALLSERVICE_NOTFOUND;
-
- if(ppfe) {
- *ppfe = &feif;
- return S_OK;
- }
- else
- return CALLSERVICE_NOTFOUND;
-}
-
static INT_PTR serviceLoad(WPARAM wParam, LPARAM lParam)
{
char *lpszFilename = (char *)wParam;
@@ -408,7 +206,7 @@ static INT_PTR serviceLoad(WPARAM wParam, LPARAM lParam)
HBITMAP hbm = FreeImage_CreateHBITMAPFromDIB(dib);
FreeImage_Unload(dib);
- FI_CorrectBitmap32Alpha(hbm, FALSE);
+ FreeImage_CorrectBitmap32Alpha(hbm, FALSE);
return ((INT_PTR)hbm);
}
return NULL;
@@ -434,7 +232,7 @@ static INT_PTR serviceLoadFromMem(WPARAM wParam, LPARAM lParam)
return (INT_PTR)hbm;
}
-static INT_PTR serviceUnload(WPARAM wParam, LPARAM lParam)
+static INT_PTR serviceUnload(WPARAM wParam, LPARAM)
{
FIBITMAP *dib = (FIBITMAP *)wParam;
@@ -471,7 +269,7 @@ static INT_PTR serviceSave(WPARAM wParam, LPARAM lParam)
if(isi->hbm != nullptr && (isi->dwMask & IMGI_HBITMAP) && !(isi->dwMask & IMGI_FBITMAP)) {
// create temporary dib, because we got a HBTIMAP passed
fUnload = TRUE;
- FI_CorrectBitmap32Alpha(isi->hbm, FALSE);
+ FreeImage_CorrectBitmap32Alpha(isi->hbm, FALSE);
dib = FreeImage_CreateDIBFromHBITMAP(isi->hbm);
}
else if(isi->dib != nullptr && (isi->dwMask & IMGI_FBITMAP) && !(isi->dwMask & IMGI_HBITMAP))
@@ -509,232 +307,13 @@ static INT_PTR serviceSave(WPARAM wParam, LPARAM lParam)
return 0;
}
-static INT_PTR serviceGetVersion(WPARAM wParam, LPARAM lParam)
-{
- return FI_IF_VERSION;
-}
-
-DLL_API FIBITMAP *DLL_CALLCONV FreeImage_RotateClassic(FIBITMAP *dib, double angle)
-{
- return FreeImage_Rotate(dib, angle, nullptr);
-}
-
-void FI_Populate(void)
-{
- /*
- * populate the interface
- */
-
- feif.version = FI_IF_VERSION;
-
- feif.FI__AllocateT = FreeImage_AllocateT;
- feif.FI_Allocate = FreeImage_Allocate;
- feif.FI_Clone = FreeImage_Clone;
- feif.FI_Unload = FreeImage_Unload;
-
- feif.FI_Load = FreeImage_Load;
- feif.FI_LoadFromHandle = FreeImage_LoadFromHandle;
- feif.FI_LoadU = FreeImage_LoadU;
- feif.FI_Save = FreeImage_Save;
- feif.FI_SaveToHandle = FreeImage_SaveToHandle;
- feif.FI_SaveU = FreeImage_SaveU;
-
- feif.FI_OpenMemory = FreeImage_OpenMemory;
- feif.FI_CloseMemory = FreeImage_CloseMemory;
- feif.FI_LoadFromMemory = FreeImage_LoadFromMemory;
- feif.FI_SaveToMemory = FreeImage_SaveToMemory;
- feif.FI_TellMemory = FreeImage_TellMemory;
- feif.FI_SeekMemory = FreeImage_SeekMemory;
- feif.FI_AcquireMemory = FreeImage_AcquireMemory;
- feif.FI_ReadMemory = FreeImage_ReadMemory;
- feif.FI_WriteMemory = FreeImage_WriteMemory;
- feif.FI_LoadMultiBitmapFromMemory = FreeImage_LoadMultiBitmapFromMemory;
-
- feif.FI_OpenMultiBitmap = FreeImage_OpenMultiBitmap;
- feif.FI_OpenMultiBitmapU = FreeImage_OpenMultiBitmapU;
- feif.FI_CloseMultiBitmap = FreeImage_CloseMultiBitmap;
- feif.FI_GetPageCount = FreeImage_GetPageCount;
- feif.FI_AppendPage = FreeImage_AppendPage;
- feif.FI_InsertPage = FreeImage_InsertPage;
- feif.FI_DeletePage = FreeImage_DeletePage;
- feif.FI_LockPage = FreeImage_LockPage;
- feif.FI_UnlockPage = FreeImage_UnlockPage;
- feif.FI_MovePage = FreeImage_MovePage;
- feif.FI_GetLockedPageNumbers = FreeImage_GetLockedPageNumbers;
-
- feif.FI_GetFileType = FreeImage_GetFileType;
- feif.FI_GetFileTypeU = FreeImage_GetFileTypeU;
- feif.FI_GetFileTypeFromHandle = FreeImage_GetFileTypeFromHandle;
- feif.FI_GetFileTypeFromMemory = FreeImage_GetFileTypeFromMemory;
- feif.FI_GetImageType = FreeImage_GetImageType;
-
- feif.FI_GetBits = FreeImage_GetBits;
- feif.FI_GetScanLine = FreeImage_GetScanLine;
- feif.FI_GetPixelIndex = FreeImage_GetPixelIndex;
- feif.FI_GetPixelColor = FreeImage_GetPixelColor;
- feif.FI_SetPixelColor = FreeImage_SetPixelColor;
- feif.FI_SetPixelIndex = FreeImage_SetPixelIndex;
-
- feif.FI_GetColorsUsed = FreeImage_GetColorsUsed;
- feif.FI_GetBPP = FreeImage_GetBPP;
- feif.FI_GetWidth = FreeImage_GetWidth;
- feif.FI_GetHeight = FreeImage_GetHeight;
- feif.FI_GetLine = FreeImage_GetLine;
- feif.FI_GetPitch = FreeImage_GetPitch;
- feif.FI_GetDIBSize = FreeImage_GetDIBSize;
- feif.FI_GetPalette = FreeImage_GetPalette;
- feif.FI_GetDotsPerMeterX = FreeImage_GetDotsPerMeterX;
- feif.FI_GetDotsPerMeterY = FreeImage_GetDotsPerMeterY;
- feif.FI_SetDotsPerMeterX = FreeImage_SetDotsPerMeterX;
- feif.FI_SetDotsPerMeterY = FreeImage_SetDotsPerMeterY;
- feif.FI_GetInfoHeader = FreeImage_GetInfoHeader;
- feif.FI_GetInfo = FreeImage_GetInfo;
- feif.FI_GetColorType = FreeImage_GetColorType;
- feif.FI_GetRedMask = FreeImage_GetRedMask;
- feif.FI_GetGreenMask = FreeImage_GetGreenMask;
- feif.FI_GetBlueMask = FreeImage_GetBlueMask;
- feif.FI_GetTransparencyCount = FreeImage_GetTransparencyCount;
- feif.FI_GetTransparencyTable = FreeImage_GetTransparencyTable;
- feif.FI_SetTransparent = FreeImage_SetTransparent;
- feif.FI_SetTransparencyTable = FreeImage_SetTransparencyTable;
- feif.FI_IsTransparent = FreeImage_IsTransparent;
- feif.FI_HasBackgroundColor = FreeImage_HasBackgroundColor;
- feif.FI_GetBackgroundColor = FreeImage_GetBackgroundColor;
- feif.FI_SetBackgroundColor = FreeImage_SetBackgroundColor;
-
- feif.FI_ConvertTo4Bits = FreeImage_ConvertTo4Bits;
- feif.FI_ConvertTo8Bits = FreeImage_ConvertTo8Bits;
- feif.FI_ConvertToGreyscale = FreeImage_ConvertToGreyscale;
- feif.FI_ConvertTo16Bits555 = FreeImage_ConvertTo16Bits555;
- feif.FI_ConvertTo16Bits565 = FreeImage_ConvertTo16Bits565;
- feif.FI_ConvertTo24Bits = FreeImage_ConvertTo24Bits;
- feif.FI_ConvertTo32Bits = FreeImage_ConvertTo32Bits;
- feif.FI_ColorQuantize = FreeImage_ColorQuantize;
- feif.FI_ColorQuantizeEx = FreeImage_ColorQuantizeEx;
- feif.FI_Threshold = FreeImage_Threshold;
- feif.FI_Dither = FreeImage_Dither;
- feif.FI_ConvertFromRawBits = FreeImage_ConvertFromRawBits;
- feif.FI_ConvertToRawBits = FreeImage_ConvertToRawBits;
- feif.FI_ConvertToRGBF = FreeImage_ConvertToRGBF;
- feif.FI_ConvertToStandardType = FreeImage_ConvertToStandardType;
- feif.FI_ConvertToType = FreeImage_ConvertToType;
-
- feif.FI_RegisterLocalPlugin = FreeImage_RegisterLocalPlugin;
- feif.FI_RegisterExternalPlugin = FreeImage_RegisterExternalPlugin;
- feif.FI_GetFIFCount = FreeImage_GetFIFCount;
- feif.FI_SetPluginEnabled = FreeImage_SetPluginEnabled;
- feif.FI_IsPluginEnabled = FreeImage_IsPluginEnabled;
- feif.FI_GetFIFFromFormat = FreeImage_GetFIFFromFormat;
- feif.FI_GetFIFFromMime = FreeImage_GetFIFFromMime;
- feif.FI_GetFormatFromFIF = FreeImage_GetFormatFromFIF;
- feif.FI_GetFIFExtensionList = FreeImage_GetFIFExtensionList;
- feif.FI_GetFIFDescription = FreeImage_GetFIFDescription;
- feif.FI_GetFIFRegExpr = FreeImage_GetFIFRegExpr;
- feif.FI_GetFIFMimeType = FreeImage_GetFIFMimeType;
- feif.FI_GetFIFFromFilename = FreeImage_GetFIFFromFilename;
- feif.FI_GetFIFFromFilenameU = FreeImage_GetFIFFromFilenameU;
- feif.FI_FIFSupportsReading = FreeImage_FIFSupportsReading;
- feif.FI_FIFSupportsWriting = FreeImage_FIFSupportsWriting;
- feif.FI_FIFSupportsExportBPP = FreeImage_FIFSupportsExportBPP;
- feif.FI_FIFSupportsExportType = FreeImage_FIFSupportsExportType;
- feif.FI_FIFSupportsICCProfiles = FreeImage_FIFSupportsICCProfiles;
-
- feif.FI_RotateClassic = FreeImage_RotateClassic;
- feif.FI_RotateEx = FreeImage_RotateEx;
- feif.FI_FlipHorizontal = FreeImage_FlipHorizontal;
- feif.FI_FlipVertical = FreeImage_FlipVertical;
- feif.FI_JPEGTransform = FreeImage_JPEGTransform;
-
- feif.FI_Rescale = FreeImage_Rescale;
- feif.FI_MakeThumbnail = FreeImage_MakeThumbnail;
-
- feif.FI_AdjustCurve = FreeImage_AdjustCurve;
- feif.FI_AdjustGamma = FreeImage_AdjustGamma;
- feif.FI_AdjustBrightness = FreeImage_AdjustBrightness;
- feif.FI_AdjustContrast = FreeImage_AdjustContrast;
- feif.FI_Invert = FreeImage_Invert;
- feif.FI_GetHistogram = FreeImage_GetHistogram;
-
- feif.FI_GetChannel = FreeImage_GetChannel;
- feif.FI_SetChannel = FreeImage_SetChannel;
- feif.FI_GetComplexChannel = FreeImage_GetComplexChannel;
- feif.FI_SetComplexChannel = FreeImage_SetComplexChannel;
-
- feif.FI_Copy = FreeImage_Copy;
- feif.FI_Paste = FreeImage_Paste;
- feif.FI_Composite = FreeImage_Composite;
- feif.FI_JPEGCrop = FreeImage_JPEGCrop;
-
- feif.FI_LoadFromMem = FreeImage_LoadFromMem;
- feif.FI_SaveToMem = FreeImage_SaveToMem;
-
- feif.FI_CreateDIBFromHBITMAP = FreeImage_CreateDIBFromHBITMAP;
- feif.FI_CreateHBITMAPFromDIB = FreeImage_CreateHBITMAPFromDIB;
-
- feif.FI_Premultiply = FreeImage_PreMultiply;
- feif.FI_BmpFilterResizeBitmap = serviceBmpFilterResizeBitmap;
-
- feif.FI_IsLittleEndian = FreeImage_IsLittleEndian;
- feif.FI_LookupX11Color = FreeImage_LookupX11Color;
- feif.FI_LookupSVGColor = FreeImage_LookupSVGColor;
-
- feif.FI_GetICCProfile = FreeImage_GetICCProfile;
- feif.FI_CreateICCProfile = FreeImage_CreateICCProfile;
- feif.FI_DestroyICCProfile = FreeImage_DestroyICCProfile;
-
- feif.FI_ToneMapping = FreeImage_ToneMapping;
- feif.FI_TmoDrago03 = FreeImage_TmoDrago03;
- feif.FI_TmoReinhard05 = FreeImage_TmoReinhard05;
-
- feif.FI_ZLibCompress = FreeImage_ZLibCompress;
- feif.FI_ZLibUncompress = FreeImage_ZLibUncompress;
- feif.FI_ZLibGZip = FreeImage_ZLibGZip;
- feif.FI_ZLibGUnzip = FreeImage_ZLibGUnzip;
- feif.FI_ZLibCRC32 = FreeImage_ZLibCRC32;
-
- feif.FI_CreateTag = FreeImage_CreateTag;
- feif.FI_DeleteTag = FreeImage_DeleteTag;
- feif.FI_CloneTag = FreeImage_CloneTag;
-
- feif.FI_GetTagKey = FreeImage_GetTagKey;
- feif.FI_GetTagDescription = FreeImage_GetTagDescription;
- feif.FI_GetTagID = FreeImage_GetTagID;
- feif.FI_GetTagType = FreeImage_GetTagType;
- feif.FI_GetTagCount = FreeImage_GetTagCount;
- feif.FI_GetTagLength = FreeImage_GetTagLength;
- feif.FI_GetTagValue = FreeImage_GetTagValue;
-
- feif.FI_SetTagKey = FreeImage_SetTagKey;
- feif.FI_SetTagDescription = FreeImage_SetTagDescription;
- feif.FI_SetTagID = FreeImage_SetTagID;
- feif.FI_SetTagType = FreeImage_SetTagType;
- feif.FI_SetTagCount = FreeImage_SetTagCount;
- feif.FI_SetTagLength = FreeImage_SetTagLength;
- feif.FI_SetTagValue = FreeImage_SetTagValue;
-
- feif.FI_FindFirstMetadata = FreeImage_FindFirstMetadata;
- feif.FI_FindNextMetadata = FreeImage_FindNextMetadata;
- feif.FI_FindCloseMetadata = FreeImage_FindCloseMetadata;
- feif.FI_SetMetadata = FreeImage_SetMetadata;
- feif.FI_GetMetadata = FreeImage_GetMetadata;
-
- feif.FI_GetMetadataCount = FreeImage_GetMetadataCount;
- feif.FI_TagToString = FreeImage_TagToString;
-
- feif.FI_CorrectBitmap32Alpha = FI_CorrectBitmap32Alpha;
-}
-
static int IMGSERVICE_Load()
{
- FI_Populate();
-
- CreateServiceFunction(MS_IMG_GETINTERFACE, serviceGetInterface);
CreateServiceFunction(MS_IMG_LOAD, serviceLoad);
CreateServiceFunction(MS_IMG_LOADFROMMEM, serviceLoadFromMem);
CreateServiceFunction(MS_IMG_SAVE, serviceSave);
CreateServiceFunction(MS_IMG_UNLOAD, serviceUnload);
CreateServiceFunction(MS_IMG_RESIZE, serviceBmpFilterResizeBitmap);
- CreateServiceFunction(MS_IMG_GETIFVERSION, serviceGetVersion);
return 0;
}
@@ -756,7 +335,7 @@ extern "C" int __declspec(dllexport) Unload(void)
return IMGSERVICE_Unload();
}
-extern "C" __declspec(dllexport) const PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) const PLUGININFOEX * MirandaPluginInfoEx(DWORD)
{
return &pluginInfoEx;
}