Advertisement

Buffer to GIF

Started by May 05, 2000 11:47 AM
1 comment, last by Goodlife 24 years, 7 months ago
Hi all... I know this is a long shot, but does anyone have a routine that can save a 256-color buffer into a GIF file, or a JPEG? I have these components: char pal[768]; // RGB entries char *data; // The data to be stored short width,height; // Width and height of the buffer I looked up the GIF file format, and I''m about to start a probable two-day ordeal with it, but I wanted to see if anything had done this, and was willing to share code. Thanks in advance! -- Goodlife ----------------------------- Think of your mind as a door on a house. Leave the door always closed, and it's not a house, it's a prison. Leave the door always open, and it's not a house, it's a wilderness-- all the vermin creep in.
-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto
I know this probably isn''t the answer you want to hear, but is it possible to just save the image to an ''easy'' file format like BMP and then use a paint program to convert it for you? It will save a lot of coding, but then again, depending on your particular use for this, you could be doing a lot of manual conversions.
Advertisement
Alas, and woe is me, no.

This is for the web page I''m doing to promote my game. I need to generate the results of a survey. I know how to pass the contents of a GIF file to a web page, so I need to generate the GIF itself...


-- Goodlife

-----------------------------
Think of your mind as a door on a house. Leave the door always closed, and it's not a house, it's a prison. Leave the door always open, and it's not a house, it's a wilderness-- all the vermin creep in.
-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto

This topic is closed to new replies.

Advertisement