|
I have created bitmapImage using URI, is this creating a problem for me ? – dinesh Jan 19 '11 at 11:55 | |||
|
I didn't see why it should no; unless you're not waiting until the image has actually downloaded before you try and get the byte[] from it. –
Derek Lakin
Jan 19 '11 at 11:57
| |||
|
Now I got the solution, the problem is unable to create WritableBitmap object because, BitmapImage object is created using URI which is relative. so It does not get the real Image. so I had changed the code : Insted of this WriteableBitmap wBitmap = new WriteableBitmap(bitmapImage); We have to do the following... Image image = new Image(); image.SetSource(bitmapImage) ;WriteableBitmap wBitmap = new WriteableBitmap(image,null); Now I can able to create the WritableBitmap object –
dinesh
Jan 19 '11 at 13:39
| ||
|
@dinesh I have the same issue invalid pointer .But i failed to solve the issue? i created the bitmap using uri ie "objBitmapImage.UriSource = (new Uri(e.OriginalFileName));" and i get null pointer exception during writing the image to stream arrray " System.Windows.Media.Imaging.Extensions.SaveJpeg(new WriteableBitmap(bm_Image), ms_Image, 320, 320, 0, 100);//here i get the null pointer exception I tried your code but i cant find Image.SetSource(bitmapImage),instead of it image.source is there.Can u please help me–
Sujiz
Oct 19 '11 at 9:22
|
za
最新推荐文章于 2024-12-09 19:44:44 发布
1072

被折叠的 条评论
为什么被折叠?



