Advertisement

Saving to a JPEG

Started by March 29, 2003 09:03 AM
2 comments, last by mizt 21 years, 11 months ago
Hello Can anyone tell me how to save an openGL image to a Jpeg file? I have a fractal image which is stored as follows typedef struct colors { GLubyte red; GLubyte green; GLubyte blue; } T_FractalImage; T_FractalImage fractal_image[WINDOW_SIZE][WINDOW_SIZE]; How do I dump the contents of the 2D array to a jpeg file? Any help on this is much appreciated, thanks M
one way i can think of is using the OpenIL (DevIL) library. it can do more than just jpeg's though.

[edited by - adam17 on March 29, 2003 10:17:10 AM]
Advertisement
DevIL works great even though it''s no longer supported. I''d steer away from JPGs for computer generated images though. The artifacts often make it look like crap. I''d use PNGs if there wasn''t a good reason to use JPG.
Thanks.

I''ll give DevIL a look see

Mizt

This topic is closed to new replies.

Advertisement