What's up with GIFs?
Displaying 1-5 of 5 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Lunarbeam

I've looked at some demos and in them there are these odd Gif files. Inside, there's not just one picture but a whole list of them in a sort of strip continuing down the length of the image. How do I get this to work? I thought you could only load a whole image, not just a part. Also, can you do this with pcx files?



-- Lunarbeam @

Posted on 2001-01-03 22:41:10

andy

Basicly, the VC coder is doing some clever coding to blit part of the image. The part that makes it work is the fact that they're in a vertical strip.

Basicly, when blitting the first frame, you can specify any height you want, and it'll blit okay. (specifying an incorrect width will result in weirdness)

So, taking this step further, the coder supplies an offset, so that it starts blitting somewhere other than the upper left corner of the image.

TCopySprite(x,y,imagewidth,frameheight,imageptr+(curframe*frameheight*bytesperpixel));

And it doesn't matter what kind of image it is, it's converted to raw pixel data at runtime.



'Never confuse a single defeat with a final defeat.' -F. Scott Fitzgerald

Posted on 2001-01-03 23:19:10

Lunarbeam

nt..cant you read?



-- Lunarbeam @

Posted on 2001-01-04 01:32:42

Lunarbeam

What do I put for bytesperpixels? Give me an example...



-- Lunarbeam @

Posted on 2001-01-05 15:20:56

Feyr

It depends on how many bytes you're using for color...8 bit color is 1 byte per pixel, and 15 or 16 bit color is 2 bytes per pixel.

--Feyr



Posted on 2001-01-06 11:39:12


Displaying 1-5 of 5 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.