revise help text for loaders
Hopefully to make it clearer and more consistent. See https://github.com/libvips/libvips/discussions/2982
This commit is contained in:
parent
1482753c90
commit
d27dfbe55d
@ -1065,14 +1065,14 @@ vips_foreign_load_heif_class_init( VipsForeignLoadHeifClass *class )
|
|||||||
|
|
||||||
VIPS_ARG_INT( class, "page", 2,
|
VIPS_ARG_INT( class, "page", 2,
|
||||||
_( "Page" ),
|
_( "Page" ),
|
||||||
_( "Load this page from the file" ),
|
_( "First page to load" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadHeif, page ),
|
G_STRUCT_OFFSET( VipsForeignLoadHeif, page ),
|
||||||
0, 100000, 0 );
|
0, 100000, 0 );
|
||||||
|
|
||||||
VIPS_ARG_INT( class, "n", 3,
|
VIPS_ARG_INT( class, "n", 3,
|
||||||
_( "n" ),
|
_( "n" ),
|
||||||
_( "Load this many pages" ),
|
_( "Number of pages to load, -1 for all" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadHeif, n ),
|
G_STRUCT_OFFSET( VipsForeignLoadHeif, n ),
|
||||||
-1, 100000, 1 );
|
-1, 100000, 1 );
|
||||||
|
@ -130,13 +130,6 @@ vips_foreign_load_magick_class_init( VipsForeignLoadMagickClass *class )
|
|||||||
vips_foreign_load_magick_get_flags_filename;
|
vips_foreign_load_magick_get_flags_filename;
|
||||||
load_class->get_flags = vips_foreign_load_magick_get_flags;
|
load_class->get_flags = vips_foreign_load_magick_get_flags;
|
||||||
|
|
||||||
VIPS_ARG_BOOL( class, "all_frames", 20,
|
|
||||||
_( "All frames" ),
|
|
||||||
_( "Read all frames from an image" ),
|
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED,
|
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadMagick, all_frames ),
|
|
||||||
FALSE );
|
|
||||||
|
|
||||||
VIPS_ARG_STRING( class, "density", 21,
|
VIPS_ARG_STRING( class, "density", 21,
|
||||||
_( "Density" ),
|
_( "Density" ),
|
||||||
_( "Canvas resolution for rendering vector formats like SVG" ),
|
_( "Canvas resolution for rendering vector formats like SVG" ),
|
||||||
@ -146,17 +139,25 @@ vips_foreign_load_magick_class_init( VipsForeignLoadMagickClass *class )
|
|||||||
|
|
||||||
VIPS_ARG_INT( class, "page", 22,
|
VIPS_ARG_INT( class, "page", 22,
|
||||||
_( "Page" ),
|
_( "Page" ),
|
||||||
_( "Load this page from the file" ),
|
_( "First page to load" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadMagick, page ),
|
G_STRUCT_OFFSET( VipsForeignLoadMagick, page ),
|
||||||
0, 100000, 0 );
|
0, 100000, 0 );
|
||||||
|
|
||||||
VIPS_ARG_INT( class, "n", 23,
|
VIPS_ARG_INT( class, "n", 23,
|
||||||
_( "n" ),
|
_( "n" ),
|
||||||
_( "Load this many pages" ),
|
_( "Number of pages to load, -1 for all" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadMagick, n ),
|
G_STRUCT_OFFSET( VipsForeignLoadMagick, n ),
|
||||||
-1, 100000, 1 );
|
-1, 100000, 1 );
|
||||||
|
|
||||||
|
VIPS_ARG_BOOL( class, "all_frames", 20,
|
||||||
|
_( "All frames" ),
|
||||||
|
_( "Read all frames from an image" ),
|
||||||
|
VIPS_ARGUMENT_OPTIONAL_INPUT | VIPS_ARGUMENT_DEPRECATED,
|
||||||
|
G_STRUCT_OFFSET( VipsForeignLoadMagick, all_frames ),
|
||||||
|
FALSE );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -380,14 +380,14 @@ vips_foreign_load_magick7_class_init( VipsForeignLoadMagick7Class *class )
|
|||||||
|
|
||||||
VIPS_ARG_INT( class, "page", 21,
|
VIPS_ARG_INT( class, "page", 21,
|
||||||
_( "Page" ),
|
_( "Page" ),
|
||||||
_( "Load this page from the file" ),
|
_( "First page to load" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadMagick7, page ),
|
G_STRUCT_OFFSET( VipsForeignLoadMagick7, page ),
|
||||||
0, 100000, 0 );
|
0, 100000, 0 );
|
||||||
|
|
||||||
VIPS_ARG_INT( class, "n", 22,
|
VIPS_ARG_INT( class, "n", 22,
|
||||||
_( "n" ),
|
_( "n" ),
|
||||||
_( "Load this many pages" ),
|
_( "Number of pages to load, -1 for all" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadMagick7, n ),
|
G_STRUCT_OFFSET( VipsForeignLoadMagick7, n ),
|
||||||
-1, 100000, 1 );
|
-1, 100000, 1 );
|
||||||
@ -868,7 +868,8 @@ G_DEFINE_TYPE( VipsForeignLoadMagick7Buffer, vips_foreign_load_magick7_buffer,
|
|||||||
static gboolean
|
static gboolean
|
||||||
vips_foreign_load_magick7_buffer_is_a_buffer( const void *buf, size_t len )
|
vips_foreign_load_magick7_buffer_is_a_buffer( const void *buf, size_t len )
|
||||||
{
|
{
|
||||||
return( len > 10 && magick_ismagick( (const unsigned char *) buf, len ) );
|
return( len > 10 &&
|
||||||
|
magick_ismagick( (const unsigned char *) buf, len ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -542,14 +542,14 @@ vips_foreign_load_nsgif_class_init( VipsForeignLoadNsgifClass *class )
|
|||||||
|
|
||||||
VIPS_ARG_INT( class, "page", 10,
|
VIPS_ARG_INT( class, "page", 10,
|
||||||
_( "Page" ),
|
_( "Page" ),
|
||||||
_( "Load this page from the file" ),
|
_( "First page to load" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadNsgif, page ),
|
G_STRUCT_OFFSET( VipsForeignLoadNsgif, page ),
|
||||||
0, 100000, 0 );
|
0, 100000, 0 );
|
||||||
|
|
||||||
VIPS_ARG_INT( class, "n", 6,
|
VIPS_ARG_INT( class, "n", 6,
|
||||||
_( "n" ),
|
_( "n" ),
|
||||||
_( "Load this many pages" ),
|
_( "Number of pages to load, -1 for all" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadNsgif, n ),
|
G_STRUCT_OFFSET( VipsForeignLoadNsgif, n ),
|
||||||
-1, 100000, 1 );
|
-1, 100000, 1 );
|
||||||
|
@ -689,42 +689,42 @@ vips_foreign_load_pdf_class_init( VipsForeignLoadPdfClass *class )
|
|||||||
|
|
||||||
VIPS_ARG_INT( class, "page", 10,
|
VIPS_ARG_INT( class, "page", 10,
|
||||||
_( "Page" ),
|
_( "Page" ),
|
||||||
_( "Load this page from the file" ),
|
_( "First page to load" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadPdf, page_no ),
|
G_STRUCT_OFFSET( VipsForeignLoadPdf, page_no ),
|
||||||
0, 100000, 0 );
|
0, 100000, 0 );
|
||||||
|
|
||||||
VIPS_ARG_INT( class, "n", 11,
|
VIPS_ARG_INT( class, "n", 11,
|
||||||
_( "n" ),
|
_( "n" ),
|
||||||
_( "Load this many pages" ),
|
_( "Number of pages to load, -1 for all" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadPdf, n ),
|
G_STRUCT_OFFSET( VipsForeignLoadPdf, n ),
|
||||||
-1, 100000, 1 );
|
-1, 100000, 1 );
|
||||||
|
|
||||||
VIPS_ARG_DOUBLE( class, "dpi", 12,
|
VIPS_ARG_DOUBLE( class, "dpi", 12,
|
||||||
_( "DPI" ),
|
_( "DPI" ),
|
||||||
_( "Render at this DPI" ),
|
_( "DPI to render at" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadPdf, dpi ),
|
G_STRUCT_OFFSET( VipsForeignLoadPdf, dpi ),
|
||||||
0.001, 100000.0, 72.0 );
|
0.001, 100000.0, 72.0 );
|
||||||
|
|
||||||
VIPS_ARG_DOUBLE( class, "scale", 13,
|
VIPS_ARG_DOUBLE( class, "scale", 13,
|
||||||
_( "Scale" ),
|
_( "Scale" ),
|
||||||
_( "Scale output by this factor" ),
|
_( "Factor to scale by" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadPdf, scale ),
|
G_STRUCT_OFFSET( VipsForeignLoadPdf, scale ),
|
||||||
0.001, 100000.0, 1.0 );
|
0.001, 100000.0, 1.0 );
|
||||||
|
|
||||||
VIPS_ARG_BOXED( class, "background", 14,
|
VIPS_ARG_BOXED( class, "background", 14,
|
||||||
_( "Background" ),
|
_( "Background" ),
|
||||||
_( "Background value" ),
|
_( "Background colour" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadPdf, background ),
|
G_STRUCT_OFFSET( VipsForeignLoadPdf, background ),
|
||||||
VIPS_TYPE_ARRAY_DOUBLE );
|
VIPS_TYPE_ARRAY_DOUBLE );
|
||||||
|
|
||||||
VIPS_ARG_STRING( class, "password", 25,
|
VIPS_ARG_STRING( class, "password", 25,
|
||||||
_( "Password" ),
|
_( "Password" ),
|
||||||
_( "Decrypt with this password" ),
|
_( "Password to decrypt with" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadPdf, password ),
|
G_STRUCT_OFFSET( VipsForeignLoadPdf, password ),
|
||||||
NULL );
|
NULL );
|
||||||
|
@ -542,42 +542,42 @@ vips_foreign_load_pdf_class_init( VipsForeignLoadPdfClass *class )
|
|||||||
|
|
||||||
VIPS_ARG_INT( class, "page", 20,
|
VIPS_ARG_INT( class, "page", 20,
|
||||||
_( "Page" ),
|
_( "Page" ),
|
||||||
_( "Load this page from the file" ),
|
_( "First page to load" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadPdf, page_no ),
|
G_STRUCT_OFFSET( VipsForeignLoadPdf, page_no ),
|
||||||
0, 100000, 0 );
|
0, 100000, 0 );
|
||||||
|
|
||||||
VIPS_ARG_INT( class, "n", 21,
|
VIPS_ARG_INT( class, "n", 21,
|
||||||
_( "n" ),
|
_( "n" ),
|
||||||
_( "Load this many pages" ),
|
_( "Number of pages to load, -1 for all" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadPdf, n ),
|
G_STRUCT_OFFSET( VipsForeignLoadPdf, n ),
|
||||||
-1, 100000, 1 );
|
-1, 100000, 1 );
|
||||||
|
|
||||||
VIPS_ARG_DOUBLE( class, "dpi", 22,
|
VIPS_ARG_DOUBLE( class, "dpi", 22,
|
||||||
_( "DPI" ),
|
_( "DPI" ),
|
||||||
_( "Render at this DPI" ),
|
_( "DPI to render at" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadPdf, dpi ),
|
G_STRUCT_OFFSET( VipsForeignLoadPdf, dpi ),
|
||||||
0.001, 100000.0, 72.0 );
|
0.001, 100000.0, 72.0 );
|
||||||
|
|
||||||
VIPS_ARG_DOUBLE( class, "scale", 23,
|
VIPS_ARG_DOUBLE( class, "scale", 23,
|
||||||
_( "Scale" ),
|
_( "Scale" ),
|
||||||
_( "Scale output by this factor" ),
|
_( "Factor to scale by" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadPdf, scale ),
|
G_STRUCT_OFFSET( VipsForeignLoadPdf, scale ),
|
||||||
0.001, 100000.0, 1.0 );
|
0.001, 100000.0, 1.0 );
|
||||||
|
|
||||||
VIPS_ARG_BOXED( class, "background", 24,
|
VIPS_ARG_BOXED( class, "background", 24,
|
||||||
_( "Background" ),
|
_( "Background" ),
|
||||||
_( "Background value" ),
|
_( "Background colour" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadPdf, background ),
|
G_STRUCT_OFFSET( VipsForeignLoadPdf, background ),
|
||||||
VIPS_TYPE_ARRAY_DOUBLE );
|
VIPS_TYPE_ARRAY_DOUBLE );
|
||||||
|
|
||||||
VIPS_ARG_STRING( class, "password", 25,
|
VIPS_ARG_STRING( class, "password", 25,
|
||||||
_( "Password" ),
|
_( "Password" ),
|
||||||
_( "Decrypt with this password" ),
|
_( "Password to decrypt with" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadPdf, password ),
|
G_STRUCT_OFFSET( VipsForeignLoadPdf, password ),
|
||||||
NULL );
|
NULL );
|
||||||
|
@ -191,14 +191,14 @@ vips_foreign_load_tiff_class_init( VipsForeignLoadTiffClass *class )
|
|||||||
|
|
||||||
VIPS_ARG_INT( class, "page", 20,
|
VIPS_ARG_INT( class, "page", 20,
|
||||||
_( "Page" ),
|
_( "Page" ),
|
||||||
_( "Load this page from the image" ),
|
_( "First page to load" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadTiff, page ),
|
G_STRUCT_OFFSET( VipsForeignLoadTiff, page ),
|
||||||
0, 100000, 0 );
|
0, 100000, 0 );
|
||||||
|
|
||||||
VIPS_ARG_INT( class, "n", 21,
|
VIPS_ARG_INT( class, "n", 21,
|
||||||
_( "n" ),
|
_( "n" ),
|
||||||
_( "Load this many pages" ),
|
_( "Number of pages to load, -1 for all" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadTiff, n ),
|
G_STRUCT_OFFSET( VipsForeignLoadTiff, n ),
|
||||||
-1, 100000, 1 );
|
-1, 100000, 1 );
|
||||||
@ -212,7 +212,7 @@ vips_foreign_load_tiff_class_init( VipsForeignLoadTiffClass *class )
|
|||||||
|
|
||||||
VIPS_ARG_INT( class, "subifd", 21,
|
VIPS_ARG_INT( class, "subifd", 21,
|
||||||
_( "subifd" ),
|
_( "subifd" ),
|
||||||
_( "Select subifd index" ),
|
_( "Subifd index" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadTiff, subifd ),
|
G_STRUCT_OFFSET( VipsForeignLoadTiff, subifd ),
|
||||||
-1, 100000, -1 );
|
-1, 100000, -1 );
|
||||||
|
@ -178,28 +178,25 @@ vips_foreign_load_webp_class_init( VipsForeignLoadWebpClass *class )
|
|||||||
|
|
||||||
VIPS_ARG_INT( class, "page", 20,
|
VIPS_ARG_INT( class, "page", 20,
|
||||||
_( "Page" ),
|
_( "Page" ),
|
||||||
_( "Load this page from the file" ),
|
_( "First page to load" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadWebp, page ),
|
G_STRUCT_OFFSET( VipsForeignLoadWebp, page ),
|
||||||
0, 100000, 0 );
|
0, 100000, 0 );
|
||||||
|
|
||||||
VIPS_ARG_INT( class, "n", 21,
|
VIPS_ARG_INT( class, "n", 21,
|
||||||
_( "n" ),
|
_( "n" ),
|
||||||
_( "Load this many pages" ),
|
_( "Number of pages to load, -1 for all" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadWebp, n ),
|
G_STRUCT_OFFSET( VipsForeignLoadWebp, n ),
|
||||||
-1, 100000, 1 );
|
-1, 100000, 1 );
|
||||||
|
|
||||||
VIPS_ARG_DOUBLE( class, "scale", 22,
|
VIPS_ARG_DOUBLE( class, "scale", 22,
|
||||||
_( "Scale" ),
|
_( "Scale" ),
|
||||||
_( "Scale factor on load" ),
|
_( "Factor to scale by" ),
|
||||||
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
VIPS_ARGUMENT_OPTIONAL_INPUT,
|
||||||
G_STRUCT_OFFSET( VipsForeignLoadWebp, scale ),
|
G_STRUCT_OFFSET( VipsForeignLoadWebp, scale ),
|
||||||
0.0, 1024.0, 1.0 );
|
0.0, 1024.0, 1.0 );
|
||||||
|
|
||||||
/* Old and deprecated scaling API. A float param lets do
|
|
||||||
* shrink-on-load for thumbnail faster and more accurately.
|
|
||||||
*/
|
|
||||||
VIPS_ARG_INT( class, "shrink", 23,
|
VIPS_ARG_INT( class, "shrink", 23,
|
||||||
_( "Shrink" ),
|
_( "Shrink" ),
|
||||||
_( "Shrink factor on load" ),
|
_( "Shrink factor on load" ),
|
||||||
|
Loading…
Reference in New Issue
Block a user