|
374 | 374 | * If you want to avoid the copies, you'll need to call drawing operations
|
375 | 375 | * yourself.
|
376 | 376 | *
|
| 377 | + * # Thumbnailing |
| 378 | + * |
| 379 | + * The thumbnailing functionality is implemented by `Vips\Image::thumbnail` and |
| 380 | + * `Vips\Image::thumbnail_buffer` (which thumbnails an image held as a string). |
| 381 | + * |
| 382 | + * You could write: |
| 383 | + * ```php |
| 384 | + * $filename = 'image.jpg'; |
| 385 | + * $image = Vips\Image::thumbnail($filename, 200, ['height' => 200]); |
| 386 | + * $image->writeToFile('my-thumbnail.jpg'); |
| 387 | + * ``` |
| 388 | + * |
| 389 | + * # Resample |
| 390 | + * |
| 391 | + * There are three types of operation in this section. |
| 392 | + * |
| 393 | + * First, `->affine()` applies an affine transform to an image. |
| 394 | + * This is any sort of 2D transform which preserves straight lines; |
| 395 | + * so any combination of stretch, sheer, rotate and translate. |
| 396 | + * You supply an interpolator for it to use to generate pixels |
| 397 | + * (@see Image::newInterpolator()). It will not produce good results for |
| 398 | + * very large shrinks: you'll see aliasing. |
| 399 | + * |
| 400 | + * `->reduce()` is like `->affine()`, but it can only shrink images, |
| 401 | + * it can't enlarge, rotate, or skew. |
| 402 | + * It's very fast and uses an adaptive kernel (@see Kernel for possible values) |
| 403 | + * for interpolation. Again, it will give poor results for large size reductions. |
| 404 | + * |
| 405 | + * `->shrink()` is a fast block shrinker. It can quickly reduce images by large |
| 406 | + * integer factors. It will give poor results for small size reductions: |
| 407 | + * again, you'll see aliasing. |
| 408 | + * |
| 409 | + * Next, `->resize()` specialises in the common task of image reduce and enlarge. |
| 410 | + * It strings together combinations of `->shrink()`, `->reduce()`, `->affine()` |
| 411 | + * and others to implement a general, high-quality image resizer. |
| 412 | + * |
| 413 | + * Finally, `->mapim()` can apply arbitrary 2D image transforms to an image. |
| 414 | + * |
377 | 415 | * # Expansions
|
378 | 416 | *
|
379 | 417 | * Some vips operators take an enum to select an action, for example
|
@@ -817,6 +855,13 @@ public static function newFromArray(
|
817 | 855 | * Make an interpolator from a name.
|
818 | 856 | *
|
819 | 857 | * @param string $name Name of the interpolator.
|
| 858 | + * Possible interpolators are: |
| 859 | + * - `'nearest'`: Use nearest neighbour interpolation. |
| 860 | + * - `'bicubic'`: Use bicubic interpolation. |
| 861 | + * - `'bilinear'`: Use bilinear interpolation (the default). |
| 862 | + * - `'nohalo'`: Use Nohalo interpolation. |
| 863 | + * - `'lbb'`: Use LBB interpolation. |
| 864 | + * - `'vsqbs'`: Use the VSQBS interpolation. |
820 | 865 | *
|
821 | 866 | * @return resource|null The interpolator, or null on error.
|
822 | 867 | */
|
|
0 commit comments