Login  Register

How to load an image

Posted by Shawn-62 on Jun 23, 2008; 5:56pm
URL: http://imagej.273.s1.nabble.com/How-to-load-an-image-tp3695796.html

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