Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pi/piresizeimage.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pi/piresizeimage.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pi/piresizeimage.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pi/piresizeimage.html on line 8
Resize an image to the specified size
PhImage_t *PiResizeImage( PhImage_t *image,
PhRect_t const *bounds,
short w,
short h,
int flags )
- image
- A pointer to a PhImage_t structure that defines the image to be resized.
- bounds
- A pointer to a PhRect_t structure specifying a rectangle within image to resize, effectively cropping the image before resizing. Pass as NULL to resize the whole image.
- w, h
- The width and height of the new image.
- flags
- Flags that dictate special behavior of the resizing process and can take on the following values:
- Pi_FREE
- Free the original image if the resizing succeeds.
- Pi_SHMEM
- Store the newly created image data in shared memory. This is useful
if fast rendering of the image is required.
- Pi_SUPPRESS_CRC
- Don't the calculate CRC tag. If this flag bit isn't set, the image's image_tag is filled in with a CRC calculated by PtCRC().
- Pi_USE_COLORS
- Use the original image's color palette. If this flag bit isn't set, the function calculates a new, optimized palette.
ph
This function resizes a Photon image, making it larger or smaller. It allocates space for the resulting image, leaving the original image untouched. If you set the Pi_FREE flag bit, the function frees the old image by setting all its release flags and calling PhReleaseImage() on it.
A pointer to the new, resized image on success, or NULL if an
error occurred.
For an example that uses this function, see PiConvertImage().
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
PhCreateImage(),
PhImage_t,
PhRect_t,
PiConvertImage(),
PiCropImage(),
PiDuplicateImage(),
PiFlipImage()
“Images”
in the Raw Drawing and Animation chapter of the
Photon Programmer's Guide
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/pi/piresizeimage.html on line 166
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/pi/piresizeimage.html on line 166