Problems with gifs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tshad

    Problems with gifs

    I have some code where I am trying display either jpgs or gifs.

    They are going an image tag:

    <img src="" id="PictureDisp lay" alt="" />

    This displayed fine under VS 2003 but when I moved this over to VS 2005, it
    doesn't seem to handle gif, but jpgs work fine.

    If I have the img tag set to:

    <img src="c:\uploads \logo.jpg" id="PictureDisp lay" alt="" />

    it works fine.

    If I have it set to:

    <img src="c:\uploads \logo.gif" id="PictureDisp lay" alt="" />

    it doesn't.

    I had originally just went into Paint Shop Pro, changed it to a jpg and then
    it worked fine.

    Why the problem?

    Thanks,

    Tom




  • Hans Kesting

    #2
    Re: Problems with gifs

    tshad wrote on 15-2-2008 :
    I have some code where I am trying display either jpgs or gifs.
    >
    They are going an image tag:
    >
    <img src="" id="PictureDisp lay" alt="" />
    >
    This displayed fine under VS 2003 but when I moved this over to VS 2005, it
    doesn't seem to handle gif, but jpgs work fine.
    >
    If I have the img tag set to:
    >
    <img src="c:\uploads \logo.jpg" id="PictureDisp lay" alt="" />
    >
    it works fine.
    >
    If I have it set to:
    >
    <img src="c:\uploads \logo.gif" id="PictureDisp lay" alt="" />
    >
    it doesn't.
    >
    I had originally just went into Paint Shop Pro, changed it to a jpg and then
    it worked fine.
    >
    Why the problem?
    >
    Thanks,
    >
    Tom
    Not sure why a .gif would fail (both files *do* exist there, don't
    thay?) but a remark about your src attribute:
    a src of "C:\..." will only work on your development box and not when
    you deploy to a server. The browser will look into it's *local* C:\
    path for that image and probaly fail (personally I don't have a
    C:\uploads directory ...).
    You need to have a http:// path in there (but it might be a relative
    path). The file needs to be served via the webserver (and be in a path
    that can be accessed by that server)

    Hans Kesting


    Comment

    • Aidy

      #3
      Re: Problems with gifs

      Long shot but have you tried;

      <img src="file://c:\uploads\logo .gif" id="PictureDisp lay" alt="" />

      And could you define "doesn't work"?

      "tshad" <tfs@dslextreme .comwrote in message
      news:OiebCh6bIH A.3932@TK2MSFTN GP05.phx.gbl...
      >I have some code where I am trying display either jpgs or gifs.
      >
      They are going an image tag:
      >
      <img src="" id="PictureDisp lay" alt="" />
      >
      This displayed fine under VS 2003 but when I moved this over to VS 2005,
      it doesn't seem to handle gif, but jpgs work fine.
      >
      If I have the img tag set to:
      >
      <img src="c:\uploads \logo.jpg" id="PictureDisp lay" alt="" />
      >
      it works fine.
      >
      If I have it set to:
      >
      <img src="c:\uploads \logo.gif" id="PictureDisp lay" alt="" />
      >
      it doesn't.
      >
      I had originally just went into Paint Shop Pro, changed it to a jpg and
      then it worked fine.
      >
      Why the problem?
      >
      Thanks,
      >
      Tom
      >
      >
      >
      >
      >

      Comment

      Working...