start adding pluggable image formats

This commit is contained in:
John Cupitt 2008-05-22 15:28:52 +00:00
parent 5607384617
commit 96f1af3f60
24 changed files with 2067 additions and 23 deletions

View File

@ -375,6 +375,7 @@ AC_OUTPUT([
libsrc/colour/Makefile
libsrc/conversion/Makefile
libsrc/convolution/Makefile
libsrc/format/Makefile
libsrc/freq_filt/Makefile
libsrc/histograms_lut/Makefile
libsrc/inplace/Makefile

View File

@ -145,10 +145,10 @@ typedef struct {
/* Function protos for formats.
*/
typedef gboolean (*im_format_is_a)( const char * );
typedef int (*im_format_header)( const char *, IMAGE * );
typedef int (*im_format_load)( const char *, IMAGE * );
typedef int (*im_forrmat_save)( IMAGE *, const char * );
typedef gboolean (*im_format_is_a_fn)( const char * );
typedef int (*im_format_header_fn)( const char *, IMAGE * );
typedef int (*im_format_load_fn)( const char *, IMAGE * );
typedef int (*im_format_save_fn)( IMAGE *, const char * );
/* A VIPS image format.
*/
@ -156,11 +156,11 @@ typedef struct {
const char *name; /* Format name, same as mime */
const char *name_user; /* I18n'd name for users */
int priority; /* Keep formats sorted by this, default 0 */
const char *suffs[]; /* Allowed suffixes */
im_format_is_a is_a; /* Filename is in format */
im_format_header header;/* Load header only from filename */
im_format_load load; /* Load image from filename */
im_format_save save; /* Save image to filename */
const char **suffs; /* Allowed suffixes */
im_format_is_a_fn is_a; /* Filename is in format */
im_format_header_fn header;/* Load header only from filename */
im_format_load_fn load; /* Load image from filename */
im_format_save_fn save; /* Save image to filename */
} im_format;
/* A set of VIPS formats forming a format package.

View File

@ -17,6 +17,7 @@ SUBDIRS = \
conversion \
convolution \
$(C_COMPILE_DIR) \
format \
freq_filt \
histograms_lut \
inplace \
@ -42,6 +43,7 @@ libvips_la_LIBADD = \
conversion/libconversion.la \
convolution/libconvolution.la \
$(C_LIB) \
format/libformat.la \
freq_filt/libfreq_filt.la \
histograms_lut/libhistograms_lut.la \
inplace/libinplace.la \

View File

@ -2,12 +2,9 @@ noinst_LTLIBRARIES = libconversion.la
libconversion_la_SOURCES = \
im_bernd.c \
im_vips2tiff.c \
im_tiff2vips.c \
conver_dispatch.c \
dbh.h \
im_bandjoin.c \
im_analyze2vips.c \
im_black.c \
im_c2amph.c \
im_c2rect.c \
@ -16,26 +13,18 @@ libconversion_la_SOURCES = \
im_c2real.c \
im_clip.c \
im_copy.c \
im_csv2vips.c \
im_vips2csv.c \
im_extract.c \
im_exr2vips.c \
im_falsecolour.c \
im_fliphor.c \
im_flipver.c \
im_gbandjoin.c \
im_insert.c \
im_jpeg2vips.c \
im_lrjoin.c \
im_magick2vips.c \
im_mask2vips.c \
im_msb.c \
im_png2vips.c \
im_ppm2vips.c \
im_recomb.c \
im_replicate.c \
im_grid.c \
im_raw2vips.c \
im_ri2c.c \
im_rightshift_size.c \
im_rot180.c \
@ -52,9 +41,6 @@ libconversion_la_SOURCES = \
im_text.c \
im_thresh.c \
im_vips2mask.c \
im_vips2jpeg.c \
im_vips2ppm.c \
im_vips2png.c \
im_wrap.c \
im_zoom.c

61
libsrc/format/Makefile.am Normal file
View File

@ -0,0 +1,61 @@
noinst_LTLIBRARIES = libconversion.la
libconversion_la_SOURCES = \
im_bernd.c \
im_vips2tiff.c \
im_tiff2vips.c \
conver_dispatch.c \
dbh.h \
im_bandjoin.c \
im_analyze2vips.c \
im_black.c \
im_c2amph.c \
im_c2rect.c \
im_c2imag.c \
im_c2ps.c \
im_c2real.c \
im_clip.c \
im_copy.c \
im_csv2vips.c \
im_vips2csv.c \
im_extract.c \
im_exr2vips.c \
im_falsecolour.c \
im_fliphor.c \
im_flipver.c \
im_gbandjoin.c \
im_insert.c \
im_jpeg2vips.c \
im_lrjoin.c \
im_magick2vips.c \
im_mask2vips.c \
im_msb.c \
im_png2vips.c \
im_ppm2vips.c \
im_recomb.c \
im_replicate.c \
im_grid.c \
im_raw2vips.c \
im_ri2c.c \
im_rightshift_size.c \
im_rot180.c \
im_rot270.c \
im_rot90.c \
im_scale.c \
im_scaleps.c \
im_slice.c \
im_subsample.c \
im_system.c \
im_print.c \
im_tbjoin.c \
im_tile_cache.c \
im_text.c \
im_thresh.c \
im_vips2mask.c \
im_vips2jpeg.c \
im_vips2ppm.c \
im_vips2png.c \
im_wrap.c \
im_zoom.c
INCLUDES = -I${top_srcdir}/include @VIPS_CFLAGS@ @VIPS_INCLUDES@

File diff suppressed because it is too large Load Diff