This commit is contained in:
John Cupitt 2008-05-22 13:45:04 +00:00
parent 3af9936b2e
commit 5607384617
2 changed files with 53 additions and 13 deletions

38
TODO
View File

@ -1,3 +1,28 @@
- pluggable formats
for each format, store:
- format name , same as mime
"jpeg"
- priority ... keep formats sorted by this, magick is low (-1000?)
int priority = 0;
- i18n'd name for users to see
"JPEG"
- allowed suffixes
const char *tiff_suffs[] = { ".tif", ".tiff", NULL };
- predicate (embedded options remove from filename)
gboolean (*is_a)(const char *filename)
- load header only
int (*header)(const char *filename, IMAGE *)
- load image
int (*load)(const char *filename, IMAGE *)
- save image
int (*save)(IMAGE *, const char *filename)
can we have the vips loader as part of this?
need to
- try
libsrc/convolution$ grep -l offsets *.c
@ -5,19 +30,6 @@
could we do the don't calc offsets thing unless bpl; changes thing in more
places?
- should check for gettext in configure? see
https://sourceforge.net/tracker/index.php?func=detail&aid=1836080&group_id=100050&atid=626186
hmm, not clear, we are using
AM_GLIB_GNU_GETTEXT
already, isn't that enough?
do we need AM_GNU_GETTEXT too? check the gnome i18n howto
- docs include figures twice! yuk
fixed? not sure, check again

View File

@ -143,6 +143,34 @@ typedef struct {
im_function **table; /* Array of function descriptors */
} im_package;
/* 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 * );
/* A VIPS image format.
*/
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 */
} im_format;
/* A set of VIPS formats forming a format package.
*/
typedef struct {
char *name; /* Package name (eg "magick") */
int nfuncs; /* Number of formats in package */
im_format **table; /* Array of formats */
} im_format_package;
/* Externs for dispatch.
*/