mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-16 02:45:54 -07:00
Adding GIF, PDF and SVG support (libvips 8.3)
This commit is contained in:
parent
308a36afc6
commit
6b76a33673
15 changed files with 843 additions and 11 deletions
11
vips.h
11
vips.h
|
|
@ -30,6 +30,9 @@ enum types {
|
|||
WEBP,
|
||||
PNG,
|
||||
TIFF,
|
||||
GIF,
|
||||
PDF,
|
||||
SVG,
|
||||
MAGICK
|
||||
};
|
||||
|
||||
|
|
@ -266,6 +269,14 @@ vips_init_image (void *buf, size_t len, int imageType, VipsImage **out) {
|
|||
} else if (imageType == TIFF) {
|
||||
code = vips_tiffload_buffer(buf, len, out, "access", VIPS_ACCESS_RANDOM, NULL);
|
||||
#if (VIPS_MAJOR_VERSION >= 8)
|
||||
#if (VIPS_MINOR_VERSION >= 3)
|
||||
} else if (imageType == GIF) {
|
||||
code = vips_gifload_buffer(buf, len, out, "access", VIPS_ACCESS_RANDOM, NULL);
|
||||
} else if (imageType == PDF) {
|
||||
code = vips_pdfload_buffer(buf, len, out, "access", VIPS_ACCESS_RANDOM, NULL);
|
||||
} else if (imageType == SVG) {
|
||||
code = vips_svgload_buffer(buf, len, out, "access", VIPS_ACCESS_RANDOM, NULL);
|
||||
#endif
|
||||
} else if (imageType == MAGICK) {
|
||||
code = vips_magickload_buffer(buf, len, out, "access", VIPS_ACCESS_RANDOM, NULL);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue