Source code of file oscpmwin_v0.4.1.816/freeimage.pas from the
osCommerce Product Manager for Windows.


0000:   {%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001:   osCommerce Product Manager for Windows (oscpmwin).
0002:   0003:   
0004:   You can contact Mario A. Valdez-Ramirez
0005:   by email at mario@mariovaldez.org or paper mail at
0006:   Olmos 809, San Nicolas, NL. 66495, Mexico.
0007:   
0008:   This program is free software; you can redistribute it and/or modify
0009:   it under the terms of the GNU General Public License as published by
0010:   the Free Software Foundation; either version 2 of the License, or (at
0011:   your option) any later version.
0012:   
0013:   This program is distributed in the hope that it will be useful, but
0014:   WITHOUT ANY WARRANTY; without even the implied warranty of
0015:   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0016:   General Public License for more details.
0017:   
0018:   You should have received a copy of the GNU General Public License
0019:   along with this program; if not, write to the Free Software
0020:   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0021:   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
0022:   UNIT FreeImage;
0023:   
0024:   INTERFACE
0025:   
0026:   USES Windows;
0027:   
0028:   
0029:   {FREEIMAGE 3 http://freeimage.sourceforge.net/}
0030:   
0031:   
0032:   {$Z4}
0033:   
0034:   CONST
0035:     JPEG_DEFAULT = 0;
0036:     JPEG_FAST = 1;
0037:     JPEG_ACCURATE = 2;
0038:     JPEG_QUALITYSUPERB = $80;
0039:     JPEG_QUALITYGOOD = $100;
0040:     JPEG_QUALITYNORMAL = $200;
0041:     JPEG_QUALITYAVERAGE = $400;
0042:     JPEG_QUALITYBAD = $800;
0043:   
0044:   
0045:   TYPE
0046:     FIBITMAPDATA = RECORD
0047:                      data : POINTER;
0048:                    END;
0049:     FIBITMAP = ^FIBITMAPDATA;
0050:   
0051:     FITAGDATA = RECORD
0052:       data: POINTER;
0053:     END;
0054:     FITAG = ^FITAGDATA;
0055:   
0056:     FREE_IMAGE_FORMAT = (FIF_UNKNOWN = -1, FIF_BMP = 0, FIF_JPEG = 2, FIF_PCX = 10, FIF_PNG = 13,
0057:                          FIF_TARGA = 17, FIF_TIFF = 18, FIF_WBMP = 19, FIF_PSD = 20, FIF_XBM = 22,
0058:                          FIF_XPM = 23, FIF_GIF = 25);
0059:   
0060:     FREE_IMAGE_QUANTIZE = (FIQ_WUQUANT = 0, FIQ_NNQUANT = 1);
0061:   
0062:     FREE_IMAGE_FILTER = (FILTER_BOX  = 0, FILTER_BICUBIC = 1, FILTER_BILINEAR = 2,
0063:                          FILTER_BSPLINE = 3, FILTER_CATMULLROM = 4, FILTER_LANCZOS3 = 5);
0064:   
0065:     FREE_IMAGE_MDTYPE = (FIDT_NOTYPE = 0, FIDT_BYTE = 1, FIDT_ASCII = 2, FIDT_SHORT = 3, FIDT_LONG = 4,
0066:                          FIDT_RATIONAL = 5, FIDT_SBYTE = 6, FIDT_UNDEFINED = 7, FIDT_SSHORT = 8,
0067:                          FIDT_SLONG = 9, FIDT_SRATIONAL = 10, FIDT_FLOAT = 11, FIDT_DOUBLE = 12, FIDT_IFD = 13);
0068:   
0069:     FREE_IMAGE_MDMODEL = (FIMD_NODATA = -1, FIMD_COMMENTS = 0, FIMD_EXIF_MAIN = 1, FIMD_EXIF_EXIF = 2,
0070:                           FIMD_EXIF_GPS = 3, FIMD_EXIF_MAKERNOTE = 4, FIMD_EXIF_INTEROP = 5, FIMD_IPTC = 6,
0071:                           FIMD_XMP = 7, FIMD_GEOTIFF = 8, FIMD_CUSTOM = 9);
0072:   
0073:     FREE_IMAGE_COLOR_CHANNEL = (FICC_RGB = 0, FICC_RED = 1, FICC_GREEN = 2, FICC_BLUE = 3, FICC_ALPHA = 4,
0074:                                 FICC_BLACK = 5, FICC_REAL = 6, FICC_IMAG = 7, FICC_MAG = 8, FICC_PHASE = 9);
0075:   
0076:   
0077:   
0078:   FUNCTION FreeImage_Allocate (width, height, bpp : LONGINT; red_mask : CARDINAL = 0; green_mask : CARDINAL = 0; blue_mask : CARDINAL = 0) : FIBITMAP;
0079:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_Allocate@24';
0080:   
0081:   PROCEDURE FreeImage_Unload (dib : FIBITMAP);
0082:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_Unload@4';
0083:   
0084:   FUNCTION FreeImage_Load (fif : FREE_IMAGE_FORMAT; filename : PCHAR; flags : LONGINT = 0) : FIBITMAP;
0085:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_Load@12';
0086:   
0087:   FUNCTION FreeImage_Save (fif : FREE_IMAGE_FORMAT; dib : FIBITMAP; filename : PCHAR; flags : LONGINT = 0) : BOOLEAN;
0088:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_Save@16';
0089:   
0090:   FUNCTION FreeImage_GetFileType (filename : PCHAR; size : LONGINT) : FREE_IMAGE_FORMAT;
0091:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_GetFileType@8';
0092:   
0093:   PROCEDURE FreeImage_SetPixelColor (dib : FIBITMAP; x, y : LONGINT; value : PRGBQUAD);
0094:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_SetPixelColor@16';
0095:   
0096:   FUNCTION FreeImage_GetWidth (dib : FIBITMAP) : CARDINAL;
0097:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_GetWidth@4';
0098:   
0099:   FUNCTION FreeImage_GetHeight (dib : FIBITMAP) : CARDINAL;
0100:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_GetHeight@4';
0101:   
0102:   FUNCTION FreeImage_GetBPP (dib : FIBITMAP) : CARDINAL;
0103:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_GetBPP@4';
0104:   
0105:   PROCEDURE FreeImage_SetBackgroundColor (dib : FIBITMAP; value : PRGBQUAD);
0106:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_SetBackgroundColor@8';
0107:   
0108:   FUNCTION FreeImage_ConvertToGreyscale (dib : FIBITMAP) : FIBITMAP;
0109:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_ConvertToGreyscale@4';
0110:   
0111:   FUNCTION FreeImage_ConvertTo8Bits (dib : FIBITMAP) : FIBITMAP;
0112:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_ConvertTo8Bits@4';
0113:   
0114:   FUNCTION FreeImage_ConvertTo24Bits (dib : FIBITMAP) : FIBITMAP;
0115:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_ConvertTo24Bits@4';
0116:   
0117:   FUNCTION FreeImage_ConvertTo32Bits (dib : FIBITMAP) : FIBITMAP;
0118:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_ConvertTo32Bits@4';
0119:   
0120:   FUNCTION FreeImage_ColorQuantize (dib : FIBITMAP; quantize : FREE_IMAGE_QUANTIZE) : FIBITMAP;
0121:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_ColorQuantize@8';
0122:   
0123:   FUNCTION FreeImage_Rescale (dib : FIBITMAP; dst_width, dst_height : LONGINT; filter : FREE_IMAGE_FILTER) : FIBITMAP;
0124:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_Rescale@16';
0125:   
0126:   FUNCTION FreeImage_Copy (dib : FIBITMAP; left, top, right, bottom : LONGINT) : FIBITMAP;
0127:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_Copy@20';
0128:   
0129:   FUNCTION FreeImage_Paste (dst, src : FIBITMAP; left, top, alpha : LONGINT) : BOOLEAN;
0130:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_Paste@20';
0131:   
0132:   FUNCTION FreeImage_CreateTag : FITAG;
0133:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_CreateTag@0';
0134:   
0135:   procedure FreeImage_DeleteTag (tag : FITAG);
0136:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_DeleteTag@4';
0137:   
0138:   FUNCTION FreeImage_SetTagKey (tag : FITAG; CONST key: PCHAR) : BOOLEAN;
0139:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_SetTagKey@8';
0140:   
0141:   FUNCTION FreeImage_GetTagKey (tag : FITAG) : PCHAR;
0142:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_GetTagKey@4';
0143:   
0144:   FUNCTION FreeImage_SetTagLength (tag : FITAG; length : DWORD) : BOOLEAN;
0145:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_SetTagLength@8';
0146:   
0147:   FUNCTION FreeImage_SetTagCount (tag : FITAG; count : DWORD) : BOOLEAN;
0148:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_SetTagCount@8';
0149:   
0150:   FUNCTION FreeImage_SetTagType (tag : FITAG; atype : FREE_IMAGE_MDTYPE) : BOOLEAN;
0151:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_SetTagType@8';
0152:   
0153:   FUNCTION FreeImage_SetTagValue (tag : FITAG; CONST value : Pointer) : BOOLEAN;
0154:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_SetTagValue@8';
0155:   
0156:   FUNCTION FreeImage_SetMetadata (model : FREE_IMAGE_MDMODEL; dib : FIBITMAP; CONST key : PCHAR; tag : FITAG) : BOOLEAN;
0157:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_SetMetadata@16';
0158:   
0159:   FUNCTION FreeImage_GetChannel (dib : FIBITMAP; channel : FREE_IMAGE_COLOR_CHANNEL) : FIBITMAP;
0160:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_GetChannel@8';
0161:   
0162:   FUNCTION FreeImage_SetChannel (dib, dib8 : FIBITMAP; channel : FREE_IMAGE_COLOR_CHANNEL) : FIBITMAP;
0163:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_SetChannel@12';
0164:   
0165:   FUNCTION FreeImage_Invert (dib : FIBITMAP) : BOOLEAN;
0166:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_Invert@4';
0167:   
0168:   FUNCTION FreeImage_Composite (fg : FIBITMAP; useFileBkg : BOOLEAN = FALSE; appBkColor : PRGBQUAD = NIL; bg : FIBITMAP = NIL) : FIBITMAP;
0169:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_Composite@16';
0170:   
0171:   FUNCTION FreeImage_AdjustBrightness (dib : FIBITMAP; percentage: DOUBLE): BOOLEAN;
0172:   STDCALL; EXTERNAL 'FreeImage.dll' name '_FreeImage_AdjustBrightness@12';
0173:   
0174:   
0175:   
0176:   
0177:   {$Z1}
0178:   
0179:   IMPLEMENTATION
0180:   
0181:   END.
0182:   
0183:   
 
 
NA fum/lmd: 2007.07.15
Copyright ©1994-2017 by Mario A. Valdez-Ramírez.
no siga este enlace / do not follow this link