ImageSamples图像转换封装库

图像里的 Bitmap 和 WPF 的 Image 转换,折腾过的人都知道有多头大。ImageSamples就挺贴心的,封装了一套接口,把 GDI+里的 Bitmap 和 WPF 里的 Image 元素串起来,基本上拎过来就能用,省了不少事。

GDI+的图像能力还是蛮强的,尤其是 Bitmap 类,拿来加载、编辑图像都方便。但 WPF 要用它又得绕一圈——要先转成BitmapSourceImageSamples这项目就帮你把这活儿干了,还挺稳定的,适合不想重复造轮子的你。

灰度这块也比较实用。有时候项目要加个图像滤镜啥的,直接把彩色图转成灰度图就能达到效果。项目里封装好了转换逻辑,用的不就是经典的 RGB 加权算法嘛,轻松搞定。

用法也不难,像BitmapImage加载图、封装后的函数灰度,把结果绑到Image控件上,整个流程清晰、顺手。你甚至能拿去直接集成到自己项目里,改几行路径就完事。

如果你平时用 WPF 多,又想借助 GDI+图像,ImageSamples蛮适合拿来参考。适合做图片预、图像滤镜,或者你就是想把老 GDI 代码嫁接到新 UI 上。

rar
ImageSamples.rar 预估大小:50个文件
folder
ImageSamples 文件夹
folder
ImageSamples 文件夹
folder
bin 文件夹
folder
Debug 文件夹
file
ImageSamples.exe 145KB
file
ImageSamples.pdb 56KB
file
ImageSamples.vshost.exe 11KB
file
StyleCop.Cache 16KB
file
ImageSamples.csproj 5KB
file
ImageSamples.csproj.user 227B
folder
Images 文件夹
file
office2007光盘封面.jpg 83KB
file
猫和老鼠封面.jpg 43KB
file
App.xaml 323B
folder
obj 文件夹
folder
x86 文件夹
folder
Debug 文件夹
file
App.g.i.cs 2KB
file
GeneratedInternalTypeHelper.g.cs 3KB
file
GeneratedInternalTypeHelper.g.i.cs 3KB
file
ImageSamples_MarkupCompile.lref 155B
folder
Pages 文件夹
file
GrayImagePage.g.i.cs 3KB
file
App.g.cs 2KB
file
ImageSamples.exe 145KB
file
ImageSamples_Content.g.i.cs 577B
file
ImageSamples.csproj.GenerateResource.Cache 917B
file
ImageSamples.Properties.Resources.resources 180B
file
DesignTimeResolveAssemblyReferencesInput.cache 6KB
file
ImageSamples.pdb 56KB
file
MainWindow.g.cs 3KB
file
DesignTimeResolveAssemblyReferences.cache 15KB
file
ImageSamples_MarkupCompile.i.lref 88B
folder
TempPE 文件夹
file
Properties.Resources.Designer.cs.dll 5KB
file
ImageSamples_MarkupCompile.i.cache 292B
file
ImageSamples_MarkupCompile.cache 294B
file
ImageSamples.csproj.FileListAbsolute.txt 1KB
file
ImageSamples.g.resources 130KB
file
MainWindow.g.i.cs 3KB
folder
Controls 文件夹
file
GrayImagePage.g.i.cs 5KB
file
GrayImagePage.baml 2KB
file
GrayImagePage.g.cs 5KB
file
MainWindow.baml 1KB
file
App.xaml.cs 308B
file
Settings.StyleCop 1KB
file
MainWindow.xaml 573B
folder
Controls 文件夹
file
GrayImagePage.xaml.cs 4KB
file
GrayImagePage.xaml 2KB
folder
Properties 文件夹
file
Resources.resx 5KB
file
Settings.settings 201B
file
AssemblyInfo.cs 2KB
file
Settings.Designer.cs 1KB
file
Resources.Designer.cs 3KB
file
MainWindow.xaml.cs 759B
folder
Utils 文件夹
file
ImageConvert.cs 4KB
folder
Types 文件夹
file
EnumTypes.cs 762B
file
EnumDescription.cs 8KB
file
ImageSamples.suo 32KB
file
ImageSamples.sln 878B
rar 文件大小:576.16KB