ImageCache Actions - 基于 ImageCache 的图片处理方法集,支持图...

ImageCache Actions

Posted by  dman  on  May 28, 2008 at 11:45am
Imagecache Effects

This module provides a suite of additional image effects that can be added to image styles. The image styles admin submodule also adds the 'duplicate', 'export' and 'import' actions to image styles administration.

这个模块提供了一套额外的图像效果,可以被添加到图像风格。图像风格管理子模块还增加了' duplicate 重复?',' export 出口?'和' import 进口?'影像风格动作管理。

支持图片自动加水印等功能

使用以上动作,加上 ImageCache 自身提供的裁剪、缩放、旋转等功能,可以为图片进行数百种操作组合,如果创建自定义动作,可供使用的图片处理动作就更多了。  


Effects provided

  • Watermarking - a much requested addition that enables you to place any image anywhere over a source picture, with alpha transparency
  • Overlays - Add photo-corners etc to the image
  • Text overlay - add a short copyright notice to your image, using available system fonts
  • Color-shifting - Colorize images. Also invert.
  • Brighten/Darken
  • Alpha blending - turn an image into a transparent mask, and back into a flat image against another color
  • Canvas manipulation - add padding, either onto color or transparent backgrounds
  • Background - Place your image onto another source background
  • File Format switcher - If you need tranparency in JPGs : make them PNG. If your PNG thumbnails are 30K each, save them as JPGs. (This is distributed as part of the color-actions submodule)
  • Rounded corners (transparent). With input from canaryMason, we can even set different radius for different corners, and round just one corner etc.
  • Aspect Switcher new 2009-08 - lets you perform different actions or use different dimensions based on whether the image is 'landscape' or 'portrait'
  • Custom Actions - Execute your own PHP/GD code in the middle of an imagecache generation process. Requires some familiarity with imageAPI internals.

These functions, combined with the available scale, crop, and rotate functions already provided by Drupal core/imagecache make hundreds of image processing effects available.

  • 添加水印(Watermarking)
  • 遮罩/蒙板(Overlays)
  • 文字蒙板(Text overlay)
  • 图片变色(Color-shifting)
  • 图片加亮/变暗(Bright/Darken)
  • Alpha 混合(Alpha blending)
  • 帆布(Canvas manipulation)
  • 背景(Background)
  • 文件格式转换(File Format Switcher)
  • 透明圆角(Rounded corners)
  • 看点切换(Aspect Switcher)
  • 自定义动作(Custom Actions)

Drupal 7

It took a while, but there is now finally a stable 7.x-1.0 version (read the notes about incompatibilities). In Drupal 7, basic image handling is part of core, so there is no dependency on ImageCache anymore, you just need to enable the image module. We are still in the process of updating naming and documentation to the new D7 terms (image styles and effects versus imagecache presets and actions).

现在终于有一个稳定的7.x版的1.0版本(阅读笔记不兼容问题) 。在Drupal 7 ,基本的图像处理是核心的一部分,所以是不依赖于ImageCache了,你只需要使图像模块。我们仍然在这个过程中的命名和文件更新到新的D7条款(与imagecache预设和行动的影像风格和效果)  2 n' H. M+ w o8 J* K5 ]4 A  。


Drupal 6

The D6 version requires the Imagecache module.
It integrates slightly with the image, imagefield, filefield, and upload modules - if available - to supply node data that can be used in the text overlay action.

Toolkit support

All effects provided by this module should work with the toolkit based on built-in GD. Support for the ImageMagick toolkit is catching up, but is still legging behind. Note for D7: do not use the ImageAPI module for ImageMagick support.

Credits/sponsors

Roadmap

  • D6: 6.x-1.x versions has entered maintenance only status.
  • D6: 6.x-2.x version is discontinued.
  • D7: 7.x-1.x is actively maintained.

Our ideas for the (near) future :

  • Go through the issue queue and decrease the number of open issues. Keep it low.
  • Create tests/showcases for all effects.
  • Update naming to D7.
  • Write documentation that describes effects and its parameters in detail.
  • Improve structure of the code. Think of lazy loading,more consistency.
  • Introduce a plugin concept for effects. This will make them more consistent and will make it easier for others to contribute their effects.

Help wanted

We have more ideas then time. So we are looking for contributors. How can you help:

  • Get through the issue queue and write patches or answer questions.
  • Implement your own effect and post it.
  • Write documentation for an effect.
  • Create tests or showcases for an effect.
  • Help implementing the plugin structure and other code refactorings.

You may contact us to discuss how you can help.

Other modules that provide image effects

  • smartcrop - to zoom on the most "interesting" section of an image.
  • Scale9 - to slice and position graphic corner and border effects like picture frames onto images. *highly recommended*
  • imagecache_proportions offers a similar result to the imagecache_actions "Aspect Switcher", but does through using CCK Field rendering options.
  • Image Optimize can compress generated images to smaller filesizes than the GD toolkit natively does

(You now of even other modules: please let us know.)

Samples

Click the below example images to view the settings details
Jump down to releases

Watermark Overlays Overlays Colorshift Brightness Alpha Transparency Canvases Rounded Corners Text derived from the image node Putting it all together

转载于:https://my.oschina.net/mashixin/blog/119649

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值