Index: CGUIImage.cpp
===================================================================
--- CGUIImage.cpp	(revision 6702)
+++ CGUIImage.cpp	(working copy)
@@ -8,6 +8,7 @@
 #include "IGUISkin.h"
 #include "IGUIEnvironment.h"
 #include "IVideoDriver.h"
+#include "IFileSystem.h"
 
 namespace irr
 {
@@ -179,7 +180,19 @@
 {
 	IGUIImage::serializeAttributes(out,options);
 
-	out->addTexture	("Texture", Texture);
+	if (options && (options->Flags&io::EARWF_USE_RELATIVE_PATHS) && options->Filename && Texture)
+	{
+    io::IFileSystem *fileSystem = Environment->getFileSystem();
+
+		io::path path = fileSystem->getRelativeFilename(
+			fileSystem->getAbsolutePath(Texture->getName()), options->Filename);
+		out->addTexture("Texture", Texture, path);
+	}
+	else
+	{
+		out->addTexture	("Texture", Texture);
+	}
+
 	out->addBool	("UseAlphaChannel", UseAlphaChannel);
 	out->addColor	("Color", Color);
 	out->addBool	("ScaleImage", ScaleImage);
