Windows phone 7 windows phone的图片大小
在我的应用程序中,我有一张图片列表。我想确定单个图像的大小,但没有属性Windows phone 7 windows phone的图片大小,windows-phone-7,windows-phone-8,Windows Phone 7,Windows Phone 8,在我的应用程序中,我有一张图片列表。我想确定单个图像的大小,但没有属性 using (MediaLibrary library = new MediaLibrary()) { CameraRollAlbum = library.RootPictureAlbum.Albums.First((album) => album.Name == "Camera Roll"); List<Picture> pictures
using (MediaLibrary library = new MediaLibrary())
{
CameraRollAlbum = library.RootPictureAlbum.Albums.First((album) => album.Name == "Camera Roll");
List<Picture> pictures = CameraRollAlbum.Pictures.Tolist();
foreach (Picture pic in pictures)
{
pic.size?? pic.length??
}
}
使用(MediaLibrary=new MediaLibrary())
{
CameraRollAlbum=library.RootPictureAlbum.Albums.First((album)=>album.Name==“相机卷”);
List pictures=CameraRollAlbum.pictures.Tolist();
foreach(图片中的图片)
{
图片尺寸??图片长度??
}
}
获取图像流评估大小:
foreach (Picture pic in pictures)
{
var sizeInKb = pic.GetImage().Length / 1024;
}
我知道,我需要图像大小。可以从高度和宽度计算吗?