How to load an image

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

How to load an image

Shawn-62
Hi, everyone, I try to load an image from a file in a PlugIn Frame. The
following is my code,

FileInfo fi = new FileInfo();
fi.width = 256;
fi.height = 254;
fi.offset = 768;
fi.fileName = "blobs.GIF";
fi.directory = "C:\Program Files\ImageJ\images";
new FileOpener(fi).open();

However, I get an error message,
illegal escape character
fi.directory = "C:\Program Files\ImageJ\images";

Is there anyone who can tell me how to fix it?

Many Thanks
Reply | Threaded
Open this post in threaded view
|

Re: How to load an image

Fernando Sales
Try this:
fi.directory = "C:\\Program Files\\ImageJ\\images";

Fernando


On Mon, Jun 23, 2008 at 2:56 PM, Shawn <[hidden email]> wrote:

> Hi, everyone, I try to load an image from a file in a PlugIn Frame. The
> following is my code,
>
> FileInfo fi = new FileInfo();
> fi.width = 256;
> fi.height = 254;
> fi.offset = 768;
> fi.fileName = "blobs.GIF";
> fi.directory = "C:\Program Files\ImageJ\images";
> new FileOpener(fi).open();
>
> However, I get an error message,
> illegal escape character
> fi.directory = "C:\Program Files\ImageJ\images";
>
> Is there anyone who can tell me how to fix it?
>
> Many Thanks
>



--
**************************************************
Fernando José Ribeiro Sales
**************************************************
Email: [hidden email]
Tel: (11) 82020303
**************************************************