| [ Index ] |
PHP Cross Reference of Wordpress 2.9.1 |
[Source view] [Print] [Project Stats]
File contains all the administration image manipulation functions.
| File Size: | 343 lines (12 kb) |
| Included or required: | 2 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| wp_create_thumbnail( $file, $max_side, $deprecated = '' ) X-Ref |
| Create a thumbnail from an Image given a maximum side size. This function can handle most image file formats which PHP supports. If PHP does not have the functionality to save in a file of the same format, the thumbnail will be created as a jpeg. param: mixed $file Filename of the original image, Or attachment id. param: int $max_side Maximum length of a single side for the thumbnail. return: string Thumbnail path on success, Error string on failure. |
| wp_crop_image( $src_file, $src_x, $src_y, $src_w, $src_h, $dst_w, $dst_h, $src_abs = false, $dst_file = false ) X-Ref |
| Crop an Image to a given size. param: string|int $src_file The source file or Attachment ID. param: int $src_x The start x position to crop from. param: int $src_y The start y position to crop from. param: int $src_w The width to crop. param: int $src_h The height to crop. param: int $dst_w The destination width. param: int $dst_h The destination height. param: int $src_abs Optional. If the source crop points are absolute. param: string $dst_file Optional. The destination file to write to. return: string New filepath on success, String error message on failure. |
| wp_generate_attachment_metadata( $attachment_id, $file ) X-Ref |
| Generate post thumbnail attachment meta data. param: int $attachment_id Attachment Id to process. param: string $file Filepath of the Attached image. return: mixed Metadata for attachment. |
| wp_load_image( $file ) X-Ref |
| Load an image from a string, if PHP supports it. param: string $file Filename of the image to load. return: resource The resulting image resource on success, Error string on failure. |
| get_udims( $width, $height) X-Ref |
| Calculated the new dimentions for a downsampled image. param: int $width Current width of the image param: int $height Current height of the image return: mixed Array(height,width) of shrunk dimensions. |
| wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) X-Ref |
| Calculates the new dimentions for a downsampled image. param: int $width Current width of the image param: int $height Current height of the image param: int $wmax Maximum wanted width param: int $hmax Maximum wanted height return: mixed Array(height,width) of shrunk dimensions. |
| wp_exif_frac2dec($str) X-Ref |
| Convert a fraction string to a decimal. param: string $str return: int|float |
| wp_exif_date2ts($str) X-Ref |
| Convert the exif date format to a unix timestamp. param: string $str return: int |
| wp_read_image_metadata( $file ) X-Ref |
| Get extended image metadata, exif or iptc as available. Retrieves the EXIF metadata aperture, credit, camera, caption, copyright, iso created_timestamp, focal_length, shutter_speed, and title. The IPTC metadata that is retrieved is APP13, credit, byline, created date and time, caption, copyright, and title. Also includes FNumber, Model, DateTimeDigitized, FocalLength, ISOSpeedRatings, and ExposureTime. param: string $file return: bool|array False on failure. Image metadata array on success. |
| file_is_valid_image($path) X-Ref |
| Validate that file is an image. param: string $path File path to test if valid image. return: bool True if valid image, false if not valid image. |
| file_is_displayable_image($path) X-Ref |
| Validate that file is suitable for displaying within a web page. param: string $path File path to test. return: bool True if suitable, false if not suitable. |
| Generated: Fri Jan 8 00:19:48 2010 | Cross-referenced by PHPXref 0.7 |