Using a filepath image

I am trying to understand how to use images that may not be in the resource manager. Ultimately I hope to be able to store the images in a database or a directory so that my users can can create palettes containing images of their making.
I have an image in the called “XpLady.gif” in the solution root folder and have tried various ways of using the image in a goIconicNode with no success:
GoIconicNode sn2 = new GoIconicNode();
sn2.Initialize(null, “XpLady.gif”, “Worker1”);
I have also set the resource manager to null:
GoImage.DefaultResourceManager = null;
The reference manual says:

Provides the ResourceManager holding an Image resource named by iconname. If this parameter is null, DefaultResourceManager is used instead.
The name of the Image resource in the ResourceManager given by res, or else a file name if no resource manager can be used (i.e., when both res is null and DefaultResourceManager is null).
The initial string value for the Label. If this value is null, no label is created for this node.
I am missing something, but can't figure out what. I also tried code that I saw in another post about adding a goImage: GoImage img = new GoImage();
img.Name = "XpLady.gif";
img.Size = new SizeF(264, 336);
doc.Add(img); It adds a big empty image place holder. Thanks for your help, Mark

Is “XpLady.gif” in the “current directory” at the time the image is shown?
Using disk files is inefficient if there might be more than one GoImage referring to the same file. We had considered caching images read from files, but decided not to bother, because you can easily implement this yourself using ResourceManager, and you can implement it smarter, since you may have a better idea of the lifetime and usage patterns.
Remember that GoImage.ResourceManager is not serialized along with the GoImage, so if you do a copy-and-paste, the value for that property will be null after deserialization. So if you don’t use GoImage.DefaultResourceManager and if you don’t use the GoImage.Name as a file path, you can implement a GoView.ClipboardPasted event handler to fix up any GoImages in the Selection.

Yes it is in the root director. I also tried images in the image directory as well:
@".\images\XpLady.gif" as well as “./images/XpLady.gif”. Nothing I tried seemed to display an image.
It sounds like you are suggesting that the resource manager is the best way? So if I had database images or customer supplied images I would just need to programmically add them to a resource manager?

You should confirm that the current directory, I think System.IO.GetCurrentDirectory(), is what you think it is.
You could also try an absolute path.
Yes, you can construct a ResourceManager dynamically. I suppose you’ll need to figure out when to unload images, depending on how your application works.
Another possibility is to override GoImage.LoadImage. For example, this class loads images from a URL (taken from the FAQ):
public class URLImage : GoImage {
public URLImage() {}
public override Image LoadImage() {
String name = this.Name;
if (name != null) {
WebClient wc = new WebClient();
Stream inf = wc.OpenRead(name);
Image img = Image.FromStream(inf);
return img;
} else {
return null;
Of course you would want it to be smarter about either getting it from a ResourceManager if already present, or else getting the Image from the database and caching it in the ResourceManager.