This project has moved and is read-only. For the latest updates, please go here.

How to embed a GIF?

Topics: User Forum
Oct 19, 2006 at 6:17 PM
My CHF file compiles perfectly from C# XML comments. However, I need to embed a GIF into a specific method to show the flow that the process takes.

I've tried adding the GIF as 'Additional Comment' both with and without a destination location, but I can't find the GIF anywhere in the built CHM file.

Can someone help?
Oct 19, 2006 at 8:25 PM
If you don't specify a destination location, it'll end up in the .\Working\Output folder (effectively the root folder for the help project). Since the help pages are stored in the .\Working\Output\html\ folder, you probably need to reference the image using a relative path such as "../MyImage.jpg". If you specify the HTML folder as the destination path, you probably don't need any path on the image name.

If it got copied, you'll see it listed in the build log file. That'll tell you where it ended up. If you can't get it working, let me know and I can put together an example.

Oct 20, 2006 at 1:18 PM
Thanks Eric. Yes, the graphic ended up in the output folder:

Copying additional content files...
C:\Documents and Settings\ratseyj\My Documents\Visual Studio 2005\Projects\Dodge\DotNetAPI\Norm\Help\OrderLifecycle.gif -> C:\Documents and Settings\ratseyj\My Documents\Visual Studio 2005\Projects\Dodge\DotNetAPI\Norm\Help\Working\Output\OrderLifecycle.gif

But doesn't get embedded?

Compile time: 0 minutes, 3 seconds

151 Topics

2,009 Local links

789 Internet links

0 Graphics

Also, how would I include it in the XML? I tried this, but obviously not working:

/// <include file='OrderLifecycle.gif' path='../@name="OrderLifecycle.gif"'/>
Oct 20, 2006 at 4:01 PM
If it's in the output folder, it'll end up in the help file. There are lots of other images for the class pages such as for methods, properties, etc. so I don't know what the help compiler counts as graphics. In order to see it, you need to use a standard img tag in your XML comments for the method:

<img src="OrderLifeCycle.gif"/>


<img src="../OrderLifeCycle.gif"/>