I have two version of the same picture, 300x400 px, 72 p/i, but one is gray-scale and the other 24-bit color. I have identical code in a web test page and the color picture is shown and the other comes up as the little square with a red 'x' in it. I created the gray-scale picture from the color picture. What could possibly be the problem here, some hidden metadata or has the pic become corrupted in some way?
Difference between versions of the same picture
Page 1 of 17 Replies - 462 Views - Last Post: 25 January 2012 - 11:55 AM
Replies To: Difference between versions of the same picture
#2
Re: Difference between versions of the same picture
Posted 25 January 2012 - 06:07 AM
I assume you've double and triple checked the URL in the web page vs the actual name of the picture?
If this is a webpage, try copying the URL of the image your browser is trying to show and navigate there directly. If you get a 404 error your browser can't find the image. Otherwise you should get some sort an error, or possibly a download dialog.
If this is a webpage, try copying the URL of the image your browser is trying to show and navigate there directly. If you get a 404 error your browser can't find the image. Otherwise you should get some sort an error, or possibly a download dialog.
#3
Re: Difference between versions of the same picture
Posted 25 January 2012 - 07:53 AM
I'm going to move this to web development. You may get more help in there.
#4
Re: Difference between versions of the same picture
Posted 25 January 2012 - 08:06 AM
Atli, on 25 January 2012 - 01:07 PM, said:
I assume you've double and triple checked the URL in the web page vs the actual name of the picture?
If this is a webpage, try copying the URL of the image your browser is trying to show and navigate there directly. If you get a 404 error your browser can't find the image. Otherwise you should get some sort an error, or possibly a download dialog.
If this is a webpage, try copying the URL of the image your browser is trying to show and navigate there directly. If you get a 404 error your browser can't find the image. Otherwise you should get some sort an error, or possibly a download dialog.
Yes, I've checked. This is the code:
<h1>Test page</h1> <div> <img src="/pics/voo/hasse.jpg" alt="hasse" /> <img src="/pics/voo/h.jpg" alt="h" /> </div>
The file hasse.jpg is shown and h.jpg is not. When I run directly in the browser like this:
C:\inetpub\wwwroot\pics\voo\hasse.jpg
C:\inetpub\wwwroot\pics\voo\h.jpg
both are displayed correctly. It must have something to do with the file itself but I can't figure out what.
#5
Re: Difference between versions of the same picture
Posted 25 January 2012 - 08:29 AM
Are you also viewing the HTML file using a local file-system location, or are you using a localhost URL?
If you are loading this via a local-file system URL then the root of the URL would be the root of the hard-drive ("C:\") rather than the web-root a HTTP server would use ("C:\inetpub\wwwroot\"). - The URL "/pics/voo/v.jpg" would refer to "C:\pics\voo\v.jpg" rather than "C:\inetpub\wwwroot\pics\voo\h.jpg".
That should affect both images though. What happens if you request the images through the HTTP server? Something like: http://localhost/pics/voo/h.jpg.
If you are loading this via a local-file system URL then the root of the URL would be the root of the hard-drive ("C:\") rather than the web-root a HTTP server would use ("C:\inetpub\wwwroot\"). - The URL "/pics/voo/v.jpg" would refer to "C:\pics\voo\v.jpg" rather than "C:\inetpub\wwwroot\pics\voo\h.jpg".
That should affect both images though. What happens if you request the images through the HTTP server? Something like: http://localhost/pics/voo/h.jpg.
#6
Re: Difference between versions of the same picture
Posted 25 January 2012 - 08:35 AM
Atli, on 25 January 2012 - 03:29 PM, said:
Are you also viewing the HTML file using a local file-system location, or are you using a localhost URL?
If you are loading this via a local-file system URL then the root of the URL would be the root of the hard-drive ("C:\") rather than the web-root a HTTP server would use ("C:\inetpub\wwwroot\"). - The URL "/pics/voo/v.jpg" would refer to "C:\pics\voo\v.jpg" rather than "C:\inetpub\wwwroot\pics\voo\h.jpg".
That should affect both images though. What happens if you request the images through the HTTP server? Something like: http://localhost/pics/voo/h.jpg.
If you are loading this via a local-file system URL then the root of the URL would be the root of the hard-drive ("C:\") rather than the web-root a HTTP server would use ("C:\inetpub\wwwroot\"). - The URL "/pics/voo/v.jpg" would refer to "C:\pics\voo\v.jpg" rather than "C:\inetpub\wwwroot\pics\voo\h.jpg".
That should affect both images though. What happens if you request the images through the HTTP server? Something like: http://localhost/pics/voo/h.jpg.
I get the reply 'You are not authorized to view this page'.
I still think there is something peculiar with one of the files. Is there a piece of S/W you can use to extract all the info there is about a certain file?
#7
Re: Difference between versions of the same picture
Posted 25 January 2012 - 08:56 AM
If you can open the picture in the browser using a local path then the browser should be able to open in as a part of a website. Why do you think the picture itself is peculiar? - You could just open it in Photoshop or GIMP and export it again as a new image. That should take care of any such issues.
I don't know any software to examine images like that. Maybe something like Photoshop or GIMP can show you the image meta-data, or something like Google's Picasa. I've never attempted this though.
Try to give Everybody access to read all three files, then try it again. I'm not sure exactly how IIS handles permissions but if it's reading them from the file-system then that should take care of it.
I don't know any software to examine images like that. Maybe something like Photoshop or GIMP can show you the image meta-data, or something like Google's Picasa. I've never attempted this though.
Quote
I get the reply 'You are not authorized to view this page'.
Try to give Everybody access to read all three files, then try it again. I'm not sure exactly how IIS handles permissions but if it's reading them from the file-system then that should take care of it.
This post has been edited by Atli: 25 January 2012 - 08:57 AM
#8
Re: Difference between versions of the same picture
Posted 25 January 2012 - 11:55 AM
Atli, on 25 January 2012 - 03:56 PM, said:
...
Try to give Everybody access to read all three files, then try it again. I'm not sure exactly how IIS handles permissions but if it's reading them from the file-system then that should take care of it.
Try to give Everybody access to read all three files, then try it again. I'm not sure exactly how IIS handles permissions but if it's reading them from the file-system then that should take care of it.
You found it! I checked the two files and only one had permissions for a user to read it so I changed the other file and gave 'Users(<computer name>\Users) read access to it and now it works. I use PaintShop Pro to alter picture files and assumed that the new file inherited the permisssion but obsiously it isn't so.Great help. Thanks!
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote




|