2015-04-21 19:39:02 +02:00
|
|
|
/* Base type for supported image formats. Subclass this to add a new
|
|
|
|
* format.
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
2015-04-21 19:39:02 +02:00
|
|
|
This file is part of VIPS.
|
2011-11-29 12:43:08 +01:00
|
|
|
|
|
|
|
VIPS is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2013-03-07 06:40:19 +01:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
02110-1301 USA
|
2011-11-29 12:43:08 +01:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
2015-04-21 19:39:02 +02:00
|
|
|
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
|
2011-11-29 12:43:08 +01:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef VIPS_FOREIGN_H
|
|
|
|
#define VIPS_FOREIGN_H
|
|
|
|
|
2022-02-15 06:02:07 +01:00
|
|
|
#include <glib.h>
|
|
|
|
#include <glib-object.h>
|
|
|
|
#include <vips/object.h>
|
|
|
|
#include <vips/operation.h>
|
|
|
|
|
2011-11-29 12:43:08 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /*__cplusplus*/
|
|
|
|
|
|
|
|
#define VIPS_TYPE_FOREIGN (vips_foreign_get_type())
|
|
|
|
#define VIPS_FOREIGN( obj ) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
|
|
|
|
VIPS_TYPE_FOREIGN, VipsForeign ))
|
|
|
|
#define VIPS_FOREIGN_CLASS( klass ) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST( (klass), \
|
|
|
|
VIPS_TYPE_FOREIGN, VipsForeignClass))
|
|
|
|
#define VIPS_IS_FOREIGN( obj ) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FOREIGN ))
|
|
|
|
#define VIPS_IS_FOREIGN_CLASS( klass ) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FOREIGN ))
|
|
|
|
#define VIPS_FOREIGN_GET_CLASS( obj ) \
|
|
|
|
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
|
|
|
|
VIPS_TYPE_FOREIGN, VipsForeignClass ))
|
|
|
|
|
|
|
|
typedef struct _VipsForeign {
|
|
|
|
VipsOperation parent_object;
|
2011-12-22 13:12:27 +01:00
|
|
|
|
2011-11-29 12:43:08 +01:00
|
|
|
/*< public >*/
|
|
|
|
|
|
|
|
} VipsForeign;
|
|
|
|
|
|
|
|
typedef struct _VipsForeignClass {
|
|
|
|
VipsOperationClass parent_class;
|
|
|
|
|
|
|
|
/*< public >*/
|
|
|
|
|
2011-11-29 13:11:33 +01:00
|
|
|
/* Loop over formats in this order, default 0. We need this because
|
|
|
|
* some formats can be read by several loaders (eg. tiff can be read
|
2011-11-29 12:43:08 +01:00
|
|
|
* by the libMagick loader as well as by the tiff loader), and we want
|
|
|
|
* to make sure the better loader comes first.
|
|
|
|
*/
|
|
|
|
int priority;
|
|
|
|
|
|
|
|
/* Null-terminated list of recommended suffixes, eg. ".tif", ".tiff".
|
|
|
|
* This can be used by both load and save, so it's in the base class.
|
|
|
|
*/
|
|
|
|
const char **suffs;
|
|
|
|
|
|
|
|
} VipsForeignClass;
|
|
|
|
|
2016-07-13 23:39:16 +02:00
|
|
|
/* Don't put spaces around void here, it breaks gtk-doc.
|
|
|
|
*/
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2016-07-13 23:39:16 +02:00
|
|
|
GType vips_foreign_get_type(void);
|
2011-11-29 12:43:08 +01:00
|
|
|
|
2011-11-29 13:11:33 +01:00
|
|
|
/* Map over and find formats. This uses type introspection to loop over
|
2011-11-29 12:43:08 +01:00
|
|
|
* subclasses of VipsForeign.
|
|
|
|
*/
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-11-29 13:11:33 +01:00
|
|
|
void *vips_foreign_map( const char *base,
|
|
|
|
VipsSListMap2Fn fn, void *a, void *b );
|
2011-11-29 12:43:08 +01:00
|
|
|
|
2011-11-29 18:10:24 +01:00
|
|
|
/* Image file load properties.
|
2013-11-21 18:43:28 +01:00
|
|
|
*
|
|
|
|
* Keep in sync with the deprecated VipsFormatFlags, we need to be able to
|
|
|
|
* cast between them.
|
2011-11-29 18:10:24 +01:00
|
|
|
*/
|
2012-02-20 22:02:37 +01:00
|
|
|
typedef enum /*< flags >*/ {
|
2011-11-29 18:10:24 +01:00
|
|
|
VIPS_FOREIGN_NONE = 0, /* No flags set */
|
|
|
|
VIPS_FOREIGN_PARTIAL = 1, /* Lazy read OK (eg. tiled tiff) */
|
2013-11-21 18:43:28 +01:00
|
|
|
VIPS_FOREIGN_BIGENDIAN = 2, /* Most-significant byte first */
|
|
|
|
VIPS_FOREIGN_SEQUENTIAL = 4, /* Top-to-bottom lazy read OK */
|
2012-02-20 22:02:37 +01:00
|
|
|
VIPS_FOREIGN_ALL = 7 /* All flags set */
|
2011-11-29 18:10:24 +01:00
|
|
|
} VipsForeignFlags;
|
|
|
|
|
2021-10-31 15:13:18 +01:00
|
|
|
/**
|
|
|
|
* VipsFailOn:
|
|
|
|
* @VIPS_FAIL_ON_NONE: never stop
|
|
|
|
* @VIPS_FAIL_ON_TRUNCATED: stop on image truncated, nothing else
|
|
|
|
* @VIPS_FAIL_ON_ERROR: stop on serious error or truncation
|
|
|
|
* @VIPS_FAIL_ON_WARNING: stop on anything, even warnings
|
|
|
|
*
|
|
|
|
* How sensitive loaders are to errors, from never stop (very insensitive), to
|
|
|
|
* stop on the smallest warning (very sensitive).
|
|
|
|
*
|
|
|
|
* Each one implies the ones before it, so #VIPS_FAIL_ON_ERROR implies
|
|
|
|
* #VIPS_FAIL_ON_TRUNCATED.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIPS_FAIL_ON_NONE,
|
|
|
|
VIPS_FAIL_ON_TRUNCATED,
|
|
|
|
VIPS_FAIL_ON_ERROR,
|
|
|
|
VIPS_FAIL_ON_WARNING,
|
|
|
|
VIPS_FAIL_ON_LAST
|
|
|
|
} VipsFailOn;
|
|
|
|
|
2011-11-29 12:43:08 +01:00
|
|
|
#define VIPS_TYPE_FOREIGN_LOAD (vips_foreign_load_get_type())
|
|
|
|
#define VIPS_FOREIGN_LOAD( obj ) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
|
|
|
|
VIPS_TYPE_FOREIGN_LOAD, VipsForeignLoad ))
|
|
|
|
#define VIPS_FOREIGN_LOAD_CLASS( klass ) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST( (klass), \
|
|
|
|
VIPS_TYPE_FOREIGN_LOAD, VipsForeignLoadClass))
|
|
|
|
#define VIPS_IS_FOREIGN_LOAD( obj ) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FOREIGN_LOAD ))
|
|
|
|
#define VIPS_IS_FOREIGN_LOAD_CLASS( klass ) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FOREIGN_LOAD ))
|
|
|
|
#define VIPS_FOREIGN_LOAD_GET_CLASS( obj ) \
|
|
|
|
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
|
|
|
|
VIPS_TYPE_FOREIGN_LOAD, VipsForeignLoadClass ))
|
|
|
|
|
|
|
|
typedef struct _VipsForeignLoad {
|
|
|
|
VipsForeign parent_object;
|
2011-12-22 13:12:27 +01:00
|
|
|
/*< private >*/
|
2011-11-29 12:43:08 +01:00
|
|
|
|
2017-07-07 10:45:49 +02:00
|
|
|
/* Set TRUE to force open via memory.
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
2017-07-07 10:45:49 +02:00
|
|
|
gboolean memory;
|
2011-11-29 12:43:08 +01:00
|
|
|
|
2013-09-29 12:04:11 +02:00
|
|
|
/* Type of access upstream wants and the loader must supply.
|
2012-02-15 14:55:34 +01:00
|
|
|
*/
|
2013-09-29 12:04:11 +02:00
|
|
|
VipsAccess access;
|
2012-02-15 14:55:34 +01:00
|
|
|
|
|
|
|
/* Flags for this load operation.
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
|
|
|
VipsForeignFlags flags;
|
|
|
|
|
2021-10-31 15:13:18 +01:00
|
|
|
/* Behaviour on error.
|
2016-11-12 16:33:35 +01:00
|
|
|
*/
|
2021-10-31 15:13:18 +01:00
|
|
|
VipsFailOn fail_on;
|
2016-11-12 16:33:35 +01:00
|
|
|
|
2021-10-31 15:13:18 +01:00
|
|
|
/* Deprecated and unused. Just here for compat.
|
2013-09-27 15:47:04 +02:00
|
|
|
*/
|
2021-10-31 15:13:18 +01:00
|
|
|
gboolean fail;
|
2013-09-27 15:47:04 +02:00
|
|
|
gboolean sequential;
|
|
|
|
|
2011-12-22 13:12:27 +01:00
|
|
|
/*< public >*/
|
|
|
|
|
|
|
|
/* The image we generate. This must be set by ->header().
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
|
|
|
VipsImage *out;
|
|
|
|
|
|
|
|
/* The behind-the-scenes real image we decompress to. This can be a
|
2015-04-21 19:39:02 +02:00
|
|
|
* disc file or a memory buffer. This must be set by ->load().
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
|
|
|
VipsImage *real;
|
2012-07-10 11:51:40 +02:00
|
|
|
|
|
|
|
/* Set this to tag the operation as nocache.
|
|
|
|
*/
|
|
|
|
gboolean nocache;
|
2017-07-07 10:45:49 +02:00
|
|
|
|
|
|
|
/* Deprecated: the memory option used to be called disc and default
|
|
|
|
* TRUE.
|
|
|
|
*/
|
|
|
|
gboolean disc;
|
2018-03-05 15:42:09 +01:00
|
|
|
|
|
|
|
/* Set if a start function fails. We want to prevent the other starts
|
|
|
|
* from also triggering the load.
|
|
|
|
*/
|
|
|
|
gboolean error;
|
2011-11-29 12:43:08 +01:00
|
|
|
} VipsForeignLoad;
|
|
|
|
|
|
|
|
typedef struct _VipsForeignLoadClass {
|
|
|
|
VipsForeignClass parent_class;
|
|
|
|
/*< public >*/
|
|
|
|
|
2011-12-22 13:12:27 +01:00
|
|
|
/* Is a file in this format.
|
|
|
|
*
|
2012-02-15 14:55:34 +01:00
|
|
|
* This function should return %TRUE if the file contains an image of
|
|
|
|
* this type. If you don't define this function, #VipsForeignLoad
|
2011-12-22 13:12:27 +01:00
|
|
|
* will use @suffs instead.
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
2014-09-03 15:32:55 +02:00
|
|
|
gboolean (*is_a)( const char *filename );
|
2011-11-29 12:43:08 +01:00
|
|
|
|
2014-04-22 17:27:43 +02:00
|
|
|
/* Is a buffer in this format.
|
|
|
|
*
|
|
|
|
* This function should return %TRUE if the buffer contains an image of
|
|
|
|
* this type.
|
|
|
|
*/
|
2015-10-23 12:45:11 +02:00
|
|
|
gboolean (*is_a_buffer)( const void *data, size_t size );
|
2014-04-22 17:27:43 +02:00
|
|
|
|
2019-10-10 21:42:39 +02:00
|
|
|
/* Is a stream in this format.
|
|
|
|
*
|
|
|
|
* This function should return %TRUE if the stream contains an image of
|
|
|
|
* this type.
|
|
|
|
*/
|
2019-12-29 22:40:21 +01:00
|
|
|
gboolean (*is_a_source)( VipsSource *source );
|
2019-10-10 21:42:39 +02:00
|
|
|
|
2011-12-22 13:12:27 +01:00
|
|
|
/* Get the flags from a filename.
|
|
|
|
*
|
|
|
|
* This function should examine the file and return a set
|
|
|
|
* of flags. If you don't define it, vips will default to 0 (no flags
|
|
|
|
* set).
|
|
|
|
*
|
2019-11-15 16:56:28 +01:00
|
|
|
* This method is necessary for vips7 compatibility. Don't define
|
|
|
|
* it if you don't need vips7.
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
2014-09-03 15:32:55 +02:00
|
|
|
VipsForeignFlags (*get_flags_filename)( const char *filename );
|
2011-11-29 12:43:08 +01:00
|
|
|
|
2012-02-15 14:55:34 +01:00
|
|
|
/* Get the flags for this load operation. Images can be loaded from
|
|
|
|
* (for example) memory areas rather than files, so you can't just use
|
2011-12-22 13:12:27 +01:00
|
|
|
* @get_flags_filename().
|
2011-12-13 14:19:20 +01:00
|
|
|
*/
|
2014-09-03 15:32:55 +02:00
|
|
|
VipsForeignFlags (*get_flags)( VipsForeignLoad *load );
|
2011-12-13 14:19:20 +01:00
|
|
|
|
2012-02-15 14:55:34 +01:00
|
|
|
/* Do the minimum read we can.
|
|
|
|
*
|
|
|
|
* Set the header fields in @out from @filename. If you can read the
|
2011-11-29 12:43:08 +01:00
|
|
|
* whole image as well with no performance cost (as with vipsload),
|
2011-12-22 13:12:27 +01:00
|
|
|
* or if your loader does not support reading only the header, read
|
|
|
|
* the entire image in this method and leave @load() NULL.
|
2011-12-12 12:34:28 +01:00
|
|
|
*
|
2011-12-22 13:12:27 +01:00
|
|
|
* @header() needs to set the dhint on the image .. otherwise you get
|
2011-12-12 12:34:28 +01:00
|
|
|
* the default SMALLTILE.
|
2011-12-22 13:12:27 +01:00
|
|
|
*
|
2019-11-15 16:56:28 +01:00
|
|
|
* Return 0 for success, -1 for error, setting vips_error().
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
2014-09-03 15:32:55 +02:00
|
|
|
int (*header)( VipsForeignLoad *load );
|
2011-11-29 12:43:08 +01:00
|
|
|
|
2012-02-15 14:55:34 +01:00
|
|
|
/* Read the whole image into @real. The pixels will get copied to @out
|
|
|
|
* later.
|
2011-12-22 13:12:27 +01:00
|
|
|
*
|
|
|
|
* You can omit this method if you define a @header() method which
|
2012-02-07 15:30:54 +01:00
|
|
|
* loads the whole file.
|
2011-12-22 13:12:27 +01:00
|
|
|
*
|
|
|
|
* Return 0 for success, -1 for error, setting
|
|
|
|
* vips_error().
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
2014-09-03 15:32:55 +02:00
|
|
|
int (*load)( VipsForeignLoad *load );
|
2011-11-29 12:43:08 +01:00
|
|
|
} VipsForeignLoadClass;
|
|
|
|
|
2016-07-13 23:39:16 +02:00
|
|
|
/* Don't put spaces around void here, it breaks gtk-doc.
|
|
|
|
*/
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2016-07-13 23:39:16 +02:00
|
|
|
GType vips_foreign_load_get_type(void);
|
2011-11-29 12:43:08 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-31 19:22:42 +01:00
|
|
|
const char *vips_foreign_find_load( const char *filename );
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2015-10-23 12:45:11 +02:00
|
|
|
const char *vips_foreign_find_load_buffer( const void *data, size_t size );
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-12-29 22:40:21 +01:00
|
|
|
const char *vips_foreign_find_load_source( VipsSource *source );
|
2011-11-29 12:43:08 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-13 14:19:20 +01:00
|
|
|
VipsForeignFlags vips_foreign_flags( const char *loader, const char *filename );
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-13 14:19:20 +01:00
|
|
|
gboolean vips_foreign_is_a( const char *loader, const char *filename );
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2015-10-23 12:45:11 +02:00
|
|
|
gboolean vips_foreign_is_a_buffer( const char *loader,
|
|
|
|
const void *data, size_t size );
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-12-29 22:40:21 +01:00
|
|
|
gboolean vips_foreign_is_a_source( const char *loader,
|
|
|
|
VipsSource *source );
|
2011-12-13 14:19:20 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2017-01-18 15:39:27 +01:00
|
|
|
void vips_foreign_load_invalidate( VipsImage *image );
|
|
|
|
|
2011-11-29 12:43:08 +01:00
|
|
|
#define VIPS_TYPE_FOREIGN_SAVE (vips_foreign_save_get_type())
|
|
|
|
#define VIPS_FOREIGN_SAVE( obj ) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
|
|
|
|
VIPS_TYPE_FOREIGN_SAVE, VipsForeignSave ))
|
|
|
|
#define VIPS_FOREIGN_SAVE_CLASS( klass ) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST( (klass), \
|
|
|
|
VIPS_TYPE_FOREIGN_SAVE, VipsForeignSaveClass))
|
|
|
|
#define VIPS_IS_FOREIGN_SAVE( obj ) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE( (obj), VIPS_TYPE_FOREIGN_SAVE ))
|
|
|
|
#define VIPS_IS_FOREIGN_SAVE_CLASS( klass ) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE( (klass), VIPS_TYPE_FOREIGN_SAVE ))
|
|
|
|
#define VIPS_FOREIGN_SAVE_GET_CLASS( obj ) \
|
|
|
|
(G_TYPE_INSTANCE_GET_CLASS( (obj), \
|
|
|
|
VIPS_TYPE_FOREIGN_SAVE, VipsForeignSaveClass ))
|
|
|
|
|
|
|
|
/**
|
|
|
|
* VipsSaveable:
|
2011-12-16 16:24:35 +01:00
|
|
|
* @VIPS_SAVEABLE_MONO: 1 band (eg. CSV)
|
2011-11-29 12:43:08 +01:00
|
|
|
* @VIPS_SAVEABLE_RGB: 1 or 3 bands (eg. PPM)
|
2015-04-24 13:49:50 +02:00
|
|
|
* @VIPS_SAVEABLE_RGBA: 1, 2, 3 or 4 bands (eg. PNG)
|
2015-04-17 17:59:28 +02:00
|
|
|
* @VIPS_SAVEABLE_RGBA_ONLY: 3 or 4 bands (eg. WEBP)
|
2011-11-29 12:43:08 +01:00
|
|
|
* @VIPS_SAVEABLE_RGB_CMYK: 1, 3 or 4 bands (eg. JPEG)
|
|
|
|
* @VIPS_SAVEABLE_ANY: any number of bands (eg. TIFF)
|
|
|
|
*
|
|
|
|
* See also: #VipsForeignSave.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
2011-12-16 16:24:35 +01:00
|
|
|
VIPS_SAVEABLE_MONO,
|
2011-11-29 12:43:08 +01:00
|
|
|
VIPS_SAVEABLE_RGB,
|
|
|
|
VIPS_SAVEABLE_RGBA,
|
2015-04-17 17:59:28 +02:00
|
|
|
VIPS_SAVEABLE_RGBA_ONLY,
|
2011-11-29 12:43:08 +01:00
|
|
|
VIPS_SAVEABLE_RGB_CMYK,
|
|
|
|
VIPS_SAVEABLE_ANY,
|
|
|
|
VIPS_SAVEABLE_LAST
|
|
|
|
} VipsSaveable;
|
|
|
|
|
|
|
|
typedef struct _VipsForeignSave {
|
|
|
|
VipsForeign parent_object;
|
2011-12-22 13:12:27 +01:00
|
|
|
|
2014-09-11 10:18:38 +02:00
|
|
|
/* Don't attach metadata.
|
2013-11-13 10:00:47 +01:00
|
|
|
*/
|
|
|
|
gboolean strip;
|
|
|
|
|
2014-09-11 10:18:38 +02:00
|
|
|
/* If flattening out alpha, the background colour to use. Default to
|
|
|
|
* 0 (black).
|
|
|
|
*/
|
|
|
|
VipsArrayDouble *background;
|
|
|
|
|
2017-06-19 10:31:49 +02:00
|
|
|
/* Set to non-zero to set the page size for multi-page save.
|
|
|
|
*/
|
|
|
|
int page_height;
|
|
|
|
|
2011-11-29 12:43:08 +01:00
|
|
|
/*< public >*/
|
|
|
|
|
2011-12-22 13:12:27 +01:00
|
|
|
/* The image we are to save, as supplied by our caller.
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
|
|
|
VipsImage *in;
|
|
|
|
|
2011-12-22 13:12:27 +01:00
|
|
|
/* @in converted to a saveable format (eg. 8-bit RGB) according to the
|
|
|
|
* instructions you give in the class fields below.
|
|
|
|
*
|
|
|
|
* This is the image you should actually write to the output.
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
|
|
|
VipsImage *ready;
|
|
|
|
|
|
|
|
} VipsForeignSave;
|
|
|
|
|
|
|
|
typedef struct _VipsForeignSaveClass {
|
|
|
|
VipsForeignClass parent_class;
|
|
|
|
|
|
|
|
/*< public >*/
|
|
|
|
|
|
|
|
/* How this format treats bands.
|
2011-12-22 13:12:27 +01:00
|
|
|
*
|
|
|
|
* @saveable describes the bands that your saver can handle. For
|
|
|
|
* example, PPM images can have 1 or 3 bands (mono or RGB), so it
|
|
|
|
* uses #VIPS_SAVEABLE_RGB.
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
|
|
|
VipsSaveable saveable;
|
|
|
|
|
|
|
|
/* How this format treats band formats.
|
2011-12-22 13:12:27 +01:00
|
|
|
*
|
|
|
|
* @format_table describes the band formats that your saver can
|
|
|
|
* handle. For each of the 10 #VipsBandFormat values, the array
|
|
|
|
* should give the format your saver will accept.
|
2011-11-29 12:43:08 +01:00
|
|
|
*/
|
|
|
|
VipsBandFormat *format_table;
|
2011-12-20 15:57:05 +01:00
|
|
|
|
2012-01-12 14:39:58 +01:00
|
|
|
/* The set of coding types this format can save. For example, jpeg can
|
|
|
|
* only save NONE, so has NONE TRUE and RAD and LABQ FALSE.
|
|
|
|
*
|
|
|
|
* Default NONE TRUE, RAD and LABQ FALSE.
|
2011-12-20 15:57:05 +01:00
|
|
|
*/
|
2012-01-12 14:39:58 +01:00
|
|
|
gboolean coding[VIPS_CODING_LAST];
|
2011-11-29 12:43:08 +01:00
|
|
|
} VipsForeignSaveClass;
|
|
|
|
|
2016-07-13 23:39:16 +02:00
|
|
|
/* Don't put spaces around void here, it breaks gtk-doc.
|
|
|
|
*/
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2016-07-13 23:39:16 +02:00
|
|
|
GType vips_foreign_save_get_type(void);
|
2011-11-29 12:43:08 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-11-29 12:43:08 +01:00
|
|
|
const char *vips_foreign_find_save( const char *filename );
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-02-23 14:50:10 +01:00
|
|
|
gchar **vips_foreign_get_suffixes( void );
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2014-06-08 12:16:58 +02:00
|
|
|
const char *vips_foreign_find_save_buffer( const char *suffix );
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-12-29 22:40:21 +01:00
|
|
|
const char *vips_foreign_find_save_target( const char *suffix );
|
2011-12-12 15:51:41 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2015-04-21 15:29:44 +02:00
|
|
|
int vips_vipsload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-12-31 20:47:36 +01:00
|
|
|
int vips_vipsload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2015-04-21 15:29:44 +02:00
|
|
|
int vips_vipssave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-01-02 16:49:32 +01:00
|
|
|
int vips_vipssave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2015-04-21 15:29:44 +02:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-11 23:01:39 +01:00
|
|
|
int vips_openslideload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-12-30 15:14:08 +01:00
|
|
|
int vips_openslideload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-12-11 23:01:39 +01:00
|
|
|
|
2021-01-11 21:40:13 +01:00
|
|
|
/**
|
|
|
|
* VipsForeignSubsample:
|
2021-03-27 16:16:38 +01:00
|
|
|
* @VIPS_FOREIGN_SUBSAMPLE_AUTO: prevent subsampling when quality >= 90
|
2021-01-11 21:40:13 +01:00
|
|
|
* @VIPS_FOREIGN_SUBSAMPLE_ON: always perform subsampling
|
|
|
|
* @VIPS_FOREIGN_SUBSAMPLE_OFF: never perform subsampling
|
|
|
|
*
|
|
|
|
* Set subsampling mode.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIPS_FOREIGN_SUBSAMPLE_AUTO,
|
|
|
|
VIPS_FOREIGN_SUBSAMPLE_ON,
|
|
|
|
VIPS_FOREIGN_SUBSAMPLE_OFF,
|
|
|
|
VIPS_FOREIGN_SUBSAMPLE_LAST
|
|
|
|
} VipsForeignSubsample;
|
|
|
|
|
2020-02-17 10:29:57 +01:00
|
|
|
/**
|
|
|
|
* VipsForeignJpegSubsample:
|
|
|
|
* @VIPS_FOREIGN_JPEG_SUBSAMPLE_AUTO: default preset
|
|
|
|
* @VIPS_FOREIGN_JPEG_SUBSAMPLE_ON: always perform subsampling
|
2020-02-17 16:13:01 +01:00
|
|
|
* @VIPS_FOREIGN_JPEG_SUBSAMPLE_OFF: never perform subsampling
|
2020-02-18 18:37:56 +01:00
|
|
|
*
|
|
|
|
* Set jpeg subsampling mode.
|
2021-01-11 21:40:13 +01:00
|
|
|
*
|
|
|
|
* DEPRECATED: use #VipsForeignSubsample
|
2020-02-17 10:29:57 +01:00
|
|
|
*/
|
|
|
|
typedef enum {
|
2020-02-18 18:37:56 +01:00
|
|
|
VIPS_FOREIGN_JPEG_SUBSAMPLE_AUTO,
|
|
|
|
VIPS_FOREIGN_JPEG_SUBSAMPLE_ON,
|
|
|
|
VIPS_FOREIGN_JPEG_SUBSAMPLE_OFF,
|
|
|
|
VIPS_FOREIGN_JPEG_SUBSAMPLE_LAST
|
2020-02-17 10:29:57 +01:00
|
|
|
} VipsForeignJpegSubsample;
|
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-04 12:06:21 +01:00
|
|
|
int vips_jpegload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-04 12:06:21 +01:00
|
|
|
int vips_jpegload_buffer( void *buf, size_t len, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-08-14 14:36:12 +02:00
|
|
|
int vips_jpegload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-11-30 12:51:01 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-12-29 22:40:21 +01:00
|
|
|
int vips_jpegsave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-04 12:06:21 +01:00
|
|
|
int vips_jpegsave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-04 12:06:21 +01:00
|
|
|
int vips_jpegsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-04 12:06:21 +01:00
|
|
|
int vips_jpegsave_mime( VipsImage *in, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-11-30 12:51:01 +01:00
|
|
|
|
2016-04-22 19:54:19 +02:00
|
|
|
/**
|
|
|
|
* VipsForeignWebpPreset:
|
|
|
|
* @VIPS_FOREIGN_WEBP_PRESET_DEFAULT: default preset
|
2016-05-02 10:55:16 +02:00
|
|
|
* @VIPS_FOREIGN_WEBP_PRESET_PICTURE: digital picture, like portrait, inner shot
|
2016-04-22 19:54:19 +02:00
|
|
|
* @VIPS_FOREIGN_WEBP_PRESET_PHOTO: outdoor photograph, with natural lighting
|
2016-05-02 10:55:16 +02:00
|
|
|
* @VIPS_FOREIGN_WEBP_PRESET_DRAWING: hand or line drawing, with high-contrast details
|
2016-04-22 19:54:19 +02:00
|
|
|
* @VIPS_FOREIGN_WEBP_PRESET_ICON: small-sized colorful images
|
|
|
|
* @VIPS_FOREIGN_WEBP_PRESET_TEXT: text-like
|
|
|
|
*
|
|
|
|
* Tune lossy encoder settings for different image types.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIPS_FOREIGN_WEBP_PRESET_DEFAULT,
|
|
|
|
VIPS_FOREIGN_WEBP_PRESET_PICTURE,
|
|
|
|
VIPS_FOREIGN_WEBP_PRESET_PHOTO,
|
|
|
|
VIPS_FOREIGN_WEBP_PRESET_DRAWING,
|
|
|
|
VIPS_FOREIGN_WEBP_PRESET_ICON,
|
|
|
|
VIPS_FOREIGN_WEBP_PRESET_TEXT,
|
|
|
|
VIPS_FOREIGN_WEBP_PRESET_LAST
|
|
|
|
} VipsForeignWebpPreset;
|
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-12-29 22:40:21 +01:00
|
|
|
int vips_webpload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2013-08-06 11:01:50 +02:00
|
|
|
int vips_webpload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2013-08-06 17:18:30 +02:00
|
|
|
int vips_webpload_buffer( void *buf, size_t len, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2013-08-06 17:18:30 +02:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-12-29 22:40:21 +01:00
|
|
|
int vips_webpsave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2013-08-06 17:18:30 +02:00
|
|
|
int vips_webpsave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2013-08-06 17:18:30 +02:00
|
|
|
int vips_webpsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2013-08-06 17:18:30 +02:00
|
|
|
int vips_webpsave_mime( VipsImage *in, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2013-08-06 11:01:50 +02:00
|
|
|
|
2011-12-02 15:48:37 +01:00
|
|
|
/**
|
|
|
|
* VipsForeignTiffCompression:
|
|
|
|
* @VIPS_FOREIGN_TIFF_COMPRESSION_NONE: no compression
|
|
|
|
* @VIPS_FOREIGN_TIFF_COMPRESSION_JPEG: jpeg compression
|
|
|
|
* @VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE: deflate (zip) compression
|
|
|
|
* @VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS: packbits compression
|
|
|
|
* @VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4: fax4 compression
|
|
|
|
* @VIPS_FOREIGN_TIFF_COMPRESSION_LZW: LZW compression
|
2019-07-08 11:39:44 +02:00
|
|
|
* @VIPS_FOREIGN_TIFF_COMPRESSION_WEBP: WEBP compression
|
|
|
|
* @VIPS_FOREIGN_TIFF_COMPRESSION_ZSTD: ZSTD compression
|
2021-04-26 16:16:20 +02:00
|
|
|
* @VIPS_FOREIGN_TIFF_COMPRESSION_JP2K: JP2K compression
|
2011-12-02 15:48:37 +01:00
|
|
|
*
|
|
|
|
* The compression types supported by the tiff writer.
|
|
|
|
*
|
|
|
|
* Use @Q to set the jpeg compression level, default 75.
|
|
|
|
*
|
2020-04-22 12:32:21 +02:00
|
|
|
* Use @predictor to set the lzw or deflate prediction, default horizontal.
|
2019-07-08 11:39:44 +02:00
|
|
|
*
|
|
|
|
* Use @lossless to set WEBP lossless compression.
|
|
|
|
*
|
|
|
|
* Use @level to set webp and zstd compression level.
|
2011-12-02 15:48:37 +01:00
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIPS_FOREIGN_TIFF_COMPRESSION_NONE,
|
|
|
|
VIPS_FOREIGN_TIFF_COMPRESSION_JPEG,
|
|
|
|
VIPS_FOREIGN_TIFF_COMPRESSION_DEFLATE,
|
|
|
|
VIPS_FOREIGN_TIFF_COMPRESSION_PACKBITS,
|
|
|
|
VIPS_FOREIGN_TIFF_COMPRESSION_CCITTFAX4,
|
|
|
|
VIPS_FOREIGN_TIFF_COMPRESSION_LZW,
|
2019-07-08 11:39:44 +02:00
|
|
|
VIPS_FOREIGN_TIFF_COMPRESSION_WEBP,
|
|
|
|
VIPS_FOREIGN_TIFF_COMPRESSION_ZSTD,
|
2021-04-26 16:16:20 +02:00
|
|
|
VIPS_FOREIGN_TIFF_COMPRESSION_JP2K,
|
2011-12-02 15:48:37 +01:00
|
|
|
VIPS_FOREIGN_TIFF_COMPRESSION_LAST
|
|
|
|
} VipsForeignTiffCompression;
|
|
|
|
|
|
|
|
/**
|
2021-10-29 14:37:39 +02:00
|
|
|
* VipsForeignTiffPredictor:
|
2011-12-02 15:48:37 +01:00
|
|
|
* @VIPS_FOREIGN_TIFF_PREDICTOR_NONE: no prediction
|
2012-07-12 15:50:56 +02:00
|
|
|
* @VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL: horizontal differencing
|
2011-12-02 15:48:37 +01:00
|
|
|
* @VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT: float predictor
|
|
|
|
*
|
2011-12-04 12:06:21 +01:00
|
|
|
* The predictor can help deflate and lzw compression. The values are fixed by
|
|
|
|
* the tiff library.
|
2011-12-02 15:48:37 +01:00
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIPS_FOREIGN_TIFF_PREDICTOR_NONE = 1,
|
|
|
|
VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL = 2,
|
|
|
|
VIPS_FOREIGN_TIFF_PREDICTOR_FLOAT = 3,
|
|
|
|
VIPS_FOREIGN_TIFF_PREDICTOR_LAST
|
2011-12-02 19:21:55 +01:00
|
|
|
} VipsForeignTiffPredictor;
|
2011-12-02 15:48:37 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* VipsForeignTiffResunit:
|
|
|
|
* @VIPS_FOREIGN_TIFF_RESUNIT_CM: use centimeters
|
|
|
|
* @VIPS_FOREIGN_TIFF_RESUNIT_INCH: use inches
|
|
|
|
*
|
|
|
|
* Use inches or centimeters as the resolution unit for a tiff file.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIPS_FOREIGN_TIFF_RESUNIT_CM,
|
|
|
|
VIPS_FOREIGN_TIFF_RESUNIT_INCH,
|
|
|
|
VIPS_FOREIGN_TIFF_RESUNIT_LAST
|
|
|
|
} VipsForeignTiffResunit;
|
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-06 14:58:05 +01:00
|
|
|
int vips_tiffload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2014-04-19 17:14:54 +02:00
|
|
|
int vips_tiffload_buffer( void *buf, size_t len, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-12-29 22:40:21 +01:00
|
|
|
int vips_tiffload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-04 12:06:21 +01:00
|
|
|
int vips_tiffsave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2017-04-04 11:17:05 +02:00
|
|
|
int vips_tiffsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-05-20 19:38:17 +02:00
|
|
|
VIPS_API
|
|
|
|
int vips_tiffsave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-12-02 15:48:37 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-13 11:20:22 +01:00
|
|
|
int vips_openexrload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-12-13 11:20:22 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-13 18:50:55 +01:00
|
|
|
int vips_fitsload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-13 18:50:55 +01:00
|
|
|
int vips_fitssave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-12-13 18:50:55 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-14 19:02:46 +01:00
|
|
|
int vips_analyzeload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-12-14 19:02:46 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-14 23:51:14 +01:00
|
|
|
int vips_rawload( const char *filename, VipsImage **out,
|
|
|
|
int width, int height, int bands, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-15 11:59:05 +01:00
|
|
|
int vips_rawsave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-20 19:20:37 +01:00
|
|
|
int vips_rawsave_fd( VipsImage *in, int fd, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-12-14 23:51:14 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-16 16:24:35 +01:00
|
|
|
int vips_csvload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-02-21 17:39:40 +01:00
|
|
|
int vips_csvload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-16 16:24:35 +01:00
|
|
|
int vips_csvsave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-02-21 18:57:28 +01:00
|
|
|
int vips_csvsave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-12-16 16:24:35 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2013-07-02 13:08:46 +02:00
|
|
|
int vips_matrixload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-02-22 16:02:12 +01:00
|
|
|
int vips_matrixload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2013-07-02 13:08:46 +02:00
|
|
|
int vips_matrixsave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-02-22 18:55:04 +01:00
|
|
|
int vips_matrixsave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2013-10-25 13:02:02 +02:00
|
|
|
int vips_matrixprint( VipsImage *in, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2013-07-02 13:08:46 +02:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-19 09:58:04 +01:00
|
|
|
int vips_magickload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2015-02-14 18:09:31 +01:00
|
|
|
int vips_magickload_buffer( void *buf, size_t len, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2017-12-23 18:27:26 +01:00
|
|
|
int vips_magicksave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2017-12-23 18:27:26 +01:00
|
|
|
int vips_magicksave_buffer( VipsImage *in, void **buf, size_t *len, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-12-19 09:58:04 +01:00
|
|
|
|
2014-10-25 16:42:10 +02:00
|
|
|
/**
|
|
|
|
* VipsForeignPngFilter:
|
2014-10-27 12:40:43 +01:00
|
|
|
* @VIPS_FOREIGN_PNG_FILTER_NONE: no filtering
|
|
|
|
* @VIPS_FOREIGN_PNG_FILTER_SUB: difference to the left
|
|
|
|
* @VIPS_FOREIGN_PNG_FILTER_UP: difference up
|
|
|
|
* @VIPS_FOREIGN_PNG_FILTER_AVG: average of left and up
|
|
|
|
* @VIPS_FOREIGN_PNG_FILTER_PAETH: pick best neighbor predictor automatically
|
|
|
|
* @VIPS_FOREIGN_PNG_FILTER_ALL: adaptive
|
2014-10-25 16:42:10 +02:00
|
|
|
*
|
|
|
|
* http://www.w3.org/TR/PNG-Filters.html
|
|
|
|
* The values mirror those of png.h in libpng.
|
|
|
|
*/
|
|
|
|
typedef enum /*< flags >*/ {
|
|
|
|
VIPS_FOREIGN_PNG_FILTER_NONE = 0x08,
|
|
|
|
VIPS_FOREIGN_PNG_FILTER_SUB = 0x10,
|
|
|
|
VIPS_FOREIGN_PNG_FILTER_UP = 0x20,
|
|
|
|
VIPS_FOREIGN_PNG_FILTER_AVG = 0x40,
|
|
|
|
VIPS_FOREIGN_PNG_FILTER_PAETH = 0x80,
|
2018-05-02 21:50:08 +02:00
|
|
|
VIPS_FOREIGN_PNG_FILTER_ALL = 0xF8
|
2014-10-25 16:42:10 +02:00
|
|
|
} VipsForeignPngFilter;
|
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-12-29 22:40:21 +01:00
|
|
|
int vips_pngload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-19 22:40:08 +01:00
|
|
|
int vips_pngload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2013-06-16 23:51:28 +02:00
|
|
|
int vips_pngload_buffer( void *buf, size_t len, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-12-29 22:40:21 +01:00
|
|
|
int vips_pngsave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-19 22:40:08 +01:00
|
|
|
int vips_pngsave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-19 22:40:08 +01:00
|
|
|
int vips_pngsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-12-19 22:40:08 +01:00
|
|
|
|
2021-10-28 19:57:24 +02:00
|
|
|
/**
|
|
|
|
* VipsForeignPpmFormat:
|
2021-10-29 14:37:39 +02:00
|
|
|
* @VIPS_FOREIGN_PPM_FORMAT_PBM: portable bitmap
|
|
|
|
* @VIPS_FOREIGN_PPM_FORMAT_PGM: portable greymap
|
|
|
|
* @VIPS_FOREIGN_PPM_FORMAT_PPM: portable pixmap
|
|
|
|
* @VIPS_FOREIGN_PPM_FORMAT_PFM: portable float map
|
2022-08-30 13:31:47 +02:00
|
|
|
* @VIPS_FOREIGN_PPM_FORMAT_PNM: portable anymap
|
2021-10-28 19:57:24 +02:00
|
|
|
*
|
|
|
|
* The netpbm file format to save as.
|
|
|
|
*
|
2021-10-29 14:37:39 +02:00
|
|
|
* #VIPS_FOREIGN_PPM_FORMAT_PBM images are single bit.
|
2021-10-28 19:57:24 +02:00
|
|
|
*
|
2021-10-29 14:37:39 +02:00
|
|
|
* #VIPS_FOREIGN_PPM_FORMAT_PGM images are 8, 16, or 32-bits, one band.
|
2021-10-28 19:57:24 +02:00
|
|
|
*
|
2021-10-29 14:37:39 +02:00
|
|
|
* #VIPS_FOREIGN_PPM_FORMAT_PPM images are 8, 16, or 32-bits, three bands.
|
2021-10-28 19:57:24 +02:00
|
|
|
*
|
2021-10-29 14:37:39 +02:00
|
|
|
* #VIPS_FOREIGN_PPM_FORMAT_PFM images are 32-bit float pixels.
|
2022-08-30 13:31:47 +02:00
|
|
|
*
|
|
|
|
* #VIPS_FOREIGN_PPM_FORMAT_PNM images are anymap images -- the image format
|
|
|
|
* is used to pick the saver.
|
|
|
|
*
|
2021-10-28 19:57:24 +02:00
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIPS_FOREIGN_PPM_FORMAT_PBM,
|
|
|
|
VIPS_FOREIGN_PPM_FORMAT_PGM,
|
|
|
|
VIPS_FOREIGN_PPM_FORMAT_PPM,
|
|
|
|
VIPS_FOREIGN_PPM_FORMAT_PFM,
|
2022-08-30 13:31:47 +02:00
|
|
|
VIPS_FOREIGN_PPM_FORMAT_PNM,
|
2021-10-28 19:57:24 +02:00
|
|
|
VIPS_FOREIGN_PPM_FORMAT_LAST
|
|
|
|
} VipsForeignPpmFormat;
|
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-20 10:37:07 +01:00
|
|
|
int vips_ppmload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-06-27 16:23:18 +02:00
|
|
|
int vips_ppmload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-20 10:37:07 +01:00
|
|
|
int vips_ppmsave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-06-27 16:23:18 +02:00
|
|
|
int vips_ppmsave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-12-20 10:37:07 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-20 11:10:53 +01:00
|
|
|
int vips_matload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-12-20 11:10:53 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-12-29 22:40:21 +01:00
|
|
|
int vips_radload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-20 15:57:05 +01:00
|
|
|
int vips_radload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-11-08 14:28:18 +01:00
|
|
|
int vips_radload_buffer( void *buf, size_t len, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2011-12-20 15:57:05 +01:00
|
|
|
int vips_radsave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2016-05-19 22:32:17 +02:00
|
|
|
int vips_radsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-12-29 22:40:21 +01:00
|
|
|
int vips_radsave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2011-12-20 15:57:05 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2016-02-08 21:25:03 +01:00
|
|
|
int vips_pdfload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2016-02-08 21:25:03 +01:00
|
|
|
int vips_pdfload_buffer( void *buf, size_t len, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-03-11 19:15:15 +01:00
|
|
|
int vips_pdfload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2016-02-08 11:05:37 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2016-02-09 12:01:12 +01:00
|
|
|
int vips_svgload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2016-02-09 12:01:12 +01:00
|
|
|
int vips_svgload_buffer( void *buf, size_t len, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-06-28 12:45:56 +02:00
|
|
|
int vips_svgload_string( const char *str, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-08-14 14:36:12 +02:00
|
|
|
int vips_svgload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2016-02-09 12:01:12 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2016-02-12 11:53:04 +01:00
|
|
|
int vips_gifload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2016-02-12 11:53:04 +01:00
|
|
|
int vips_gifload_buffer( void *buf, size_t len, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-02-06 16:36:13 +01:00
|
|
|
int vips_gifload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2016-02-12 11:53:04 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-08-22 19:11:41 +02:00
|
|
|
int vips_gifsave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-08-22 19:11:41 +02:00
|
|
|
int vips_gifsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-08-22 19:11:41 +02:00
|
|
|
int vips_gifsave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2021-08-22 19:11:41 +02:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-01-20 12:33:12 +01:00
|
|
|
int vips_heifload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-01-29 02:48:10 +01:00
|
|
|
int vips_heifload_buffer( void *buf, size_t len, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-03-15 12:45:56 +01:00
|
|
|
int vips_heifload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-01-29 11:27:00 +01:00
|
|
|
int vips_heifsave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2019-01-29 18:21:13 +01:00
|
|
|
int vips_heifsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2020-03-15 19:17:08 +01:00
|
|
|
int vips_heifsave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2019-01-20 12:33:12 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2018-06-29 18:31:17 +02:00
|
|
|
int vips_niftiload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-02-12 16:29:58 +01:00
|
|
|
int vips_niftiload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2018-07-20 19:20:26 +02:00
|
|
|
int vips_niftisave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2018-06-29 18:31:17 +02:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-03-17 12:31:25 +01:00
|
|
|
int vips_jp2kload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-03-20 13:16:10 +01:00
|
|
|
int vips_jp2kload_buffer( void *buf, size_t len, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-03-17 12:31:25 +01:00
|
|
|
int vips_jp2kload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-03-19 12:49:07 +01:00
|
|
|
int vips_jp2ksave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-03-20 15:22:06 +01:00
|
|
|
int vips_jp2ksave_buffer( VipsImage *in, void **buf, size_t *len, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-03-19 12:49:07 +01:00
|
|
|
int vips_jp2ksave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2021-03-17 12:31:25 +01:00
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-04-01 10:21:41 +02:00
|
|
|
int vips_jxlload_source( VipsSource *source, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-04-01 10:21:41 +02:00
|
|
|
int vips_jxlload_buffer( void *buf, size_t len, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-04-01 10:21:41 +02:00
|
|
|
int vips_jxlload( const char *filename, VipsImage **out, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-07-19 01:22:46 +02:00
|
|
|
int vips_jxlsave( VipsImage *in, const char *filename, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-07-19 01:22:46 +02:00
|
|
|
int vips_jxlsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2021-07-19 01:22:46 +02:00
|
|
|
int vips_jxlsave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2021-04-01 10:21:41 +02:00
|
|
|
|
2012-10-03 15:26:59 +02:00
|
|
|
/**
|
|
|
|
* VipsForeignDzLayout:
|
|
|
|
* @VIPS_FOREIGN_DZ_LAYOUT_DZ: use DeepZoom directory layout
|
|
|
|
* @VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY: use Zoomify directory layout
|
|
|
|
* @VIPS_FOREIGN_DZ_LAYOUT_GOOGLE: use Google maps directory layout
|
2021-10-19 15:18:40 +02:00
|
|
|
* @VIPS_FOREIGN_DZ_LAYOUT_IIIF: use IIIF v2 directory layout
|
|
|
|
* @VIPS_FOREIGN_DZ_LAYOUT_IIIF3: use IIIF v3 directory layout
|
2012-10-03 15:26:59 +02:00
|
|
|
*
|
2012-11-01 19:11:46 +01:00
|
|
|
* What directory layout and metadata standard to use.
|
2012-10-03 15:26:59 +02:00
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIPS_FOREIGN_DZ_LAYOUT_DZ,
|
|
|
|
VIPS_FOREIGN_DZ_LAYOUT_ZOOMIFY,
|
|
|
|
VIPS_FOREIGN_DZ_LAYOUT_GOOGLE,
|
2019-11-09 21:40:39 +01:00
|
|
|
VIPS_FOREIGN_DZ_LAYOUT_IIIF,
|
2021-10-19 15:18:40 +02:00
|
|
|
VIPS_FOREIGN_DZ_LAYOUT_IIIF3,
|
2012-10-03 15:26:59 +02:00
|
|
|
VIPS_FOREIGN_DZ_LAYOUT_LAST
|
|
|
|
} VipsForeignDzLayout;
|
|
|
|
|
2012-11-01 19:11:46 +01:00
|
|
|
/**
|
|
|
|
* VipsForeignDzDepth:
|
2015-01-07 15:22:13 +01:00
|
|
|
* @VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL: create layers down to 1x1 pixel
|
|
|
|
* @VIPS_FOREIGN_DZ_DEPTH_ONETILE: create layers down to 1x1 tile
|
|
|
|
* @VIPS_FOREIGN_DZ_DEPTH_ONE: only create a single layer
|
2012-11-01 19:11:46 +01:00
|
|
|
*
|
|
|
|
* How many pyramid layers to create.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
2015-01-07 15:22:13 +01:00
|
|
|
VIPS_FOREIGN_DZ_DEPTH_ONEPIXEL,
|
|
|
|
VIPS_FOREIGN_DZ_DEPTH_ONETILE,
|
|
|
|
VIPS_FOREIGN_DZ_DEPTH_ONE,
|
2012-11-01 19:11:46 +01:00
|
|
|
VIPS_FOREIGN_DZ_DEPTH_LAST
|
|
|
|
} VipsForeignDzDepth;
|
|
|
|
|
2014-04-25 11:26:23 +02:00
|
|
|
/**
|
|
|
|
* VipsForeignDzContainer:
|
|
|
|
* @VIPS_FOREIGN_DZ_CONTAINER_FS: write tiles to the filesystem
|
|
|
|
* @VIPS_FOREIGN_DZ_CONTAINER_ZIP: write tiles to a zip file
|
2018-01-27 13:52:22 +01:00
|
|
|
* @VIPS_FOREIGN_DZ_CONTAINER_SZI: write to a szi file
|
2014-04-25 11:26:23 +02:00
|
|
|
*
|
|
|
|
* How many pyramid layers to create.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIPS_FOREIGN_DZ_CONTAINER_FS,
|
|
|
|
VIPS_FOREIGN_DZ_CONTAINER_ZIP,
|
2018-01-27 13:52:22 +01:00
|
|
|
VIPS_FOREIGN_DZ_CONTAINER_SZI,
|
2014-04-25 11:26:23 +02:00
|
|
|
VIPS_FOREIGN_DZ_CONTAINER_LAST
|
|
|
|
} VipsForeignDzContainer;
|
|
|
|
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2014-09-03 15:32:55 +02:00
|
|
|
int vips_dzsave( VipsImage *in, const char *name, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-04-16 11:58:55 +02:00
|
|
|
VIPS_API
|
2022-02-27 14:42:17 +01:00
|
|
|
int vips_dzsave_buffer( VipsImage *in, void **buf, size_t *len, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2022-05-20 19:38:46 +02:00
|
|
|
VIPS_API
|
|
|
|
int vips_dzsave_target( VipsImage *in, VipsTarget *target, ... )
|
2022-09-23 15:37:35 +02:00
|
|
|
G_GNUC_NULL_TERMINATED;
|
2012-08-07 14:29:03 +02:00
|
|
|
|
2019-07-03 14:07:55 +02:00
|
|
|
/**
|
|
|
|
* VipsForeignHeifCompression:
|
|
|
|
* @VIPS_FOREIGN_HEIF_COMPRESSION_HEVC: x265
|
|
|
|
* @VIPS_FOREIGN_HEIF_COMPRESSION_AVC: x264
|
|
|
|
* @VIPS_FOREIGN_HEIF_COMPRESSION_JPEG: jpeg
|
|
|
|
* @VIPS_FOREIGN_HEIF_COMPRESSION_AV1: aom
|
|
|
|
*
|
2019-08-09 16:22:56 +02:00
|
|
|
* The compression format to use inside a HEIF container.
|
|
|
|
*
|
|
|
|
* This is assumed to use the same numbering as %heif_compression_format.
|
2019-07-03 14:07:55 +02:00
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
VIPS_FOREIGN_HEIF_COMPRESSION_HEVC = 1,
|
|
|
|
VIPS_FOREIGN_HEIF_COMPRESSION_AVC = 2,
|
|
|
|
VIPS_FOREIGN_HEIF_COMPRESSION_JPEG = 3,
|
|
|
|
VIPS_FOREIGN_HEIF_COMPRESSION_AV1 = 4,
|
|
|
|
VIPS_FOREIGN_HEIF_COMPRESSION_LAST
|
|
|
|
} VipsForeignHeifCompression;
|
|
|
|
|
2011-11-29 12:43:08 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /*__cplusplus*/
|
|
|
|
|
|
|
|
#endif /*VIPS_FOREIGN_H*/
|