View Single Post
Old 08-01-2002, 01:46 PM   #9
psychogears
A Shissar Disciple
 
psychogears's Avatar
 
Join Date: Jul 2002
Server: Xev
Posts: 106
Send a message via ICQ to psychogears Send a message via AIM to psychogears Send a message via Yahoo to psychogears
Default

Quote:
Originally posted by arantius
(Why would they ever restrict size like that... oh well. And hehe I missed the first definition in animations.)


Well... I'm going to take a stab at this, not sure if I'm right...

Data in your computer is represented by bits, which are 0 and 1. numbers to 2 are 0 and 1, and can be represented by 1 bit. numbers to 4 are 0, 1, 2, 3, and are represented by 2 bits: 00, 01, 10, 11. Numbers to 8 are 0, 1, 2, 3, 4, 5, 6, 7, and are represented by 3 bits: 000, 001, 010, 011, 100, 101, 110, 111, and so on and so forth.

If an image size other than a power of 2 is used, then it looks like the EQUI engine will just automagically scale your image to the next power of 2... in the case above, 768 gets scaled to 1024. Why they chose to do this I don't really know, but this way you can use all of the bits required to reference points in the picture. It takes 9 bits to store numbers to 512, from 0 to 511, and to reference numbers 512 and above you *need* 10 bits. 512 in binary is 1000000000, whereas 511 is 0111111111, or 111111111. The number 768 in binary is 1100000000.

I suppose EQ wants pictures with sizes in multiples of 2, probably having something to do with the way it stores and references those image files in memory. If it doesn't have an image size that it likes, it will just scale it so it's compatible with whatever method they use to store the image files in mem. To reference points in the pic, it's 0 to (power of 2), and this way it uses all of the space allocated, I guess.

Sorry if that was convoluted, I have a very dim picture of the way the images are stored and referenced in memory.

-TJ
__________________
Hazul, Plik, Xzhamacharathae, Seis, Lyca, Pogi, Camm...

of Xev
psychogears is offline   Reply With Quote