OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 456820 on 15 Jun 2005, 19:37:21
-
ofp is being very weird and saying i cant have a pic wich is
width = 80
height = 40
wich 40 goes into 80 so it should work unless 80 has to go into 40
anyway its not working and uses the overview pic instead of the one i told it to called
sniper_badge.jpg
<html>
<body>
<!-- Overview Title -->
<br><h2 align="center"><a name="Main">
10. Sniper
</a></h2>
<!-- Overview Picture -->
<p align="center"><img src="pic.jpg" width="128" height="64"></p>
<br><br><br>
<p align="right"><img src="sniper_badge.jpg" width="80" height="40"></p>
<!-- Overview Text -->
<p><br>
<br></p>
</body>
</html>thats my overview file inacse there is anything wrong with it also ofp also sometimes choses a different pic than the one specified for some weird reason so i end up having a picture of a different mission
i do call the pics the same name in my overview so is that causing it
anyway whats wrond with my dimensions they are 2n
-
Pictures need to be in powers of 2 (2n)
Valid values for powers of 2 are:
2
4
8
16
32
64
128
256
512
1024
etc
etc
In short, starting with 2, you multiply by 2 to get the next value, then multiply by 2 again......etc....etc..
Planck
-
HERE (http://www.ofpec.com/editors/resource_view.php?id=2) is some usefull info
-
Actually, in the briefing.html you can make the picture any size you want.
The physical size of the picture (ie if you opened it up in paint/photoshop etc.) has to be ^2.
Your briefing is fine, but you'll need to resize the actual picture itself in a photo editing program along the guidelines of what Planck suggested ;)
-
thats exactly what i did aswell the phot itself is 80 by 40 but thats pixels does it need to be something else ?
-
It's pixels.
Read the thread again.
Hint quiz: if 2^n=8, what is the value of n?
-
Hint quiz: if 2^n=8, what is the value of n?
its 4
so my pixels should be right 2^n=80 and in that n=40 like in my pic
amyway ill read the thread again
-
Would you like to guess again?
The correct answer is 3.
2^3 = 2*2*2 = 8
"2 to the power of n" means 2 multiplied by itself (i.e. 2) n times. n can be 0, 1, 2 or 3 etc..
^ means "to the power of"
* means multiply
-
oh yh RAAA i forgot were talking about powers i though it was just n as in algebra anyway so what is the correct pixels
-
sigh.... okay.
you must make the dimensions of the ACTUAL image file a power of 2, i.e. 128, 256, 512 etc.
the picture in your BRIEFING can be ANY size.
so, for example, if your image is 128px * 512px, you can make its size 2000 * 37 in the briefing, by using
<img src="pic.jpg" width="2000" height="37">
-
so what is the correct pixels
Your question was answered comprehensively by Planck. I'd be interested to hear why you didn't bother reading that post.
-
now now, mistakes are made by us all. hopefully the thread will have helped sort things out. meantime, helpful comments only please. ::)
-
OK sorry. :)
-
I'd be interested to hear why you didn't bother reading that post.
actually i did just didnt understand it much anyway i got it working now thanks alot