gif image file displays red "x" on IE - asp.net

To start off, I have searched google & SO (Images are showing up as red x's on IE, shows up fine in other browsers), tried out the suggestions, but they did not resolve my issue.
I am trying to create a transparent image by following the code shown at: How do you Draw Transparent Image using System.Drawing?. I am using a 3rd party mapping control "Simplovation"
However, this is what I get when I run my webpage:
How can I get the actual image to appear?
I tried converting to RGB, but no luck.
Based on the code in "How do you Draw Transparent Image using System.Drawing" the actual image should appear like:

There could be a long list of potential problems here, let's address 3 of them:
Permissions
You imply that you are creating this image from code. How are you doing that? If the IIs worker process, running in the user context of the application pool account, is creating this image, does it create/save it to a location that is accesible anonymously? (or whatever your authentication model is)
File locked?
Again, since you are implying your are creating the image from code, to you close the file handle properly?
Path.
You say that the image Url is correct, but are you really 100% sure? Press F12 on IE and use the developer tools to determine if you get any type of HTTP error when IE is trying to request the image.

IE is very specific about the image type and actual image content. In other words, IE cannot display if image type and content doesn't match.
For example, renaming just file extension - bmp to gif - doesn't work in IE, although it is not an issue in other browser.
Easiest way to check is to browse that page in other browser. If you can see image in other browser, you can make sure that image format is not correct.

Related

Wordpress sharify plugin - og:image tag not working?

My test page is: http://iglesiabautistaesperanza.org/?p=107
I have an og:image tag set in the header as you can see by viewing the code. When I open this image using that link, it is the right image (Iglesia Bautista Esperanza on a transparent background). However, whenever I try to use the SHARE button it pulls in some other random logo file which has the name twice on an orange background. The Facebook debugger shows the same incorrect image, although it also shows the og:image tag as being the only tag and with the correct link.
I'm baffled. Any help is appreciated!
https://wordpress.org/plugins/sharify/
Have you tried to use the facebook debugger first?
Take in consideration everytime you update the og:image on your side you won't see the changes directly on the facebook share unless you run through the debugger, which in that case will clean its cache for you and pull the latest data.
The logo I can see it is pulling is the correct one, however you are trying to link a .gif image with a transparent background. My guess here is that facebook tries to convert the logo into a .png, going through the convert process it picks up the orange from the second line and it applies that to the background making the second line invisible to you.
I would suggest to upload a PNG logo maybe with a white solid background and try again through the facebook debugger first.

Images appear like they are CMYK when uploaded to web. However, they are RGB

I have worked with images/Photoshop for a long time and have never had this problem. Basically, I tried uploading a few images to WordPress and they appear like this:
As you can see, the one highlighted in green turns out fine. However, the other two for some reason come out looking like they are in CMYK mode. The images are RGB and saved for web so I'm not sure what the problem might be. Can anyone help me make sense of this?
Here is the file for one of the images that come out wrong (which is strange because it comes out fine here, maybe it's a strictly WordPress issue?):
I think your comment about CMYK is a red herring. Looking at your screen shot, it appears you may have inadvertently selected the images in the window; your browser has highlighted them to show this, which gives them a slight blue overlay. Try simply reloading the page and opening that window again and see if the issue goes away.
Ive had strange things happen from images that appeared ok in windows photo viewer but when loaded into adobe fireworks the colours go wrong in a similar way.
Im assuming that the pictures display incorrectly on the 'front end' of Wordpress too, therefore i think its some weird .jpg format issue.
If you have just a few images maybe worth manually screen grab and edit screen grab if you have a viewer that works, then save out and try to re-upload to wordpress.
Or batch process the files into a different format, say bump and use a wordpress plugin like insanity that has the option to automatically convert to .jpg, to in effect clean or at least change the image format on upload.
I had the same issue- If you delete the image from wordpress, change the size of the image file to something closer to the size of the page width, that might work. It worked for me. I can't explain why that happens, but it does!

ASP.NET image not loading, using imageHandler

I ran into a very annoying, and strange problem with loading pictures, using a custom handler (we need to mask the pictures runtime).
The Website, where you can check it out: http://utazovilag.hu/Test/Stack/Main.aspx
The basics: As I stated above, I use a custom image handler for loading and modifiding images at runtime. This site offer different travels, each changed frequently (changing the price, mostly). Each hotel have an own set of pictures, where we put an "advertisement" bar on it (a semi-transparent black rectangle, with some text). This handler load the image (some from the local server, some from another URL source), and draw the needed text and pictures on it, then give back the picture itself on the Response stream.
The error: The above should work well, but strangely, the pictures itself sometimes simply dont load at all. (if you check the site on the above link, you can see it for yourself - there should be six pictures, inside a rouded bluish border). When I refresh the page, pictures appear and disappear, without any (for me) logical pattern.
I narrowed down the problem as best as I could.
The imageHandler itself will give back the exatly same pictures each
time, no matter if it gets any URL or not.
The problem is with the ImageBoxes (I think). When I give the "plain"
url (one without any parameter, even when the handler dont even check
if there any parameter)
When I add the URL for the imageBoxes (this
one:http://utazovilag.hu/Test/GetTestImage.ashx) this will give the
perfectly good image back, and each imagebox will load without any
error.
When I add the URL with SAME parameters, its work like as it should
(like: http://utazovilag.hu/Test/GetTestImage.ashx?OID=0&PID=0&SID=0)
it works as it should.
(And now, the error) when I add an URL with different parameters, its make the pictures randomly pop up and dissapear between each refresh (this what you can see on the link I gave you above) Like this: http://utazovilag.hu/Test/GetTestImage.ashx?OID=0&PID=0&SID=0 And this: http://utazovilag.hu/Test/GetTestImage.ashx?OID=1&PID=0&SID=0
But when I hit the "Refresh Image" button, the image appear as it should. When I try to acces directly the GetTestImage.ashx, it appear as it should. The load problem only appear when there is more picture boxes, with different URLs.
I simply ran out from ideas, and cant imagine why is this happening. I tried to create the most basic imageHandler (it simply load the image, create byte array, and push that to a stream toward the user). I tried different browsers, (Firefox, IE, Chrome) - all of them give the same error (or, no error, as simply the picture not showing up).
Any ideas would be really-really appreciated.
Edit: Here is my imageHandler: http://pastebin.com/FjjUmNzW
Edit1: I forgot to mention it: it runs fine on my local machine, this error appear when I try to run it on the server.
Edit2: Updated the handler code as well, I showed where I put the log-asking.
Set the IsReusable property to true to handle multiple images. There is no MSDN documentation for this the last time I looked. But this is what I use for displaying say, a list of product images.
public bool IsReusable
{
get
{
return true;
}
}
Apparently, this keeps the handler in memory and able to handle multiple requests. When set to false, it had to create a new instance of the handler for each incoming request.

How to display full URL in address tab of Dreamweaver CS5?

In the address bar of the browser navigation tab, it shows the absolute path of the file, but it is so long that it gets truncated and I can't read the exact file that I'm working on! Is there any way to fix this?
Yeah, I got it... just hover your mouse over the truncated field for a couple seconds and a tooltip will pop up with the full address. I was just frantically clicking on it like an impatient moron and it was canceling the scheduled tooltip display.
I'm not sure what a "browser navigation tab" is. In Dreamweaver CS5 on Windows, the full url is displayed in the title bar of the document. When documents are maximized a tab will display the file name, and the full file url will display in the title bar on the right hand side. This full url gets truncated when there are too many documents open. The truncation is done from the left so you may lose some of the folders, but you should still see the file name. If this is the case, then a quick solution is to close some documents. Or Perhaps don't nest your files so deeply, or don't have really long file/folder names.
Another option is an extension that I wrote a while ago called Document Path Toolbar: http://communitymx.com/abstract.cfm?cid=A01CEAEA3CA40B36 The extension adds a toolbar that has a text field that displays the full url to the local file. It has an option that allows you to updated the width of the text field if you have longer file paths (I think that such modifications requires a restart of Dreamweaver). It is commercial but not much. As I no longer contribute to CommunityMX, I won't receive anything for a purchase should you decide it is something that you could benefit from.

Download Image From Site

This site is claiming to prevent the download of images and preventing screenshots. Is this truly possible to stop and can anyone crack it in their demos? What tools can be used to download an image set as a background?
http://www.iptlock.com/how.php
It isn't possible, no.
If the client can see it on their screen, then it exists on their computer. Even if that weren't the case, there is always the whole analog thing (people can literally take a picture of their screen).
If you have chrome: Just go to one of their demos, press ctrl+shift+c, and an inspector will show up, showing you all individual parts of the page. Then select the image from the list (servedemoimg) , right mouse click on it, and you can save the jpg. It is not possible to prevent people from downloading those files. And this company doesn't even make it particularly difficult.
Their scheme "works" by hiding the content whenever a key is pressed or the main window loses focus. They also attempt to detect that something has been copied to the clipboard and they replace it with some text ("It is prohibited to copy distribute or in any way alter these copyrighted images").
That means that if you press any key to copy the content, you'll just get the "locked" graphic. The same goes for switching to another app (like a screen capture app) because the screen capture app will have focus instead of the browser, causing the lock graphic to show. If you do manage to copy something to the clipboard, it immediately replaces the content with the text I mentined above.
Furthermore, their content is a background image so you can't easily print or right-click to copy the image by disabling JS.
However, it's pretty trivial to defeat. My first attempt using IE8 was trivial. When I went to the "protected" page, IE asked me if I wanted to allow the page to access the clipboard, and I clicked "Don't Allow". Then I pressed PrntScr and was able to paste the content into another program. This worked because that particular key isn't captured by the browser and I didn't allow the page to see my clipboard.
Then I tried again, this time allowing clipboard access. This time I used a screen capture program that automatically captures the foreground window after a set time delay. This worked because I was able to give the browser window focus, and the screen capture utility just saved the image as a file instead of putting it on the clipboard.
Lastly, I just saved the source as a file and saw background:url(servedemoimg.php?filename=IPTbusiness_graphicdesign_ITB). Just putting http://www.iptlock.com/servedemoimg.php?filename=IPTbusiness_lawyer_ITB into my browser's address bar made the complete "protected" content show up for me to download, print, email, etc.

Resources