Problem in Loading Image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem in Loading Image

Hanumanth
Hi,

I am having problem in loading image files from ImageJ as APPLET(web application). The problem is if the filename contains space then image is not loading. This is the example URL which iam using
http://localhost:8080/agastha11/ImageJ/images/DICOM image 2.jpg

file name is  "DICOM image 2.jpg"

if the filename doesn't caontain any space, then it is working correctly
is there any way to handle this, or is this a bug, Please help............


Thanks in advance
Hanumanth


      Cricket on your mind? Visit the ultimate cricket website. Enter http://beta.cricket.yahoo.com
Reply | Threaded
Open this post in threaded view
|

Re: Problem in Loading Image

Michael Schmid
Hi Hanumanth,

an URL should never contain a space. Replace the spaces by %20.

Michael
________________________________________________________________

On 24 Mar 2009, at 16:45, Hanumanth wrote:

> Hi,
>
> I am having problem in loading image files from ImageJ as APPLET
> (web application). The problem is if the filename contains space  
> then image is not loading. This is the example URL which iam using
> http://localhost:8080/agastha11/ImageJ/images/DICOM image 2.jpg
>
> file name is  "DICOM image 2.jpg"
>
> if the filename doesn't caontain any space, then it is working  
> correctly
> is there any way to handle this, or is this a bug, Please  
> help............
>
>
> Thanks in advance
> Hanumanth
>
>
>       Cricket on your mind? Visit the ultimate cricket website.  
> Enter http://beta.cricket.yahoo.com
Reply | Threaded
Open this post in threaded view
|

Re: Problem in Loading Image

Wayne Rasband
In reply to this post by Hanumanth
On Mar 24, 2009, at 11:45 AM, Hanumanth wrote:

> Hi,
>
> I am having problem in loading image files from ImageJ as APPLET(web
> application). The problem is if the filename contains space then image
> is not loading. This is the example URL which iam using
> http://localhost:8080/agastha11/ImageJ/images/DICOM image 2.jpg
>
> file name is  "DICOM image 2.jpg"
>
> if the filename doesn't caontain any space, then it is working
> correctly
> is there any way to handle this, or is this a bug, Please
> help............

Replace the space in the URL with "%20". Here is an example macro that
downloads a file named "CT Scan.dcm" from the ImageJ website:

     open("http://rsb.info.nih.gov/ij/images/CT%20Scan.dcm");

The ImageJ 1.42l daily build automatically replaces spaces in URLs with
"%20".

-wayne