0
在线手册:中文 英文

Imagick::stripImage

(PECL imagick 2, PECL imagick 3)

Imagick::stripImage去掉图片的所有配置和设置

说明

Imagick::stripImage(): bool

去掉图片的所有配置和设置

返回值

成功时返回 true

错误/异常

错误时抛出 ImagickException。

0
在线手册:中文 英文

3位用户评论

[#1] ▲20▼ max eremin [86%] (2016-12-28 00:11:04)

StripImage also delete ICC image profile by default. The resulting images seem to lose a lot of color information and look "flat" compared to their non-stripped versions. Consider keeping the ICC profile (which causes richer colors) while removing all other EXIF data: 1. Extract the ICC profile 2. Strip EXIF data and image profile 3. Add the ICC profile back The code is: <?php
$profiles 
$img->getImageProfiles("icc"true);

$img->stripImage();

if(!empty(
$profiles))
    
$img->profileImage("icc"$profiles['icc']);
?>

[#2] ▲12▼ g.a.karthikeyan@gmail.com [75%] (2013-12-23 07:09:21)

Please note that striping off the exif information without handling the orientation information available in the exif will lead to wrong orientation of the image

[#3] ▲1▼ pengc99 [56%] (2011-05-02 22:09:20)

this will actually clear exif data so if you run an image uploading script with privacy concerns, this will effectively clear all GPS / metadata from the image.