|
Bsoft
1.9
Bernard's software package
|
Header file for image resizing. More...
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include <math.h>#include <time.h>#include "rwimg.h"#include "Vector3.h"Go to the source code of this file.
Functions | |
| Bimage * | img_resize (Bimage *p, Vector3< int > newsize, Vector3< int > translate, int wrap, int fill_type, float fill) |
| Resizes without interpolation or rescaling. More... | |
| Bimage * | img_resize_to_next_power2 (Bimage *p, int fill_type, float fill) |
| Resizes without interpolation or rescaling to the next power of 2. More... | |
| int | img_shrink_wrap (Bimage *p, Vector3< int > newsize, Vector3< int > translate) |
| Shrinks an image to a new size with wrapping of the excluded edges. More... | |
| Bimage * | img_pad (Bimage *p, int size, int fill_type, float fill) |
| Pads an image to a new size with a given fill value. More... | |
| Bimage * | img_pad (Bimage *p, Vector3< int > size, int fill_type, float fill) |
| Pads an image to a new size with a given fill value. More... | |
Header file for image resizing.
Definition in file img_resize.h.
Pads an image to a new size with a given fill value.
| *p | image file. |
| size | new size. |
| fill_type | FILL_AVERAGE, FILL_BACKGROUND, FILL_USER. |
| fill | value to use when padding the image. |
The image is enlarged with padding only on one side in each dimension with an input size greater than one. The data type is preserved.
Definition at line 228 of file img_resize.cpp.
Pads an image to a new size with a given fill value.
| *p | image file. |
| size | new size. |
| fill_type | FILL_AVERAGE, FILL_BACKGROUND, FILL_USER. |
| fill | value to use when padding the image. |
The image is enlarged with padding only on one side in each dimension with an input size greater than one. The data type is preserved.
Definition at line 254 of file img_resize.cpp.
| Bimage* img_resize | ( | Bimage * | p, |
| Vector3< int > | newsize, | ||
| Vector3< int > | translate, | ||
| int | wrap, | ||
| int | fill_type, | ||
| float | fill | ||
| ) |
Resizes without interpolation or rescaling.
| *p | image (modified). |
| newsize | new image size three-value vector. |
| translate | three-value translation vector. |
| wrap | wrapping flag: 0 = no wrapping, 1 = wrapping. |
| fill_type | FILL_AVERAGE, FILL_BACKGROUND, FILL_USER |
| fill | value to fill in new regions. |
An image is resized with translation and filling of new regions with a given value.
Definition at line 30 of file img_resize.cpp.
Resizes without interpolation or rescaling to the next power of 2.
| *p | image (modified). |
| fill_type | FILL_AVERAGE, FILL_BACKGROUND, FILL_USER |
| fill | value to fill in new regions. |
An image is resized to the next power of two in each dimension greater than 1 with translation and filling of new regions with a given value. The new data replaces the old data.
Definition at line 124 of file img_resize.cpp.
Shrinks an image to a new size with wrapping of the excluded edges.
| *p | image. |
| newsize | new image size three-value vector. |
| translate | three-value translation vector. |
An image is resized to a smaller size with translation and wrapping of the excluded edges to complete periodic boundaries. The image is first converted to floating point to prevent overflows of smaller data types. The new image is finally converted back to the original data type. The new data replaces the old data.
Definition at line 155 of file img_resize.cpp.