CAIR is an image resizing library that is based on the works of Shai Avidan and

Ariel Shamir.  It is a high-performance multi-threaded library written in C++.
It is intended to be multi-platform and multi-architecture.

WWW: http://sourceforge.net/projects/c-a-i-r/

PR:		ports/128183
Submitted by:	buganini at gmail.com
This commit is contained in:
Martin Wilke 2008-10-19 14:45:17 +00:00
parent 3b35891545
commit 49cd67777d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=221786
5 changed files with 98 additions and 0 deletions

View File

@ -45,6 +45,7 @@
SUBDIR += bmp-rootvis
SUBDIR += bmp2html
SUBDIR += bugle
SUBDIR += c-a-i-r
SUBDIR += cadubi
SUBDIR += cairo
SUBDIR += cairo-java

33
graphics/c-a-i-r/Makefile Normal file
View File

@ -0,0 +1,33 @@
# New ports collection makefile for: c-a-i-r
# Date created: 18 Oct 2008
# Whom: buganini@gmail.com
#
# $FreeBSD$
#
PORTNAME= c-a-i-r
PORTVERSION= 2.16
CATEGORIES= graphics
MASTER_SITES= SF
DISTNAME= CAIR_MT_v2.16
MAINTAINER= buganini@gmail.com
COMMENT= Content Aware Image Resizer is an implementation of seam carving
USE_ZIP= yes
USE_GMAKE= yes
WRKSRC= ${WRKDIR}
PLIST_FILES= bin/cair
.include <bsd.port.pre.mk>
.if ${ARCH} == amd64
EXTRA_PATCHES= ${PATCHDIR}/amd64-CAIR.cpp
.endif
do-install:
${INSTALL_SCRIPT} ${WRKDIR}/cair ${PREFIX}/bin
.include <bsd.port.post.mk>

View File

@ -0,0 +1,3 @@
MD5 (CAIR_MT_v2.16.zip) = 5ddfef014e98579efc22c8cde4cf2e8f
SHA256 (CAIR_MT_v2.16.zip) = 6244ef83c0ecac5cffe681d76208a52698fa77f2bbfc6fc7c845817740ba46ff
SIZE (CAIR_MT_v2.16.zip) = 217086

View File

@ -0,0 +1,56 @@
--- CAIR.cpp.orig 2008-10-19 19:15:39.000000000 +0800
+++ CAIR.cpp 2008-10-19 19:17:24.000000000 +0800
@@ -252,7 +252,7 @@
//Our thread function for the Grayscale
void * Gray_Quadrant( void * id )
{
- int num = (int)id;
+ long int num = (long int)id;
while( true )
{
@@ -417,7 +417,7 @@
//This is multi-threaded to 4 threads, spliting the image into 4 strips
void * Edge_Quadrant( void * id )
{
- int num = (int)id;
+ long int num = (long int)id;
while( true )
{
@@ -612,7 +612,7 @@
//=========================================================================================================//
void * Energy_Left( void * id )
{
- int num = (int)id;
+ long int num = (long int)id;
int energy = 0;// current calculated enery
int min_x = 0, max_x = 0;
@@ -727,7 +727,7 @@
//=========================================================================================================//
void * Energy_Right( void * id )
{
- int num = (int)id;
+ long int num = (long int)id;
int energy = 0;// current calculated enery
int min_x = 0, max_x = 0;
@@ -938,7 +938,7 @@
//This works like Remove_Quadrant, stripes across the image.
void * Add_Quadrant( void * id )
{
- int num = (int)id;
+ long int num = (long int)id;
Thread_Params add_area;
while( true )
@@ -1245,7 +1245,7 @@
//the areas are not quadrants, rather, more like strips, but I keep the name convention
void * Remove_Quadrant( void * id )
{
- int num = (int)id;
+ long int num = (long int)id;
Thread_Params remove_area;
while( true )

View File

@ -0,0 +1,5 @@
CAIR is an image resizing library that is based on the works of Shai Avidan and
Ariel Shamir. It is a high-performance multi-threaded library written in C++.
It is intended to be multi-platform and multi-architecture.
WWW: http://sourceforge.net/projects/c-a-i-r/