JWS C Library
C language utility library
|
JWS image file format. More...
#include <jwsc/config.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <inttypes.h>
#include "jwsc/base/bits.h"
#include "jwsc/image/jiff.h"
Go to the source code of this file.
Defines | |
#define | HEADER_SIZE 64 |
Size (in 4-byte words) of the JIFF header. | |
#define | DEFAULT_JIFF_COLORSPACE JIFF_RGB |
Default colorspace. | |
#define | DEFAULT_JIFF_DEPTH JIFF_8_BIT |
Default channel depth. | |
#define | DEFAULT_JIFF_TYPE JIFF_INTEGER |
Default channel type. | |
#define | DEFAULT_JIFF_RED_W 0.3f |
Default red channel averaging weight for grayscale conversion. | |
#define | DEFAULT_JIFF_GREEN_W 0.59f |
Default green channel averaging weight for grayscale conversion. | |
#define | DEFAULT_JIFF_BLUE_W 0.11f |
Default blue channel averaging weight for grayscale conversion. | |
Functions | |
void | init_jiff_attributes (JIFF_attributes *attrs) |
Initializes a JIFF_attributes with defaults values. | |
read_image_as_jiff | |
Reads a JIFF image from a file. | |
Error * | read_image_as_jiff_f (Image_f **img_out, const char *fname) |
Reads an Image_f from a JIFF image file. | |
write_image_as_jiff | |
Writes a JIFF image to a file. | |
Error * | write_image_as_jiff_f (const Image_f *img, const char *fname, const JIFF_attributes *attrs) |
Writes an Image_f to a JIFF image file. |
JWS image file format.
Specifies an integer or floating point image with grayscale or RGB channels.
Definition in file jiff.c.
#define HEADER_SIZE 64 |
#define DEFAULT_JIFF_RED_W 0.3f |
#define DEFAULT_JIFF_GREEN_W 0.59f |
#define DEFAULT_JIFF_BLUE_W 0.11f |
void init_jiff_attributes | ( | JIFF_attributes * | attrs | ) |
Initializes a JIFF_attributes with defaults values.
attrs | Attributes to initialize. |
Reads an Image_f from a JIFF image file.
img_out | Result parameter. If *img_out is NULL, an image is allocated; otherwise its space is re-used. |
fname | Name of the image file to read. |
Error* write_image_as_jiff_f | ( | const Image_f * | img, |
const char * | fname, | ||
const JIFF_attributes * | attrs | ||
) |