import p5-Image-Scale, suggestion/ok okan@

This module implements several resizing algorithms with a focus on low
overhead, speed and minimal features. Algorithms available are:

- GD's copyResampled (floating-point)
- GD's copyResampled fixed-point (useful on embedded devices/NAS devices)
- GraphicsMagick's assortment of resize filters (floating-point)
- GraphicsMagick's Triangle filter in fixed-point

Supported image formats include JPEG, GIF, PNG, and BMP for input, and
JPEG and PNG for output.
This commit is contained in:
sthen 2012-01-20 19:27:55 +00:00
parent cff065fc5f
commit 63a41d4557
5 changed files with 80 additions and 0 deletions

View File

@ -0,0 +1,34 @@
# $OpenBSD: Makefile,v 1.1.1.1 2012/01/20 19:27:55 sthen Exp $
SHARED_ONLY= Yes
COMMENT= low-overhead image rescaling module for Perl
DISTNAME= Image-Scale-0.08
CATEGORIES= graphics
# GPLv2+
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB += gif jpeg png z
MODULES= cpan
LIB_DEPENDS= graphics/libungif \
graphics/jpeg \
graphics/png
MAKE_ENV= TEST_POD=Yes
CONFIGURE_ARGS= --with-jpeg-libs="${LOCALBASE}/lib" \
--with-png-include="${LOCALBASE}/include/libpng" \
--with-png-libs="${LOCALBASE}/lib" \
--with-gif-libs="${LOCALBASE}/lib"
REGRESS_DEPENDS= devel/p5-Test-NoWarnings \
devel/p5-Test-Pod
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (Image-Scale-0.08.tar.gz) = YNax144iloLDVl7hKhcctA==
RMD160 (Image-Scale-0.08.tar.gz) = ePZBpn8rpHE7TJ89omyRxMGLYso=
SHA1 (Image-Scale-0.08.tar.gz) = yhSSdvX/zeEg6oiTu0OVfGziVVI=
SHA256 (Image-Scale-0.08.tar.gz) = 4tzJC5lUpD2vx/YbxtxHI4LrcZsQRiR9pak8/dfDs+A=
SIZE (Image-Scale-0.08.tar.gz) = 1009824

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_png_c,v 1.1.1.1 2012/01/20 19:27:55 sthen Exp $
--- src/png.c.orig Fri Jan 20 11:14:44 2012
+++ src/png.c Fri Jan 20 11:15:05 2012
@@ -14,6 +14,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <string.h>
+
static void
image_png_read_buf(png_structp png_ptr, png_bytep data, png_size_t len)
{
@@ -40,7 +42,7 @@ image_png_read_buf(png_structp png_ptr, png_bytep data
}
}
- png_memcpy(data, buffer_ptr(im->buf), len);
+ memcpy(data, buffer_ptr(im->buf), len);
buffer_consume(im->buf, len);
goto ok;

View File

@ -0,0 +1,10 @@
This module implements several resizing algorithms with a focus on low
overhead, speed and minimal features. Algorithms available are:
- GD's copyResampled (floating-point)
- GD's copyResampled fixed-point (useful on embedded devices/NAS devices)
- GraphicsMagick's assortment of resize filters (floating-point)
- GraphicsMagick's Triangle filter in fixed-point
Supported image formats include JPEG, GIF, PNG, and BMP for input, and
JPEG and PNG for output.

View File

@ -0,0 +1,10 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/01/20 19:27:55 sthen Exp $
${P5ARCH}/
${P5ARCH}/Image/
${P5ARCH}/Image/Scale.pm
${P5ARCH}/auto/
${P5ARCH}/auto/Image/
${P5ARCH}/auto/Image/Scale/
${P5ARCH}/auto/Image/Scale/Scale.bs
${P5ARCH}/auto/Image/Scale/Scale.so
@man man/man3p/Image::Scale.3p