Skip to content

Commit f77f8bb

Browse files
authored
Merge pull request #1 from Exiv2/0.27-maintenance
0.27 maintenance update
2 parents aa07607 + fcfd267 commit f77f8bb

File tree

5 files changed

+76
-6
lines changed

5 files changed

+76
-6
lines changed

appveyor_mingw_cygwin.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
init:
2+
- echo %PYTHON%
3+
4+
environment:
5+
PYTHON: "C:/Python37-x64"
6+
7+
matrix:
8+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
9+
BUILD: MINGW64
10+
INTEGRATION_TESTS: 1
11+
ARCHITECTURE: x86_64
12+
UNIT_TESTS: 1
13+
WEBREADY: False
14+
WARNINGS_AS_ERRORS: ON
15+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
16+
BUILD: CYGWIN64
17+
INTEGRATION_TESTS: 1
18+
ARCHITECTURE: x86_64
19+
UNIT_TESTS: 1
20+
WEBREADY: False
21+
WARNINGS_AS_ERRORS: ON
22+
23+
shallow_clone: true
24+
25+
install:
26+
- echo %APPVEYOR_BUILD_FOLDER%
27+
- if "%BUILD%"=="MINGW64" set "PATH=c:\msys64\mingw64\bin;c:\msys64\usr\bin;c:\msys64\usr\local\bin;"
28+
- if "%BUILD%"=="MINGW64" C:\msys64\usr\bin\bash -c "python -m pip install --upgrade pip;pip3.exe install lxml ; for i in base-devel git coreutils dos2unix tar diffutils make \
29+
mingw-w64-x86_64-toolchain mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb \
30+
mingw-w64-x86_64-cmake mingw-w64-x86_64-gettext mingw-w64-x86_64-python3 \
31+
mingw-w64-x86_64-libexpat mingw-w64-x86_64-libiconv mingw-w64-x86_64-zlib \
32+
mingw-w64-x86_64-gtest ; do (echo y | pacman -S $i) ; done
33+
- cd %APPVEYOR_BUILD_FOLDER%
34+
- if "%BUILD%"=="CYGWIN64" set "PATH=c:\cygwin64\usr\local\bin;c:\cygwin64\bin;c:\cygwin64\usr\bin;c:\cygwin64\usr\sbin;"
35+
- if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg ; chmod +x apt-cyg; mv apt-cyg /usr/local/bin"
36+
- if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "apt-cyg install cmake zlib-devel libexpat-devel libxml2-devel libxslt-devel python38 python38-pip python38-libxml2"
37+
- if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "/usr/bin/python3.8.exe -m pip install --upgrade pip"
38+
39+
build_script:
40+
- cmd: set CMD=mkdir -p build
41+
- cmd: set CMD=%CMD%; cd build
42+
- cmd: set CMD=%CMD%; cmake .. -G 'Unix Makefiles' -DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_FLAGS=-Wno-deprecated
43+
- cmd: set CMD=%CMD%; cmake --build . --config Release
44+
- cmd: rem echo %CMD%
45+
- cd %APPVEYOR_BUILD_FOLDER%
46+
- cmd: if "%BUILD%"=="MINGW64" C:\msys64\usr\bin\bash -c "%CMD%"
47+
- cmd: set CMD=which python3 python
48+
- cmd: set CMD=%CMD%; python --version
49+
- cmd: set CMD=%CMD%; build/bin/exiv2 --verbose --version; pwd ; ls -l
50+
- cmd: set CMD=%CMD%; cd build ; cmake --build . --config Release --target python_tests
51+
- cmd: echo %CMD%
52+
- cd %APPVEYOR_BUILD_FOLDER%
53+
- cmd: if "%BUILD%"=="MINGW64" C:\msys64\usr\bin\bash -c "%CMD%"
54+
- cmd: set "PATH=c:\cygwin64\usr\local\bin;c:\cygwin64\bin;c:\cygwin64\usr\bin;c:\cygwin64\usr\sbin;"
55+
- cmd: set CMD=rm -rf build
56+
- cmd: set CMD=%CMD%; mkdir -p build
57+
- cmd: set CMD=%CMD%; cd build
58+
- cmd: set CMD=%CMD%;cmake .. -DCMAKE_CXX_STANDARD=98 -DCMAKE_CXX_FLAGS=-Wno-deprecated
59+
- cmd: set CMD=%CMD%; make
60+
- cmd: set CMD=%CMD%; make python_tests
61+
- cmd: echo %CMD%
62+
- cd %APPVEYOR_BUILD_FOLDER%
63+
- cmd: if "%BUILD%"=="CYGWIN64" C:\cygwin64\bin\bash -c "%CMD%"
64+

