Skip to content

adding freetype support and updating version of ImageMagick #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions Makefile_ImageMagick
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
LIBPNG_VERSION ?= 1.6.37
LIBJPG_VERSION ?= 9c
LIBJPG_VERSION ?= 9d
OPENJP2_VERSION ?= 2.3.1
LIBTIFF_VERSION ?= 4.0.9
BZIP2_VERSION ?= 1.0.6
LIBWEBP_VERSION ?= 0.6.1
IMAGEMAGICK_VERSION ?= 7.0.8-45
LIBFREETYPE_VERSION ?= 2.10.1
IMAGEMAGICK_VERSION ?= 7.0.10-16

TARGET_DIR ?= /opt/
PROJECT_ROOT = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
Expand Down Expand Up @@ -35,7 +36,6 @@ $(CACHE_DIR)/lib/libjpeg.a: $(LIBJPG_SOURCE)
make
make install


## libpng

LIBPNG_SOURCE=libpng-$(LIBPNG_VERSION).tar.xz
Expand Down Expand Up @@ -113,6 +113,19 @@ $(CACHE_DIR)/lib/libopenjp2.a: $(OPENJP2_SOURCE) $(CACHE_DIR)/lib/libpng.a $(CAC
make clean
make install

## libfreetype

LIBFREETYPE_SOURCE=freetype-$(LIBFREETYPE_VERSION).tar.xz

$(LIBFREETYPE_SOURCE):
curl -LO http://download.savannah.gnu.org/releases/freetype/$(LIBFREETYPE_SOURCE)

$(CACHE_DIR)/lib/libfreetype.a: $(LIBFREETYPE_SOURCE)
tar xf $<
cd freetype*
$(CONFIGURE)
make
make install

## ImageMagick

Expand All @@ -127,7 +140,8 @@ LIBS:=$(CACHE_DIR)/lib/libjpeg.a \
$(CACHE_DIR)/lib/libopenjp2.a \
$(CACHE_DIR)/lib/libtiff.a \
$(CACHE_DIR)/lib/libbz2.a \
$(CACHE_DIR)/lib/libwebp.a
$(CACHE_DIR)/lib/libwebp.a \
$(CACHE_DIR)/lib/libfreetype.a

$(TARGET_DIR)/bin/identify: $(IMAGE_MAGICK_SOURCE) $(LIBS)
tar xf $<
Expand Down
2 changes: 1 addition & 1 deletion README-SAR.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Static build of ImageMagick for Amazon Linux 2, packaged as a Lambda layer.
Bundles ImageMagick 7.0.8-45, including convert, mogrify and identify tools
and support for jpeg, gif, png, tiff and webm formats.
and support for jpeg, gif, png, tiff and webm formats and freetype font engine.

This application provides a single output, `LayerVersion`, which points to a
Lambda Layer ARN you can use with Lambda runtimes based on Amazon Linux 2 (such
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ These libraries are currently bundled:
* libjpeg
* openjpeg2
* libwebp
* libfreetype

## Deploying to AWS as a layer

Expand Down
6 changes: 4 additions & 2 deletions template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Transform: AWS::Serverless-2016-10-31
Description: >
Static build of ImageMagick for Amazon Linux 2,
including convert, mogrify and identify tools
and support for jpeg, gif, png, tiff and webm formats.
and support for jpeg, gif, png, tiff and webm formats
and freetype font engine.

Check out https://github.com/serverlesspub/imagemagick-aws-lambda-2
for more information.
Expand Down Expand Up @@ -34,7 +35,8 @@ Metadata:
packaged as a Lambda layer. Bundles ImageMagick 7.0.8-45.

Including convert, mogrify and identify tools
and support for jpeg, gif, png, tiff and webm formats.
and support for jpeg, gif, png, tiff and webm formats
and freetype font engine.
Author: Gojko Adzic
SpdxLicenseId: ImageMagick
LicenseUrl: LICENSE.txt
Expand Down