I am lo开发者_运维百科oking for a open source project that does content-aware image resizing in any of the web back-end language (e.g. PHP, Ruby)
By content-aware image resizing, I mean the one seen in Photoshop CS5, or http://www.youtube.com/watch?v=qadw0BRKeMk
Thanks.
There is one ImageMagick/PHP based approach here.
This approach involves using ImageMagick's liquidRescaleImage
function to recognise the important parts of the image and rescale around them
Code sample from site:
<?php
/* Create new object */
$im = new Imagick( 'test.jpg' );
/* Scale down */
$im->liquidRescaleImage( 500, 200, 3, 25 );
/* Display */
header( 'Content-Type: image/jpg' );
echo $im;
?>
ImageMagick can be easily interfaced from any scripting language. I can't speak to its quality but it looks like it's going in the right direction: It explicitly links to your linked video as a reference.
I have yet to find anything better than PHPTHumb. http://phpthumb.sourceforge.net/
精彩评论