Questions tagged [imagesource]
332 questions
9
votes
4 answers
ImageSource from a relative resource
I'm trying to use a local resource to put an icon inside a Button. (C# Visual Studio 2012)
Directly inside my project i have a folder called "Resources" which contains "Icons/MyIcon.png"
The following code works (but is not using a relative…

00jt
- 2,818
- 3
- 25
- 29
8
votes
1 answer
Dispose StreamResourceInfo.Stream
I use StreamResourceInfo.Stream to get BitmapImages from resources. Is it correct to Close and Dispose the stream after using it?
I ask because in memory profiler, I get an error if I do so. Memory profiler says that a disposed instance has not been…

HCL
- 36,053
- 27
- 163
- 213
7
votes
1 answer
Converting System.Drawing.Image to System.Windows.Media.ImageSource with no result
I would like to convert Image to ImageSource in my WPF app. I use Code128 library which works properly (already checked in WinForms app). Function below returns ImageSource with properly size, but nothing is visible.
private ImageSource…

Julian Kowalczuk
- 145
- 1
- 2
- 10
6
votes
4 answers
how to show image not found in Asp.net MVC
I have a asp.net mvc project. in a speicific views i call the four image from different different folder inside my proect.
sometime image can not be found. i want to set a image for every folder because all 4 folder contain different diffent size of…
user605334
6
votes
1 answer
How to convert a ViewBox to an ImageSource?
I'm using a Viewbox to create a set of icons that I will dynamically bind to a WPF view.
I'm binding to the resource name and using a Converter to convert the resource name to an ImageSource.
I know how to do it if the resource is a Path, but how to…

Rafael Romão
- 1,788
- 3
- 20
- 35
6
votes
1 answer
Setting an image.Source from a resource file
private void SetCredentials()
{
username = txtfromEmail.Text;
password = txtpassword.Text;
pictureLogin.Source = @"C:\Users\Sergio\Documents\Visual Studio 2008\Projects\emailwpf\emailwpf\ok.png";
}
I get an error: "Cannot convert…

Sergio Tapia
- 40,006
- 76
- 183
- 254
6
votes
0 answers
Get default jumbo system icon based on file extension
Solved! See EDIT 2 for working code.
Based on the code from this site and the comments done by freundblase in the same site, I have the following class to get jumbo default icons based on file extension:
// Original bad code removed
I'm trying to…
user1537004
6
votes
2 answers
Displaying a GIF in Silverlight
I have a number of gifs in a folder on my web server /dir/subdir/bla.gif etc.
On that same server is a Silverlight 3 application /ClientBin/bla.xap.
Is there any way to display the gifs in the Silverlight app?
I've tried and…

Saqib
- 7,242
- 7
- 41
- 55
6
votes
5 answers
How do I get link to an image on wikipedia from the infobox?
I'm parsing wikipedia infoboxes and I noticed that some infoboxes have image fields - these fields hold names of image files stashed on wikipedia somewhere. However they just contain the name of the file as is as opposed to the actual link.
I…

Ali
- 7,353
- 20
- 103
- 161
6
votes
3 answers
Google Maps API version 3 causing images to be blurry / fuzzy
For some reason on Safari 5.1.5 Google Maps is blurring some of my images. Take http://catpr.com/craig-chapman/ for example - when it loads the chandelier renders crisply for a moment, and then blurs out.
Removing