在WordPress3.5/3.5.1中,对图片的处理多了几个文件,不再是单一的media.php了,其中有:

…wp-includesclass-wp-image-editor.php 负责对图片进行基本处理;

…wp-includesclass-wp-image-editor-gd.php 负责对图片用GD(graphic device,图像工具库)调整;

…wp-includesclass-wp-image-editor-imagick.php 负责对图片用Imagick(调用ImageMagick功能的PHP扩展)进行调整;

 

各文件的头部备注说明信息(都是“@since 3.5.0”)

class-wp-image-editor.php 

/**
* Base WordPress Image Editor
*
* @package WordPress
* @subpackage Image_Editor
*/

/**
* Base image editor class from which implementations extend
*
* @since 3.5.0
*/

class-wp-image-editor-gd.php

/**
* WordPress GD Image Editor
*
* @package WordPress
* @subpackage Image_Editor
*/

/**
* WordPress Image Editor Class for Image Manipulation through GD
*
* @since 3.5.0
* @package WordPress
* @subpackage Image_Editor
* @uses WP_Image_Editor Extends class
*/

class-wp-image-editor-imagick.php

/**
* WordPress Imagick Image Editor
*
* @package WordPress
* @subpackage Image_Editor
*/

/**
* WordPress Image Editor Class for Image Manipulation through Imagick PHP Module
*
* @since 3.5.0
* @package WordPress
* @subpackage Image_Editor
* @uses WP_Image_Editor Extends class
*/

发表评论

电子邮件地址不会被公开。 必填项已用*标注