src/tags_int.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ namespace Exiv2 {
190190
{ 8, N_("left, bottom") } // To silence compiler warning
191191
};
192192

193+
//! PlanarConfiguration, tag 0x011c
194+
extern const TagDetails exifPlanarConfiguration[] = {
195+
{ 1, N_("Chunky") },
196+
{ 2, N_("Planar") }
197+
};
198+
193199
//! Predictor, tag 0x013d
194200
extern const TagDetails exifPredictor[] = {
195201
{ 1, N_("No prediction scheme used") },
@@ -585,7 +591,7 @@ namespace Exiv2 {
585591
"or planar format. In JPEG compressed files a JPEG marker "
586592
"is used instead of this tag. If this field does not exist, "
587593
"the TIFF default of 1 (chunky) is assumed."),
588-
ifd0Id, imgStruct, unsignedShort, 1, printValue),
594+
ifd0Id, imgStruct, unsignedShort, 1, EXV_PRINT_TAG(exifPlanarConfiguration)),
589595
TagInfo(0x0122, "GrayResponseUnit", N_("Gray Response Unit"),
590596
N_("The precision of the information contained in the GrayResponseCurve."),
591597
ifd0Id, imgStruct, unsignedShort, 1, printValue), // TIFF tag

test/data/tiff-test.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RowsPerStrip Short 1 "64"
1414
StripByteCounts Long 1 "243"
1515
XResolution Rational 1 "72"
1616
YResolution Rational 1 "72"
17-
PlanarConfiguration Short 1 "1"
17+
PlanarConfiguration Short 1 "Chunky"
1818
ResolutionUnit Short 1 "inch"
1919

2020
exiv2 -pS output
@@ -99,7 +99,7 @@ RowsPerStrip Short 1 "64"
9999
StripByteCounts Long 1 "243"
100100
XResolution Rational 1 "72"
101101
YResolution Rational 1 "72"
102-
PlanarConfiguration Short 1 "1"
102+
PlanarConfiguration Short 1 "Chunky"
103103
ResolutionUnit Short 1 "inch"
104104
ExifTag Long 1 "294"
105105
DateTimeOriginal Ascii 18 "Yesterday at noon"

tests/bugfixes/redmine/test_issue_831.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class UseNonIntrusiveWriting(metaclass=CaseMeta):
3535
Exif.Image.StripByteCounts Long 1 243
3636
Exif.Image.XResolution Rational 1 72
3737
Exif.Image.YResolution Rational 1 72
38-
Exif.Image.PlanarConfiguration Short 1 1
38+
Exif.Image.PlanarConfiguration Short 1 Chunky
3939
Exif.Image.ResolutionUnit Short 1 inch
4040
"""
4141
]

tests/tiff_test/test_tag_compare.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def compare_pS_pa(self):
9292
if pa_elem["tag"] in [
9393
"ImageWidth", "ImageLength", "BitsPerSample",
9494
"DocumentName", "ImageDescription", "StripOffsets",
95-
"SamplesPerPixel", "StripByteCounts", "PlanarConfiguration"]:
95+
"SamplesPerPixel", "StripByteCounts"]:
9696
self.assertEquals(pa_elem["val"], pS_elem["val"])
9797

9898
def compare_stdout(self, i, command, got_stdout, expected_stdout):
@@ -128,7 +128,7 @@ def compare_stdout(self, i, command, got_stdout, expected_stdout):
128128
Exif.Image.StripByteCounts Long 1 243
129129
Exif.Image.XResolution Rational 1 72
130130
Exif.Image.YResolution Rational 1 72
131-
Exif.Image.PlanarConfiguration Short 1 1
131+
Exif.Image.PlanarConfiguration Short 1 Chunky
132132
Exif.Image.ResolutionUnit Short 1 inch
133133
""",
134134
"""STRUCTURE OF TIFF FILE (II): $data_path/mini9.tif

0 commit comments

Comments
 (0)