summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-02 15:52:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-02 15:52:54 +0000
commit1c229f90bfc6c8032bd2d20e297e97f321eb4db7 (patch)
treed50f7364b1162d33871918e1a4904557859eb3dd
parent95237b406f01e4c66c1a4571a3804de278eab958 (diff)
constants for PNG & GIF reordered, restoring the functionality of picture saving
git-svn-id: http://svn.miranda-ng.org/main/trunk@13973 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/delphi/FreeImage.pas46
-rw-r--r--include/delphi/m_imgsrvc.inc70
-rw-r--r--include/m_freeimage.h66
-rw-r--r--plugins/AdvaImg/src/FreeImage/Plugin.cpp6
4 files changed, 94 insertions, 94 deletions
diff --git a/include/delphi/FreeImage.pas b/include/delphi/FreeImage.pas
index 1ff26db701..d38f15eb9d 100644
--- a/include/delphi/FreeImage.pas
+++ b/include/delphi/FreeImage.pas
@@ -257,30 +257,30 @@ const
FIF_BMP = FREE_IMAGE_FORMAT(0);
FIF_ICO = FREE_IMAGE_FORMAT(1);
FIF_JPEG = FREE_IMAGE_FORMAT(2);
- FIF_JNG = FREE_IMAGE_FORMAT(3);
- FIF_KOALA = FREE_IMAGE_FORMAT(4);
- FIF_LBM = FREE_IMAGE_FORMAT(5);
+ FIF_PNG = FREE_IMAGE_FORMAT(3);
+ FIF_GIF = FREE_IMAGE_FORMAT(4);
+ FIF_JNG = FREE_IMAGE_FORMAT(5);
+ FIF_KOALA = FREE_IMAGE_FORMAT(6);
+ FIF_LBM = FREE_IMAGE_FORMAT(7);
FIF_IFF = FIF_LBM;
- FIF_MNG = FREE_IMAGE_FORMAT(6);
- FIF_PBM = FREE_IMAGE_FORMAT(7);
- FIF_PBMRAW = FREE_IMAGE_FORMAT(8);
- FIF_PCD = FREE_IMAGE_FORMAT(9);
- FIF_PCX = FREE_IMAGE_FORMAT(10);
- FIF_PGM = FREE_IMAGE_FORMAT(11);
- FIF_PGMRAW = FREE_IMAGE_FORMAT(12);
- FIF_PNG = FREE_IMAGE_FORMAT(13);
- FIF_PPM = FREE_IMAGE_FORMAT(14);
- FIF_PPMRAW = FREE_IMAGE_FORMAT(15);
- FIF_RAS = FREE_IMAGE_FORMAT(16);
- FIF_TARGA = FREE_IMAGE_FORMAT(17);
- FIF_TIFF = FREE_IMAGE_FORMAT(18);
- FIF_WBMP = FREE_IMAGE_FORMAT(19);
- FIF_PSD = FREE_IMAGE_FORMAT(20);
- FIF_CUT = FREE_IMAGE_FORMAT(21);
- FIF_XBM = FREE_IMAGE_FORMAT(22);
- FIF_XPM = FREE_IMAGE_FORMAT(23);
- FIF_DDS = FREE_IMAGE_FORMAT(24);
- FIF_GIF = FREE_IMAGE_FORMAT(25);
+ FIF_MNG = FREE_IMAGE_FORMAT(8);
+ FIF_PBM = FREE_IMAGE_FORMAT(9);
+ FIF_PBMRAW = FREE_IMAGE_FORMAT(10);
+ FIF_PCD = FREE_IMAGE_FORMAT(11);
+ FIF_PCX = FREE_IMAGE_FORMAT(12);
+ FIF_PGM = FREE_IMAGE_FORMAT(13);
+ FIF_PGMRAW = FREE_IMAGE_FORMAT(14);
+ FIF_PPM = FREE_IMAGE_FORMAT(15);
+ FIF_PPMRAW = FREE_IMAGE_FORMAT(16);
+ FIF_RAS = FREE_IMAGE_FORMAT(17);
+ FIF_TARGA = FREE_IMAGE_FORMAT(18);
+ FIF_TIFF = FREE_IMAGE_FORMAT(19);
+ FIF_WBMP = FREE_IMAGE_FORMAT(20);
+ FIF_PSD = FREE_IMAGE_FORMAT(21);
+ FIF_CUT = FREE_IMAGE_FORMAT(22);
+ FIF_XBM = FREE_IMAGE_FORMAT(23);
+ FIF_XPM = FREE_IMAGE_FORMAT(24);
+ FIF_DDS = FREE_IMAGE_FORMAT(25);
FIF_HDR = FREE_IMAGE_FORMAT(26);
FIF_FAXG3 = FREE_IMAGE_FORMAT(27);
FIF_SGI = FREE_IMAGE_FORMAT(28);
diff --git a/include/delphi/m_imgsrvc.inc b/include/delphi/m_imgsrvc.inc
index 66440fe525..34a7f7101b 100644
--- a/include/delphi/m_imgsrvc.inc
+++ b/include/delphi/m_imgsrvc.inc
@@ -1,8 +1,8 @@
{
Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2007 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright 2000-2007 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-----------------------------------------------------------------------
Miranda Image services plugin / API definitions
-Provides various services for image loading, saving and manipulations.
+Provides various services for image loading, saving and manipulations.
This module is based on the freeimage library, copyrighted by the FreeImage
Project members.
@@ -86,9 +86,9 @@ typedef struct _tagFI_interface {
FIBITMAP *(DLL_CALLCONV *FI__AllocateT)(FREE_IMAGE_TYPE type, int width, int height, int bpp FI_DEFAULT(8), unsigned red_mask FI_DEFAULT(0), unsigned green_mask FI_DEFAULT(0), unsigned blue_mask FI_DEFAULT(0));
FIBITMAP *(DLL_CALLCONV *FI_Clone)(FIBITMAP *dib);
void (DLL_CALLCONV *FI_Unload)(FIBITMAP *dib);
-
+
// Load / Save routines -----------------------------------------------------
-
+
FIBITMAP *(DLL_CALLCONV *FI_Load)(FREE_IMAGE_FORMAT fif, const AnsiChar *filename, int flags FI_DEFAULT(0));
FIBITMAP *(DLL_CALLCONV *FI_LoadU)(FREE_IMAGE_FORMAT fif, const wchar_t *filename, int flags FI_DEFAULT(0));
FIBITMAP *(DLL_CALLCONV *FI_LoadFromHandle)(FREE_IMAGE_FORMAT fif, FreeImageIO *io, fi_handle handle, int flags FI_DEFAULT(0));
@@ -347,7 +347,7 @@ typedef struct _tagFI_interface {
*)
{
image services
-
+
only basic functionality is wrapped around Miranda services, because otherwise we
would get a huge load of services with complex parameter marshalling requirements.
}
@@ -369,22 +369,22 @@ const
is ready when Miranda calls the Load() handler of your plugin and you can return
1 in your Load() to disable your plugin when it depends on the freeimage interface
and the freeimage plugin is missing
-
+
example:
var
fif:PFI_INTERFACE;
fif:=nil;
result:=CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION,dword(fii));
-
+
if result<>S_OK then
failed, in this case, fei will be NULL and your plugin will crash when using the interface,
- so ALWAYS check it
+ so ALWAYS check it
}
MS_IMG_GETINTERFACE:PAnsiChar = 'IMG/GetInterface';
IMGL_RETURNDIB = 1; // will NOT return a HBITMAP but a FIBITMAP * instead (useful,
// if you want to do further image manipulations before
- // converting to a Win32 bitmap caller MUST then free the
+ // converting to a Win32 bitmap caller MUST then free the
// FIBITMAP * using fii->FI_Unload() or MS_IMG_UNLOAD (see below)
IMGL_WCHAR = 2; // filename is Unicode
@@ -410,30 +410,30 @@ const
FIF_BMP = 0;
FIF_ICO = 1;
FIF_JPEG = 2;
- FIF_JNG = 3;
- FIF_KOALA = 4;
- FIF_LBM = 5;
+ FIF_PNG = 3;
+ FIF_GIF = 4;
+ FIF_JNG = 5;
+ FIF_KOALA = 6;
+ FIF_LBM = 7;
FIF_IFF = FIF_LBM;
- FIF_MNG = 6;
- FIF_PBM = 7;
- FIF_PBMRAW = 8;
- FIF_PCD = 9;
- FIF_PCX = 10;
- FIF_PGM = 11;
- FIF_PGMRAW = 12;
- FIF_PNG = 13;
- FIF_PPM = 14;
- FIF_PPMRAW = 15;
- FIF_RAS = 16;
- FIF_TARGA = 17;
- FIF_TIFF = 18;
- FIF_WBMP = 19;
- FIF_PSD = 20;
- FIF_CUT = 21;
- FIF_XBM = 22;
- FIF_XPM = 23;
- FIF_DDS = 24;
- FIF_GIF = 25;
+ FIF_MNG = 8;
+ FIF_PBM = 9;
+ FIF_PBMRAW = 10;
+ FIF_PCD = 11;
+ FIF_PCX = 12;
+ FIF_PGM = 13;
+ FIF_PGMRAW = 14;
+ FIF_PPM = 15;
+ FIF_PPMRAW = 16;
+ FIF_RAS = 17;
+ FIF_TARGA = 18;
+ FIF_TIFF = 19;
+ FIF_WBMP = 20;
+ FIF_PSD = 21;
+ FIF_CUT = 22;
+ FIF_XBM = 23;
+ FIF_XPM = 24;
+ FIF_DDS = 25;
FIF_HDR = 26;
FIF_FAXG3 = 27;
FIF_SGI = 28;
@@ -554,10 +554,10 @@ const
{
* format conversion helpers
- *
+ *
* these helper macros allow converting HBITMAP to FIBITMAP * format and vice vera. In any case,
* the caller is responsible for freeing or deleting the original object.
- * These macros wrap around the FI_CreateHBITMAPFromDib() and FI_CreateDIBFromHBITMAP() interface
+ * These macros wrap around the FI_CreateHBITMAPFromDib() and FI_CreateDIBFromHBITMAP() interface
* functions.
}
diff --git a/include/m_freeimage.h b/include/m_freeimage.h
index 62328cb9e0..8685952343 100644
--- a/include/m_freeimage.h
+++ b/include/m_freeimage.h
@@ -382,42 +382,42 @@ FI_STRUCT (FIICCPROFILE) {
*/
FI_ENUM(FREE_IMAGE_FORMAT) {
FIF_UNKNOWN = -1,
- FIF_BMP = 0,
- FIF_ICO = 1,
+ FIF_BMP = 0,
+ FIF_ICO = 1,
FIF_JPEG = 2,
- FIF_JNG = 3,
- FIF_KOALA = 4,
- FIF_LBM = 5,
+ FIF_PNG = 3,
+ FIF_GIF = 4,
+ FIF_JNG = 5,
+ FIF_KOALA = 6,
+ FIF_LBM = 7,
FIF_IFF = FIF_LBM,
- FIF_MNG = 6,
- FIF_PBM = 7,
- FIF_PBMRAW = 8,
- FIF_PCD = 9,
- FIF_PCX = 10,
- FIF_PGM = 11,
- FIF_PGMRAW = 12,
- FIF_PNG = 13,
- FIF_PPM = 14,
- FIF_PPMRAW = 15,
- FIF_RAS = 16,
- FIF_TARGA = 17,
- FIF_TIFF = 18,
- FIF_WBMP = 19,
- FIF_PSD = 20,
- FIF_CUT = 21,
- FIF_XBM = 22,
- FIF_XPM = 23,
- FIF_DDS = 24,
- FIF_GIF = 25,
- FIF_HDR = 26,
- FIF_FAXG3 = 27,
- FIF_SGI = 28,
- FIF_EXR = 29,
- FIF_J2K = 30,
- FIF_JP2 = 31,
- FIF_PFM = 32,
+ FIF_MNG = 8,
+ FIF_PBM = 9,
+ FIF_PBMRAW = 10,
+ FIF_PCD = 11,
+ FIF_PCX = 12,
+ FIF_PGM = 13,
+ FIF_PGMRAW = 14,
+ FIF_PPM = 15,
+ FIF_PPMRAW = 16,
+ FIF_RAS = 17,
+ FIF_TARGA = 18,
+ FIF_TIFF = 19,
+ FIF_WBMP = 20,
+ FIF_PSD = 21,
+ FIF_CUT = 22,
+ FIF_XBM = 23,
+ FIF_XPM = 24,
+ FIF_DDS = 25,
+ FIF_HDR = 26,
+ FIF_FAXG3 = 27,
+ FIF_SGI = 28,
+ FIF_EXR = 29,
+ FIF_J2K = 30,
+ FIF_JP2 = 31,
+ FIF_PFM = 32,
FIF_PICT = 33,
- FIF_RAW = 34
+ FIF_RAW = 34
};
/** Image type used in FreeImage.
diff --git a/plugins/AdvaImg/src/FreeImage/Plugin.cpp b/plugins/AdvaImg/src/FreeImage/Plugin.cpp
index 171b4682b8..1bc13412a5 100644
--- a/plugins/AdvaImg/src/FreeImage/Plugin.cpp
+++ b/plugins/AdvaImg/src/FreeImage/Plugin.cpp
@@ -239,6 +239,8 @@ FreeImage_Initialise(BOOL load_local_plugins_only) {
s_plugins->AddNode(InitBMP);
s_plugins->AddNode(InitICO);
s_plugins->AddNode(InitJPEG);
+ s_plugins->AddNode(InitPNG);
+ s_plugins->AddNode(InitGIF);
//s_plugins->AddNode(InitJNG);
//s_plugins->AddNode(InitKOALA);
//s_plugins->AddNode(InitIFF);
@@ -249,7 +251,6 @@ FreeImage_Initialise(BOOL load_local_plugins_only) {
//s_plugins->AddNode(InitPCX);
//s_plugins->AddNode(InitPNM, NULL, "PGM", "Portable Greymap (ASCII)", "pgm", "^P2");
//s_plugins->AddNode(InitPNM, NULL, "PGMRAW", "Portable Greymap (RAW)", "pgm", "^P5");
- s_plugins->AddNode(InitPNG);
//s_plugins->AddNode(InitPNM, NULL, "PPM", "Portable Pixelmap (ASCII)", "ppm", "^P3");
//s_plugins->AddNode(InitPNM, NULL, "PPMRAW", "Portable Pixelmap (RAW)", "ppm", "^P6");
//s_plugins->AddNode(InitRAS);
@@ -261,8 +262,7 @@ FreeImage_Initialise(BOOL load_local_plugins_only) {
//s_plugins->AddNode(InitXBM);
//s_plugins->AddNode(InitXPM);
//s_plugins->AddNode(InitDDS);
- s_plugins->AddNode(InitGIF);
- //s_plugins->AddNode(InitHDR);
+ //s_plugins->AddNode(InitHDR);
//s_plugins->AddNode(InitG3);
//s_plugins->AddNode(InitSGI);
//s_plugins->AddNode(InitEXR);