Orbiter-Forum  

Go Back   Orbiter-Forum > Projects > ORBITER: 2010-P1 and newer > Bug
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Scenario HYPERDESC not recognizing image relative path Issue Tools
issueid=1460 02-29-2020 10:17 AM
tuanibrO
Scenario HYPERDESC not recognizing image relative path
Scenario HYPERDESC does not recognize a relative path to an image

Using Orbiter 160828, I want to add an image in the launchpad view.
This can be done by linking to a htm file in ORBITER_ROOT\Html\Scenarios folder.

Using this scenario:
Code:
BEGIN_HYPERDESC
<style type="text/css">
body{font-family:Arial;font-size:16px}
p{margin-top:0;}
table, th, td {border: 1px solid black;font-size:16px}
h1{font-size:200%;font-weight:normal;margin-bottom:0.5em;color:blue;background-color:#E0E0FF;padding:0.1em}
img {float: right; margin: 0 0 0 15px;}
</style>
<h1>Test using <em>Hyperdesc</em></h1>
<p><img src="testImage.jpg" width="50%" alt="Here the image should be." />
Image to the right.

END_HYPERDESC

BEGIN_ENVIRONMENT
  System Sol
  Date MJD 54321.01234
  Help test
END_ENVIRONMENT

BEGIN_FOCUS
  Ship DG-1
END_FOCUS

BEGIN_CAMERA
  TARGET DG-1
  MODE Cockpit
  FOV 40.00
END_CAMERA

BEGIN_HUD
  TYPE Surface
END_HUD

BEGIN_PANEL
END_PANEL

BEGIN_SHIPS
DG-1:DeltaGlider
  STATUS Orbiting Earth
  RPOS 2243753.697 4834807.210 -3489983.404
  RVEL 375.6497 -58.6909 160.1984
  AROT 126.911 -20.401 168.367
  VROT -0.0071 0.0477 -0.0055
  PRPLEVEL 0:1.000 1:1.000
  NAVFREQ 0 0 0 0
  XPDR 0
  NOSECONE 0 0.0000
  GEAR 1 1.0000
  AIRLOCK 0 0.0000
END
END_SHIPS

BEGIN_ExtMFD
END
and having the htm file ORBITER_ROOT\Html\Scenarios\test.htm
Code:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<style type="text/css">
body{font-family:Arial;font-size:16px}
p{margin-top:0;}
table, th, td {border: 1px solid black;font-size:16px}
h1{font-size:200%;font-weight:normal;margin-bottom:0.5em;color:blue;background-color:#E0E0FF;padding:0.1em}
img {float: right; margin: 0 0 0 15px;}
</style>
</HEAD>
<BODY>
<h1>Test using <em>Help</em> tag</h1>
<p><img src="..\..\testImage.jpg" width="50%" alt="Here the image should be." />
Image to the right.

</BODY>
</HTML>
and image file ORBITER_ROOT\testImage.jpg, I get this satisfactory result:
.

Now if I remove the "Help test" line in the scenario environment tag, I get this result, no matter if I try src="testImage.jpg", src="..\testImage.jpg", src="..\..\testImage.jpg" and so on up to 8 levels up (where I stopped trying):


Finally, if I change from relative path to an absolute path (src="C:\Orbiter2016\testImage.jpg"), it works again:


So the relative path doesn't seem to work, or at least does not seem to be inside ORBITER_ROOT.
I also described this problem here, by the way: https://www.orbiter-forum.com/showthread.php?t=41343
Issue Details
Project ORBITER: 2010-P1 and newer
Status Unconfirmed
Priority 3
Affected Version Revision denoted in description
Fixed Version (none)
Users able to reproduce bug 0
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)

Reply

Issue Tools
Subscribe to this issue

All times are GMT. The time now is 08:56 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.