Internet explorer fails to display local image - file

I've created a bitmap image in C# and want to display this on a webpage on the local machine (so I can print it easily). The problem is, the Internet Explorer 9 does not display the image, it shows the "broken image" icon instead. Firefox has no problems with the image. I'm using Win7, 64 bit.
In order to narrow down the problem, I tried to just drag (from the file explorer) and drop the image file onto an empty browser window. Same thing: Firefox shows it, IE9 doesn't.
It gets even more weird: If I upload the file somewhere (see http://www.diebreuerei.de/Barcode.bmp), the IE9 does display it, it only doesn't if the file is stored locally.
Thanks in advance

Thanks for the answers, guys.
#Shannon: Nope, the console showed no errors.
#Michael: The Bitmap was directly created in C#, I dunno how to encode it in UTF-8.
But I got a solution: I just save my bitmap in PNG format and the IE9 is happy to display it. So I kinda lost interest in BMP :)
See ya,
Hannes

Related

Silverlight Images won't show in web

This is a nubie question, I have a silverlight 5 (VB) application that runs fine and displays all 3 png images when I run it from my PC. When the app is put onto the web it doesn't show the png Images. The build I have selected for the png files is Resource? I checked the XAP.zip to see if the png files are there and they are.
I've done a bit of research and found that I may need some coding to enable me to get these up and running on the web unfortunately everything I've looked at is in C. I have found these two pieces of code :
<Imagex:Name="myIamge"Source="../computer.JPG"></Image>
myIamge.Source = new BitmapImage(new Uri("../Image/computer.JPG", UriKind.Relative));
Are these two pieces of code what I need?
Do I need them both together?
Does anyone know the conversion Of the second piece of code from c to vb
Is there anyone out there that can tell me how to do this in silverlight VB
Regards
Will
Are these two pieces of code what I need?
Probably, hard to say because you did not explain us where you put physically your 'computer.JPG'
Do I need them both together?
No, if you display this image only once, and never change it after, you do no need the code behind. Just use your xaml declaration.
So, what you have done seems pretty correct: your image should be declared as ressource, and you use the path to specify where the image is, compare to the XAML file using your image.
Thus, for instance if the declaration is in the MainPage.xaml (to the root of your project), and your image in an Image folder, this declaration is correct.
<Image x:Name="myImage" Source="Image/computer.jpg"/>
If despite this, you cannot see your image, I will recommand you to check the website where you deploy your xap file, maybe there is an error explaining why the image can not show up (MIME type, .net version?...)

What's different about Screensaver preview in Windows 8?

I'm working on a simple WPF-based screensaver and can't get the thumbnail preview to work.
When you open the display control panel and go to configure the screensaver, the selected screensaver is supposed to display a thumbnail preview within the dialog:
I've found several good examples online of how to do this, including:
Writing a screen saver in WPF
WPF Screensaver (Codeplex)
CC Hearts Screen Saver
Following these examples, I couldn't get anything to work - the preview thumbnail turns black, but nothing else appears. Downloading each of these (and a few others) and running them had the same result - a blank preview thumbnail. I've done this before on Windows 7 and it wasn't hard, so I was a bit frustrated.
Copying the binaries across to a Windows XP machine, I found that each of them showed a preview thumbnail successfully.
So, there's something that's changed between Windows 7 and Windows 8.
What do I need to do differently to enable my WPF screensaver to properly display a thumbnail preview on Windows 8?
I've found the most common problems with moving code from Win 8 to Xp is permission and dependencies. Check that the files are not needing some weird permissions (not sure what permission the preview runs with) and that all dependencies are honoured (also their permissions).
If I remember right, all windows screen savers are just renamed exe files with command line arguments. Maybe try rename it and run it directly?
Check what version of the framework you are using and try to use the client profile if possible
Also Try this small workaround if helps:
In Windows Explorer Go to > Options > Change folder and search
options then click on the View tab and uncheck the box that
says Always show icons, never thumbnails.
I hope it should work.

Silverlight 5 issue on mac

I'm experiencing problem with the SL 5 runtime for OS X (only tested on lion).
In all text boxes in our SL-app at work, the box get the focus when clicked. BUT, they do not accept any keyevents.
The cursor blinks but no inputs get through. Its possible to paste some text into the boxes, and then I notice that DELETE and BACKSPACE works.. very strange.
This only seems to be an issue on the runtime for mac on CHROME - not in safari and not in any browser on windows.
Can anyone op some light on this issue?
See this thread for more info: http://forums.silverlight.net/t/247149.aspx/1?Silverlight+5+issue+on+Mac
This is a horrible hack but I've found that if you copy text from the clipboard into the text box it works.
its because Microsoft do not fully support some browsers on some OS. have a look at this
http://www.microsoft.com/getsilverlight/get-started/install/default.aspx#sysreq
Regards.

Problem loading icon in WPF App when Windows is set to larger font size

I'm having a peculiar problem in a WPF-app I've written. It has a single window that loads a single user control after some user input which works perfectly fine for almost all users. Two users reported that the app crashed on launch which sent me investigating.
The culprit I found was that they had set the overall font size in Windows to "Extra large" under Display Properties. When I switched it back to "Normal" they could load the app just fine.
Since I can't post images here is a link to the image that shows where to set the font size if anyone wonders: http://content.screencast.com/users/CarloToribio/folders/Jing/media/f6791854-d6ad-4aae-a3f8-42e4140ad1aa/2010-07-26_1235.png
These users are old and have bad sight so they really need the "Extra large" font size to work with Windows so I need to solve this somehow. The icon that is being loaded is a .ico with several sizes from 16x16 up to 256x256.
Does anyone know what could affect this?
The problem seems to be related to the largest size of the icon (256x256) on Windows XP. I simply resaved my icon without the 256x256 image and the problem disappeared.

Animated gif file not working in IE7

I'm learning Ajax from Sams Teach Yourself Ajax,Javascript and Php All in One
and testing an example which diplays the server time OK but does not show a busy gif image.
In fact all I get is the red cross box where the file should be
Windows Picture and Fax Viewer displays the moving gif file OK so what am I doing wrong?
I have no prior knowledge of using gif files
Right click on the red cross box and select Properties. The subsequent window will show you where IE is looking for the file. In all possibility, the location may not be correct. Must be a problem with the way you are using relative paths.
Properties shows "Type not available" (but file name is "anim.gif")
File location is OK

Resources