Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ImageIO.C File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ImageIO.h"
#include "Inform.h"
#include "utilities.h"

Go to the source code of this file.

Functions

void putbyte (FILE *outf, unsigned char val)
void putshort (FILE *outf, unsigned short val)
void putint (FILE *outf, unsigned int val)
unsigned char * cvt_rgb4u_rgb3u (const unsigned char *rgb4u, int xs, int ys)
 copy/convert a 32-bit RGBA color buffer to a 24-bit RGB color buffer. More...

unsigned char * cvt_rgb4f_rgb3u (const float *rgb4f, int xs, int ys)
 copy/convert a 128-bit RGBA float color buffer to a 24-bit RGB color buffer. More...

unsigned char * cvt_rgba4f_rgba4u (const float *rgba4f, int xs, int ys)
int checkfileextension (const char *s, const char *extension)
int write_image_file_rgb3u (const char *filename, const unsigned char *rgb3u, int xs, int ys)
 Write an unsigned RGB 24-bit color image, by filename extension. More...

int write_image_file_rgb4u (const char *filename, const unsigned char *rgb4u, int xs, int ys)
 Write an unsigned RGBA 32-bit color image, by filename extension. More...

int write_image_file_rgb4f (const char *filename, const float *rgb4f, int xs, int ys)
 Write an float RGBA 128-bit color image, by filename extension. More...

int write_image_file_rgba4u (const char *filename, const unsigned char *rgba4u, int xs, int ys)
 Write an unsigned RGBA 32-bit color image, with alpha channel, by filename extension. More...

int write_image_file_rgba4f (const char *filename, const float *rgba4f, int xs, int ys)
 Write an float RGBA 128-bit color image, with alpha channel, by filename extension. More...

void vmd_writergb (FILE *dfile, const unsigned char *img, int xs, int ys)
 Write 24-bit uncompressed SGI RGB image file. More...

void write_le_int32 (FILE *dfile, int num)
void write_le_int16 (FILE *dfile, int num)
void vmd_writebmp (FILE *dfile, const unsigned char *img, int xs, int ys)
 Write 24-bit uncompressed Windows Bitmap file. More...

void vmd_writeppm (FILE *dfile, const unsigned char *img, int xs, int ys)
 Write 24-bit uncompressed NetPBM Portable Pixmap file. More...

void vmd_writetga (FILE *dfile, const unsigned char *img, int xs, int ys)
 Write 24-bit uncompressed Truevision "Targa" file. More...


Function Documentation

int checkfileextension const char *    s,
const char *    extension
[static]
 

Definition at line 137 of file ImageIO.C.

References strupncmp.

unsigned char* cvt_rgb4f_rgb3u const float *    rgb4f,
int    xs,
int    ys
 

copy/convert a 128-bit RGBA float color buffer to a 24-bit RGB color buffer.

Definition at line 81 of file ImageIO.C.

unsigned char* cvt_rgb4u_rgb3u const unsigned char *    rgb4u,
int    xs,
int    ys
 

copy/convert a 32-bit RGBA color buffer to a 24-bit RGB color buffer.

Definition at line 61 of file ImageIO.C.

unsigned char* cvt_rgba4f_rgba4u const float *    rgba4f,
int    xs,
int    ys
 

Definition at line 108 of file ImageIO.C.

Referenced by write_image_file_rgba4f.

void putbyte FILE *    outf,
unsigned char    val
[static]
 

Definition at line 38 of file ImageIO.C.

Referenced by vmd_writergb.

void putint FILE *    outf,
unsigned int    val
[static]
 

Definition at line 51 of file ImageIO.C.

Referenced by vmd_writergb.

void putshort FILE *    outf,
unsigned short    val
[static]
 

Definition at line 44 of file ImageIO.C.

Referenced by vmd_writergb.

void vmd_writebmp FILE *    dfile,
const unsigned char *    img,
int    xs,
int    ys
 

Write 24-bit uncompressed Windows Bitmap file.

Definition at line 314 of file ImageIO.C.

References NULL, write_le_int16, and write_le_int32.

void vmd_writeppm FILE *    dfile,
const unsigned char *    img,
int    xs,
int    ys
 

Write 24-bit uncompressed NetPBM Portable Pixmap file.

Definition at line 376 of file ImageIO.C.

References NULL.

void vmd_writergb FILE *    dfile,
const unsigned char *    img,
int    xs,
int    ys
 

Write 24-bit uncompressed SGI RGB image file.

Definition at line 269 of file ImageIO.C.

References NULL, putbyte, putint, and putshort.

void vmd_writetga FILE *    dfile,
const unsigned char *    img,
int    xs,
int    ys
 

Write 24-bit uncompressed Truevision "Targa" file.

Definition at line 392 of file ImageIO.C.

References NULL.

int write_image_file_rgb3u const char *    filename,
const unsigned char *    rgb3u,
int    xs,
int    ys
 

Write an unsigned RGB 24-bit color image, by filename extension.

Definition at line 150 of file ImageIO.C.

References checkfileextension, NULL, vmd_writebmp, vmd_writeppm, vmd_writergb, and vmd_writetga.

int write_image_file_rgb4f const char *    filename,
const float *    rgb4f,
int    xs,
int    ys
 

Write an float RGBA 128-bit color image, by filename extension.

Definition at line 205 of file ImageIO.C.

References cvt_rgb4f_rgb3u, NULL, and write_image_file_rgb3u.

int write_image_file_rgb4u const char *    filename,
const unsigned char *    rgb4u,
int    xs,
int    ys
 

Write an unsigned RGBA 32-bit color image, by filename extension.

Definition at line 189 of file ImageIO.C.

References cvt_rgb4u_rgb3u, NULL, and write_image_file_rgb3u.

int write_image_file_rgba4f const char *    filename,
const float *    rgba4f,
int    xs,
int    ys
 

Write an float RGBA 128-bit color image, with alpha channel, by filename extension.

Definition at line 253 of file ImageIO.C.

References cvt_rgba4f_rgba4u, NULL, and write_image_file_rgba4u.

int write_image_file_rgba4u const char *    filename,
const unsigned char *    rgba4u,
int    xs,
int    ys
 

Write an unsigned RGBA 32-bit color image, with alpha channel, by filename extension.

Definition at line 221 of file ImageIO.C.

References checkfileextension, and NULL.

void write_le_int16 FILE *    dfile,
int    num
[static]
 

Definition at line 308 of file ImageIO.C.

References num.

Referenced by vmd_writebmp.

void write_le_int32 FILE *    dfile,
int    num
[static]
 

Definition at line 301 of file ImageIO.C.

References num.

Referenced by vmd_writebmp.


Generated on Fri Apr 19 02:45:49 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002