⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 freeimage.cs

📁 最棒的三大计算机视觉、图像图形函数库之一
💻 CS
📖 第 1 页 / 共 2 页
字号:
		public static extern FIF GetFIFFromFormat(string format);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetFIFFromMime")]
		public static extern FIF GetFIFFromMime(string mime);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetFormatFromFIF")]
		public static extern string GetFormatFromFIF(FIF format);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetFIFExtensionList")]
		public static extern string GetFIFExtensionList(FIF format);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetFIFDescription")]
		public static extern string GetFIFDescription(FIF format);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetFIFRegExpr")]
		public static extern string GetFIFRegExpr(FIF format);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetFIFFromFilename")]
		public static extern FIF GetFIFFromFilename(string filename);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_FIFSupportsReading")]
		public static extern bool FIFSupportsReading(FIF format);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_FIFSupportsWriting")]
		public static extern bool FIFSupportsWriting(FIF format);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_FIFSupportsExportBPP")]
		public static extern bool FIFSupportsExportBPP(FIF format, int bpp);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_FIFSupportsExportType")]
		public static extern bool FIFSupportsExportType(FIF format, FIT ftype);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_FIFSupportsICCProfiles")]
		public static extern bool FIFSupportsICCProfiles(FIF format, FIT ftype);



		// Multipage interface ----------------------------------------
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_OpenMultiBitmap")]
		public static extern FIMULTIBITMAP OpenMultiBitmap(
			FIF format, string filename, bool createNew, bool readOnly, bool keepCacheInMemory);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_CloseMultiBitmap")]
		public static extern long CloseMultiBitmap(FIMULTIBITMAP bitmap, int flags);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetPageCount")]
		public static extern int GetPageCount(FIMULTIBITMAP bitmap);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_AppendPage")]
		public static extern void AppendPage(FIMULTIBITMAP bitmap, FIBITMAP data);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_InsertPage")]
		public static extern void InsertPage(FIMULTIBITMAP bitmap, int page, FIBITMAP data);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_DeletePage")]
		public static extern void DeletePage(FIMULTIBITMAP bitmap, int page);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_LockPage")]
		public static extern FIBITMAP LockPage(FIMULTIBITMAP bitmap, int page);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_UnlockPage")]
		public static extern void UnlockPage(FIMULTIBITMAP bitmap, int page, bool changed);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_MovePage")]
		public static extern bool MovePage(FIMULTIBITMAP bitmap, int target, int source);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetLockedPageNumbers")]
		public static extern bool GetLockedPageNumbers(FIMULTIBITMAP bitmap, IntPtr pages, IntPtr count);
		
		
		
		// File type request routines ---------------------------------
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetFileType")]
		public static extern FIF GetFileType(string filename, int size);

		// missing FIF FreeImage_GetFileTypeFromHandle(FreeImageIO *io,
		// 			fi_handle handle, int size);

		// Image type request routines --------------------------------
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetImageType")]
		public static extern FIT GetImageType(FIBITMAP dib);

		
		
		// Info functions ---------------------------------------------
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_IsLittleEndian")]
		public static extern bool IsLittleEndian();
		
		
		
		// Pixel access functions -------------------------------------
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetBits")]
		public static extern IntPtr GetBits(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetScanLine")]
		public static extern IntPtr GetScanLine(FIBITMAP dib, int scanline);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetPixelIndex")]
		public static extern bool GetPixelIndex(FIBITMAP dib, uint x, uint y, byte value);
		
		
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetColorsUsed")]
		public static extern uint GetColorsUsed(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetBPP")]
		public static extern uint GetBPP(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetWidth")]
		public static extern uint GetWidth(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetHeight")]
		public static extern uint GetHeight(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetLine")]
		public static extern uint GetLine(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetPitch")]
		public static extern uint GetPitch(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetDIBSize")]
		public static extern uint GetDIBSize(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetPalette")]
		[return: MarshalAs(UnmanagedType.LPStruct)]
		public static extern RGBQUAD GetPalette(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetDotsPerMeter")]
		public static extern uint GetDotsPerMeterX(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetDotsPerMeterY")]
		public static extern uint GetDotsPerMeterY(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetInfoHeader")]
		[return: MarshalAs(UnmanagedType.LPStruct)]
		public static extern BITMAPINFOHEADER GetInfoHeader(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetInfo")]
		[return: MarshalAs(UnmanagedType.LPStruct)]
		public static extern BITMAPINFO GetInfo(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetColorType")]
		public static extern int GetColorType(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetRedMask")]
		public static extern uint GetRedMask(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetGreenMask")]
		public static extern uint GetGreenMask(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetBlueMask")]
		public static extern uint GetBlueMask(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetTransparencyCount")]
		public static extern uint GetTransparencyCount(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetTransparencyTable")]
		public static extern IntPtr GetTransparencyTable(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_SetTransparent")]
		public static extern void SetTransparent(FIBITMAP dib, bool enabled);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_IsTransparent")]
		public static extern bool IsTransparent(FIBITMAP dib);
		
		
		


		[DllImport("FreeImage.dll", EntryPoint="FreeImage_ConvertTo8Bits")]
		public static extern FIBITMAP ConvertTo8Bits(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_ConvertTo16Bits555")]
		public static extern FIBITMAP ConvertTo16Bits555(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_ConvertTo16Bits565")]
		public static extern FIBITMAP ConvertTo16Bits565(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_ConvertTo24Bits")]
		public static extern FIBITMAP ConvertTo24Bits(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_ConvertTo32Bits")]
		public static extern FIBITMAP ConvertTo32Bits(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="ColorQuantize")]
		public static extern FIBITMAP ColorQuantize(FIBITMAP dib, FI_QUANTIZE quantize);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_Threshold")]
		public static extern FIBITMAP Threshold(FIBITMAP dib, uint t);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_Dither")]
		public static extern FIBITMAP Dither(FIBITMAP dib, FI_DITHER algorithm);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_ConvertFromRawBits")]
		public static extern FIBITMAP ConvertFromRawBits(byte[] bits, int width, int height,
			int pitch, uint bpp, uint redMask, uint greenMask, uint blueMask, bool topDown);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_ConvertToRawBits")]
		public static extern void ConvertToRawBits(IntPtr bits, FIBITMAP dib, int pitch,
			uint bpp, uint redMask, uint greenMask, uint blueMask, bool topDown);





		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_RotateClassic")]
		public static extern FIBITMAP RotateClassic(FIBITMAP dib, Double angle);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_RotateEx")]
		public static extern FIBITMAP RotateEx(
			FIBITMAP dib, Double angle, Double xShift, Double yShift, Double xOrigin, Double yOrigin, bool useMask);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_FlipHorizontal")]
		public static extern bool FlipHorizontal(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_FlipVertical")]
		public static extern bool FlipVertical(FIBITMAP dib);
		
		
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_Rescale")]
		public static extern FIBITMAP Rescale(FIBITMAP dib, int dst_width, int dst_height, FI_FILTER filter);
		
		
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_AdjustCurve")]
		public static extern bool AdjustCurve(FIBITMAP dib, byte[] lut, FI_COLOR_CHANNEL channel);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_AdjustGamma")]
		public static extern bool AdjustGamma(FIBITMAP dib, Double gamma);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_AdjustBrightness")]
		public static extern bool AdjustBrightness(FIBITMAP dib, Double percentage);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_AdjustContrast")]
		public static extern bool AdjustContrast(FIBITMAP dib, Double percentage);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_Invert")]
		public static extern bool Invert(FIBITMAP dib);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetHistogram")]
		public static extern bool GetHistogram(FIBITMAP dib, int histo, FI_COLOR_CHANNEL channel);
		


		[DllImport("FreeImage.dll", EntryPoint="FreeImage_GetChannel")]
		public static extern bool GetChannel(FIBITMAP dib, FI_COLOR_CHANNEL channel);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_SetChannel")]
		public static extern bool SetChannel(FIBITMAP dib, FIBITMAP dib8, FI_COLOR_CHANNEL channel);
		
		
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_Copy")]
		public static extern FIBITMAP Copy(FIBITMAP dib, int left, int top, int right, int bottom);
		
		[DllImport("FreeImage.dll", EntryPoint="FreeImage_Paste")]
		public static extern bool Paste(FIBITMAP dst, FIBITMAP src, int left, int top, int alpha);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -