Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 09:54 AM
Guest
 
Posts: n/a
Default Some of JPG files refuse to show up in the ASP page

Although this question does not belong in here, I hope someone help, as I do
not know where to send it, but someone here might have come acros similar
problem:
Some of JPG files sitting in the same folder show up OK on an HTML page,
while the other do not as if they are not there or their name is misspelt.
Tried low-upper case in an ASP page, and in the files names - same result
Then I noticed that the same files do not show up in the preview pane in the
Windows Explorer althought they still are described by Windows Explorer as
valid JPEG files.
These "wrong" files are not necessarily bigger then the good ones and in
Microsoft Photo Editor they all (good and bad) show up well and they all are
118 Pixels/cm and True Color (24 bit)

What might be wrong with these files?
If there is not direct answer, perhaps spmeone recommend me a correct
newsgroup?



  #2  
Old July 19th, 2005, 09:55 AM
William Morris
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

Show the source code.


<aa> wrote in message news:O9Hu7XYuDHA.1876@TK2MSFTNGP09.phx.gbl...[color=blue]
> Although this question does not belong in here, I hope someone help, as I[/color]
do[color=blue]
> not know where to send it, but someone here might have come acros similar
> problem:
> Some of JPG files sitting in the same folder show up OK on an HTML page,
> while the other do not as if they are not there or their name is misspelt.
> Tried low-upper case in an ASP page, and in the files names - same result
> Then I noticed that the same files do not show up in the preview pane in[/color]
the[color=blue]
> Windows Explorer althought they still are described by Windows Explorer as
> valid JPEG files.
> These "wrong" files are not necessarily bigger then the good ones and in
> Microsoft Photo Editor they all (good and bad) show up well and they all[/color]
are[color=blue]
> 118 Pixels/cm and True Color (24 bit)
>
> What might be wrong with these files?
> If there is not direct answer, perhaps spmeone recommend me a correct
> newsgroup?
>
>
>[/color]


  #3  
Old July 19th, 2005, 09:59 AM
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

<img src="p1.jpg"/>
<img src="p2.jpg"/>
The first one does show up, the other does not

"William Morris" <news.remove.this.and.the.dots@seamlyne.com> wrote in
message news:bql43u$23t9mb$1@ID-205671.news.uni-berlin.de...[color=blue]
> Show the source code.
>
>
> <aa> wrote in message news:O9Hu7XYuDHA.1876@TK2MSFTNGP09.phx.gbl...[color=green]
> > Although this question does not belong in here, I hope someone help, as[/color][/color]
I[color=blue]
> do[color=green]
> > not know where to send it, but someone here might have come acros[/color][/color]
similar[color=blue][color=green]
> > problem:
> > Some of JPG files sitting in the same folder show up OK on an HTML[/color][/color]
page,[color=blue][color=green]
> > while the other do not as if they are not there or their name is[/color][/color]
misspelt.[color=blue][color=green]
> > Tried low-upper case in an ASP page, and in the files names - same[/color][/color]
result[color=blue][color=green]
> > Then I noticed that the same files do not show up in the preview pane in[/color]
> the[color=green]
> > Windows Explorer althought they still are described by Windows Explorer[/color][/color]
as[color=blue][color=green]
> > valid JPEG files.
> > These "wrong" files are not necessarily bigger then the good ones and in
> > Microsoft Photo Editor they all (good and bad) show up well and they all[/color]
> are[color=green]
> > 118 Pixels/cm and True Color (24 bit)
> >
> > What might be wrong with these files?
> > If there is not direct answer, perhaps spmeone recommend me a correct
> > newsgroup?
> >
> >
> >[/color]
>
>[/color]


  #4  
Old July 19th, 2005, 09:59 AM
William Morris
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

I can't find anything wrong with the <img> code - even tried it on my own
server, though I've not seen putting the forward slash at the end very
often. <img src="pic1.jpg"/> as opposed to <img src="pic1.jpg">.

What version of IIS?
What browser are you using?
If you use a different browser does the problem go away?
What ELSE is going on on the page?

<aa> wrote in message news:egPQyMxuDHA.3196@TK2MSFTNGP11.phx.gbl...[color=blue]
> <img src="p1.jpg"/>
> <img src="p2.jpg"/>
> The first one does show up, the other does not
>
> "William Morris" <news.remove.this.and.the.dots@seamlyne.com> wrote in
> message news:bql43u$23t9mb$1@ID-205671.news.uni-berlin.de...[color=green]
> > Show the source code.
> >
> >
> > <aa> wrote in message news:O9Hu7XYuDHA.1876@TK2MSFTNGP09.phx.gbl...[color=darkred]
> > > Although this question does not belong in here, I hope someone help,[/color][/color][/color]
as[color=blue]
> I[color=green]
> > do[color=darkred]
> > > not know where to send it, but someone here might have come acros[/color][/color]
> similar[color=green][color=darkred]
> > > problem:
> > > Some of JPG files sitting in the same folder show up OK on an HTML[/color][/color]
> page,[color=green][color=darkred]
> > > while the other do not as if they are not there or their name is[/color][/color]
> misspelt.[color=green][color=darkred]
> > > Tried low-upper case in an ASP page, and in the files names - same[/color][/color]
> result[color=green][color=darkred]
> > > Then I noticed that the same files do not show up in the preview pane[/color][/color][/color]
in[color=blue][color=green]
> > the[color=darkred]
> > > Windows Explorer althought they still are described by Windows[/color][/color][/color]
Explorer[color=blue]
> as[color=green][color=darkred]
> > > valid JPEG files.
> > > These "wrong" files are not necessarily bigger then the good ones and[/color][/color][/color]
in[color=blue][color=green][color=darkred]
> > > Microsoft Photo Editor they all (good and bad) show up well and they[/color][/color][/color]
all[color=blue][color=green]
> > are[color=darkred]
> > > 118 Pixels/cm and True Color (24 bit)
> > >
> > > What might be wrong with these files?
> > > If there is not direct answer, perhaps spmeone recommend me a correct
> > > newsgroup?
> > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


  #5  
Old July 19th, 2005, 10:00 AM
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

William,
I am sure it has nothing to do with html/asp code as the same code works for
one image and does not for another. Just have a look at the live page in
question:
http://www.electrolube.com/distribut...the_folder.asp

ASP code uses the FileSystemObject to read all the filenames in the folder
and then puts these names in the <img> tags so all the images in a folder
are supposed to be displayed. Of course all the <img> tags are absolutely
the same except the filenames. And yet some images do not show up.

Mistakes in the filenames are out of question, unless FSO somehow mis-read
them, but I checked them in the resulting HTML (view source) and everything
is correct including the letter case.
So ther problem is iof the files themselves

A


"William Morris" <news.remove.this.and.the.dots@seamlyne.com> wrote in
message news:bqqau3$24mqn5$1@ID-205671.news.uni-berlin.de...[color=blue]
> I can't find anything wrong with the <img> code - even tried it on my own
> server, though I've not seen putting the forward slash at the end very
> often. <img src="pic1.jpg"/> as opposed to <img src="pic1.jpg">.
>
> What version of IIS?
> What browser are you using?
> If you use a different browser does the problem go away?
> What ELSE is going on on the page?
>
> <aa> wrote in message news:egPQyMxuDHA.3196@TK2MSFTNGP11.phx.gbl...[color=green]
> > <img src="p1.jpg"/>
> > <img src="p2.jpg"/>
> > The first one does show up, the other does not
> >
> > "William Morris" <news.remove.this.and.the.dots@seamlyne.com> wrote in
> > message news:bql43u$23t9mb$1@ID-205671.news.uni-berlin.de...[color=darkred]
> > > Show the source code.
> > >
> > >
> > > <aa> wrote in message news:O9Hu7XYuDHA.1876@TK2MSFTNGP09.phx.gbl...
> > > > Although this question does not belong in here, I hope someone help,[/color][/color]
> as[color=green]
> > I[color=darkred]
> > > do
> > > > not know where to send it, but someone here might have come acros[/color]
> > similar[color=darkred]
> > > > problem:
> > > > Some of JPG files sitting in the same folder show up OK on an HTML[/color]
> > page,[color=darkred]
> > > > while the other do not as if they are not there or their name is[/color]
> > misspelt.[color=darkred]
> > > > Tried low-upper case in an ASP page, and in the files names - same[/color]
> > result[color=darkred]
> > > > Then I noticed that the same files do not show up in the preview[/color][/color][/color]
pane[color=blue]
> in[color=green][color=darkred]
> > > the
> > > > Windows Explorer althought they still are described by Windows[/color][/color]
> Explorer[color=green]
> > as[color=darkred]
> > > > valid JPEG files.
> > > > These "wrong" files are not necessarily bigger then the good ones[/color][/color][/color]
and[color=blue]
> in[color=green][color=darkred]
> > > > Microsoft Photo Editor they all (good and bad) show up well and they[/color][/color]
> all[color=green][color=darkred]
> > > are
> > > > 118 Pixels/cm and True Color (24 bit)
> > > >
> > > > What might be wrong with these files?
> > > > If there is not direct answer, perhaps spmeone recommend me a[/color][/color][/color]
correct[color=blue][color=green][color=darkred]
> > > > newsgroup?
> > > >
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


  #6  
Old July 19th, 2005, 10:00 AM
William Tasso
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

aa wrote:[color=blue]
> I am sure it has nothing to do with html/asp code as the same code
> works for one image and does not for another. Just have a look at the
> live page in question:
>[/color]
http://www.electrolube.com/distribut...the_folder.asp

Page is missing a DTD, character encoding and title text. The images have
no ALT text.

FWIW: Opera has more luck, but even so has difficulty making an image out
of this: <img src='folder_contents.asp' border='1'>

--
William Tasso - http://WilliamTasso.com


  #7  
Old July 19th, 2005, 10:00 AM
Roland Hall
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

"William Tasso" wrote:[color=blue]
> aa wrote:[color=green]
> > I am sure it has nothing to do with html/asp code as the same code
> > works for one image and does not for another. Just have a look at the
> > live page in question:
> >[/color]
>[/color]
http://www.electrolube.com/distribut...the_folder.asp

I wouldn't assume there is nothing wrong with the code when I see this:

folder_contents.asp 1563
show_all_images_in_the_folder.asp 1345

....and the source is this:

<img src='folder_contents.asp' border='1'>&nbsp; &nbsp;folder_contents.asp
&nbsp; &nbsp;1563<br>
<img src='show_all_images_in_the_folder.asp' border='1'>&nbsp;
&nbsp;show_all_images_in_the_folder.asp &nbsp; &nbsp;1345<br>

Since you're using IIS 5.0, the names shouldn't be case sensitive and I've
already test that. The files do not have .gif, .png or .bmp extensions so
my only conclusion is that you're pulling the file size from a database and
not actually getting the information directly from the file at run time.
So, either the files that do not show are zero bytes or you've added them to
your site with Visual InterDev or something similar that uses FPSE
(FrontPage Server Extensions) and you're working in master mode and it shows
the files to be there in your editor but they have not been added to the
master web. It will show a blue pennant as the icon next to the file in the
editor.

I have experienced this before when trying to upload a lot of large files
via VI 6.0.

Since the files just do not display instead of generating an error, it
appears they are actually there but they're zero bytes.
Seeing the code might help to prove or disprove it's not something in the
code.

The other thing that would keep it from displaying you're not using which
would be an ID, if you were preloading and using getElementById. It would
load the first image with the ID but any subsequent images with the same ID
would not be loaded.


--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.


  #8  
Old July 19th, 2005, 10:00 AM
William Tasso
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

Roland Hall wrote:[color=blue]
> "William Tasso" wrote:[color=green]
>> aa wrote:[color=darkred]
>>> I am sure it has nothing to do with html/asp code as the same code
>>> works for one image and does not for another. Just have a look at
>>> the live page in question:
>>>[/color]
>>[/color]
> Since the files just do not display instead of generating an error, it
> appears they are actually there but they're zero bytes.[/color]

The images appear ok in Opera

--
William Tasso - http://WilliamTasso.com


  #9  
Old July 19th, 2005, 10:01 AM
Roland Hall
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

William...

I tried loading the files that do not display by themselves in the browser
by calling them by name and they do not display that way either. So, I
downloaded one of the files and tried to display it locally in IE, still
nothing. So, I opened the image in Microsoft Photo Editor and resaved it.
Now it shows the image.

Uncompressed the file is almost 2Mb. Compressed the original version was
314Kb and now 35Kb. The image settings are still the same, True
Color(24-bit), width: 666px, height: 999px, uncompressed bytes: 1996002.

You can see them here: http://kiddanger.com/lab/electrolube/images.html
....or at least see the new revision.

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.



"William Tasso" wrote:[color=blue]
> Roland Hall wrote:[color=green]
> > "William Tasso" wrote:[color=darkred]
> >> aa wrote:
> >>> I am sure it has nothing to do with html/asp code as the same code
> >>> works for one image and does not for another. Just have a look at
> >>> the live page in question:
> >>>
> >>[/color]
> > Since the files just do not display instead of generating an error, it
> > appears they are actually there but they're zero bytes.[/color]
>
> The images appear ok in Opera[/color]


  #10  
Old July 19th, 2005, 10:01 AM
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

William and Ronald,
The bit of the source code you are refering to
<img src='folder_contents.asp' border='1'>
Is absolutely correct and of cource no image shows up because
folder_contents.asp (as well as show_all_images_in_the_folder.asp) is not an
image but the ASP code.
For the moment it is sitting together with the images, but once the whole
thing is working, I either move it into another forlader or add an IF
statement which would skip over files with .asp extention

The rest image tags are formed like that

<img src='apl400-1.jpg' border='1'>

which seems perfectly OK to me, escept a missing closing "/" which should
not affect the image display. Yet the image fails.

So the problem seems to be with the images?


  #11  
Old July 19th, 2005, 10:01 AM
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

So the problem is with the compression?
a
"Roland Hall" <nobody@nowhere> wrote in message
news:e2RG9OQvDHA.2372@TK2MSFTNGP09.phx.gbl...[color=blue]
> William...
>
> I tried loading the files that do not display by themselves in the browser
> by calling them by name and they do not display that way either. So, I
> downloaded one of the files and tried to display it locally in IE, still
> nothing. So, I opened the image in Microsoft Photo Editor and resaved it.
> Now it shows the image.
>
> Uncompressed the file is almost 2Mb. Compressed the original version was
> 314Kb and now 35Kb. The image settings are still the same, True
> Color(24-bit), width: 666px, height: 999px, uncompressed bytes: 1996002.
>
> You can see them here: http://kiddanger.com/lab/electrolube/images.html
> ...or at least see the new revision.
>
> --
> Roland
>
> This information is distributed in the hope that it will be useful, but
> without any warranty; without even the implied warranty of merchantability
> or fitness for a particular purpose.
>
>
>
> "William Tasso" wrote:[color=green]
> > Roland Hall wrote:[color=darkred]
> > > "William Tasso" wrote:
> > >> aa wrote:
> > >>> I am sure it has nothing to do with html/asp code as the same code
> > >>> works for one image and does not for another. Just have a look at
> > >>> the live page in question:
> > >>>
> > >>
> > > Since the files just do not display instead of generating an error, it
> > > appears they are actually there but they're zero bytes.[/color]
> >
> > The images appear ok in Opera[/color]
>
>[/color]


  #12  
Old July 19th, 2005, 10:01 AM
William Tasso
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

aa wrote:[color=blue]
> ...
> The rest image tags are formed like that
>
> <img src='apl400-1.jpg' border='1'>[/color]

It's more usual to use double-quotes, but of course I can't find a reference
now so I'm not sure if this could be causing an issue. don't forget the ALT
attribute:
<img src="apl400-1.jpg" alt="">
[color=blue]
> which seems perfectly OK to me, escept a missing closing "/" which
> should not affect the image display.[/color]

