2007-08-29 18:23:50 +02:00
|
|
|
.TH IM_RAW2VIPS 3 "4 August 2005"
|
|
|
|
.SH NAME
|
2009-03-28 18:32:53 +01:00
|
|
|
im_raw2vips, im_vips2raw \- wrap a raw binary file inside an IMAGE descriptor
|
2007-08-29 18:23:50 +02:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B #include <vips/vips.h>
|
|
|
|
|
|
|
|
int
|
|
|
|
.br
|
|
|
|
im_raw2vips( const char *filename, IMAGE *out,
|
|
|
|
.br
|
|
|
|
int width, int height, int bpp, int offset )
|
|
|
|
|
2009-03-28 18:32:53 +01:00
|
|
|
int
|
|
|
|
.br
|
|
|
|
im_vips2raw( IMAGE *in, int fd )
|
|
|
|
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.B im_raw2vips(3)
|
|
|
|
mmaps the file named, setting image
|
|
|
|
.B out
|
|
|
|
so that access to that image will read from the file.
|
|
|
|
The parameters specify the image width, height, bytes per pixel and offset
|
|
|
|
in bytes from the start of the file.
|
|
|
|
|
|
|
|
Use functions like
|
|
|
|
.B im_copy_morph(3)
|
|
|
|
to set the pixel type, byte ordering and so on.
|
|
|
|
|
2009-03-28 18:32:53 +01:00
|
|
|
.B im_vips2raw(3)
|
|
|
|
writes the pixels in the IMAGE to the file descriptor. It's handy for writing
|
|
|
|
writers for other formats.
|
|
|
|
|
2007-08-29 18:23:50 +02:00
|
|
|
.SH RETURN VALUE
|
|
|
|
The functions return NULL on error.
|
|
|
|
.SH SEE ALSO
|
|
|
|
im_copy_morph(3), im_copy_swap(3).
|
|
|
|
.SH COPYRIGHT
|
|
|
|
Imperial College, 2005
|