add C API and docs for popplerload

This commit is contained in:
John Cupitt 2016-02-08 10:05:37 +00:00
parent a7192ce8c6
commit 69c2fe00f7
3 changed files with 41 additions and 1 deletions

View File

@ -2,7 +2,7 @@
- add vips_reduce*() ... a fast path for bicubic downsize
- vips_resize() and vips_similarity use it when they can
- bicubic is better on 32-bit int images
- add popplerload
- add popplerload for PDF rendering
27/1/16 started 8.2.3
- fix a crash with SPARC byte-order labq vips images

View File

@ -2846,3 +2846,40 @@ vips_matload( const char *filename, VipsImage **out, ... )
return( result );
}
/**
* vips_popplerload:
* @filename: file to load
* @out: output image
* @...: %NULL-terminated list of optional named arguments
*
* Optional arguments:
*
* @page: %gint, load this page, numbered from zero
* @dpi: %gdouble, render at this DPI
*
* Render a PDF file into a VIPS image.
*
* Use @page to select a page to render, numbering from zero.
*
* Use @dpi to set the rendering resolution. The default is 72.
*
* This function only reads the image header and does not render any pixel
* data. Rendering only occurs when pixels are accessed.
*
* See also: vips_image_new_from_file().
*
* Returns: 0 on success, -1 on error.
*/
int
vips_popplerload( const char *filename, VipsImage **out, ... )
{
va_list ap;
int result;
va_start( ap, out );
result = vips_call_split( "popplerload", ap, filename, out );
va_end( ap );
return( result );
}

View File

@ -490,6 +490,9 @@ int vips_radload( const char *filename, VipsImage **out, ... )
int vips_radsave( VipsImage *in, const char *filename, ... )
__attribute__((sentinel));
int vips_popplerload( const char *filename, VipsImage **out, ... )
__attribute__((sentinel));
/**
* VipsForeignDzLayout:
* @VIPS_FOREIGN_DZ_LAYOUT_DZ: use DeepZoom directory layout