The closing / is only required in XHTML documents. As you haven't specified
a DTD I suspect the browser should just ignore it, but you can never be sure
how browser error-correction code is implemented.
[color=blue]
> Yet the image fails.[/color]

Works in Opera
[color=blue]
> So the problem seems to be with the images?[/color]

Could be. Have you tried using different images? or forcing changes and
re-saving those?

btw: & is not valid for use in URLs

Here's a valid[1] page (pulls images from your server).
http://williamtasso.com/usenet/electrolube.html Seems to indicate that there
is nothing seriously wrong with your markup. It partially works in IE6 and
Mozilla (as does your page) but Opera successfully pulls all images
requested. I'd start by resaving the images. btw: do they have to be so
large?

[1]
http://validator.w3.org/check?uri=ht...ectrolube.html
--
William Tasso - http://WilliamTasso.com


  #13  
Old July 19th, 2005, 10:01 AM
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

Have you tried using different images? or forcing changes and
re-saving those?

Yes, As I said, some images for the same folder within the same <img> tags
work fine. For example, on the same page which I earlier indicated
dca200h.jpg show up well



"William Tasso" <news27@tbdata.com> wrote in message
news:OBdoCiZvDHA.2712@tk2msftngp13.phx.gbl...[color=blue]
> aa wrote:[color=green]
> > ...
> > The rest image tags are formed like that
> >
> > <img src='apl400-1.jpg' border='1'>[/color]
>
> It's more usual to use double-quotes, but of course I can't find a[/color]
reference[color=blue]
> now so I'm not sure if this could be causing an issue. don't forget the[/color]
ALT[color=blue]
> attribute:
> <img src="apl400-1.jpg" alt="">
>[color=green]
> > which seems perfectly OK to me, escept a missing closing "/" which
> > should not affect the image display.[/color]
>
> The closing / is only required in XHTML documents. As you haven't[/color]
specified[color=blue]
> a DTD I suspect the browser should just ignore it, but you can never be[/color]
sure[color=blue]
> how browser error-correction code is implemented.
>[color=green]
> > Yet the image fails.[/color]
>
> Works in Opera
>[color=green]
> > So the problem seems to be with the images?[/color]
>
> Could be. Have you tried using different images? or forcing changes and
> re-saving those?
>
> btw: & is not valid for use in URLs
>
> Here's a valid[1] page (pulls images from your server).
> http://williamtasso.com/usenet/electrolube.html Seems to indicate that[/color]
there[color=blue]
> is nothing seriously wrong with your markup. It partially works in IE6[/color]
and[color=blue]
> Mozilla (as does your page) but Opera successfully pulls all images
> requested. I'd start by resaving the images. btw: do they have to be so
> large?
>
> [1]
>[/color]
http://validator.w3.org/check?uri=ht...ectrolube.html[color=blue]
> --
> William Tasso - http://WilliamTasso.com
>
>[/color]


  #14  
Old July 19th, 2005, 10:16 AM
Roland Hall
Guest
 
Posts: n/a
Default Re: Some of JPG files refuse to show up in the ASP page

<aa> wrote in message news:%23e4KNyYvDHA.3436@tk2msftngp13.phx.gbl...[color=blue]
> So the problem is with the compression?[/color]

It appears that way. Either IE is more strict or buggy reading the image
file or the other browser is more liberal. I really don't know which is
which.

I have seen .jpg files with different compression strengths from different
graphics programs and some would load in some files or some would get
corrupted and not load at all and then some, like LViewp1b could load the
part that was good and then just display background where the rest of the
image was corrupt or where the corruption was first noticed. I don't think
it could recover past it by showing just part in the middle. I've never
seen this with IE except when the file was corrupt and it would error out.

As far as what you're seeing, I've only noticed it when the file was zero
bytes or the image was on a *nix server and the filenames were
case-sensitive and I had a typo, until now. So, you might want to
investigate further with the graphics app you're using and see if you can
make some setting changes or consider running the file through a different
application, until you can find out what the cause is.

At least you know it's not your code.

--
Roland

This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose.


 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles