[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:46:51 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=57ee938
The following commit has been merged in the master branch:
commit 57ee93886a27c41c19afff3549f875a90c9db538
Author: Robin Mills <robin at clanmills.com>
Date: Mon Sep 5 14:43:13 2016 +0000
#2120 Fix submitted and appropriate changes to test/icc-test.sh (rewritting ICC in JPG was corrupting file)
---
src/jpgimage.cpp | 77 ++++++++--------
test/data/bugfixes-test.out | Bin 1912048 -> 1911996 bytes
test/data/icc-test.out | 212 ++++++++++++++++++++++++++++++++++++--------
test/data/small.icc | Bin 3144 -> 3142 bytes
test/data/webp-test.out | 2 +-
test/icc-test.sh | 21 ++++-
6 files changed, 231 insertions(+), 81 deletions(-)
diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp
index 05c5ecf..456d952 100644
--- a/src/jpgimage.cpp
+++ b/src/jpgimage.cpp
@@ -604,6 +604,19 @@ namespace Exiv2 {
}
}
+ // which markers have a length field?
+ bool mHasLength[256];
+ for ( int marker = 0 ; marker < 256 ; marker ++ )
+ mHasLength[marker]
+ = ( marker >= sof0_ && marker <= sof15_)
+ || ( marker >= app0_ && marker <= (app0_ | 0x0F))
+ || marker == dht_
+ || marker == dqt_
+ || marker == dri_
+ || marker == com_
+ || marker == sos_
+ ;
+
// Container for the signature
bool bExtXMP = false;
long bufRead = 0;
@@ -631,27 +644,10 @@ namespace Exiv2 {
bufRead = io_->read(buf.pData_, bufMinSize);
if (io_->error()) throw Error(14);
if (bufRead < 2) throw Error(15);
- uint16_t size = 0;
-
- // not all markers have size field.
- if( ( marker >= sof0_ && marker <= sof15_)
- || ( marker >= app0_ && marker <= (app0_ | 0x0F))
- || marker == dht_
- || marker == dqt_
- || marker == dri_
- || marker == com_
- || marker == sos_
- ){
- size = getUShort(buf.pData_, bigEndian);
- }
- if ( bPrint ) out << Internal::stringFormat(" | %7d ", size);
- if ( bPrint && marker == com_ ) {
- int n = size>32?32:size;
- if (n>3) n-=3; // three trailing bytes in a com
- out << "| " << Internal::binaryToString(buf,n,2);
- }
+ uint16_t size = mHasLength[marker] ? getUShort(buf.pData_, bigEndian) : 0 ;
+ if ( bPrint && mHasLength[marker] ) out << Internal::stringFormat(" | %7d ", size);
- // only print the signature for appn
+ // print signature for APPn
if (marker >= app0_ && marker <= (app0_ | 0x0F)) {
// http://www.adobe.com/content/dam/Adobe/en/devnet/xmp/pdfs/XMPSpecificationPart3.pdf p75
const char* signature = (const char*) buf.pData_+2;
@@ -696,13 +692,12 @@ namespace Exiv2 {
} else if ( option == kpsIccProfile && std::strcmp(signature,iccId_) == 0 ) {
// extract ICCProfile
if ( size > 0 ) {
- io_->seek(-bufRead , BasicIo::cur);
- byte* icc = new byte[size];
- io_->read(icc,size);
- std::size_t start=16;
- out.write( ((const char*)icc)+start,size-start);
+ io_->seek(-bufRead , BasicIo::cur); // back to buffer (after marker+size)
+ io_->seek( 16 , BasicIo::cur); // step over header
+ DataBuf icc(size-2-16);
+ io_->read( icc.pData_,icc.size_);
+ out.write((const char*)icc.pData_,icc.size_);
bufRead = size;
- delete [] icc;
}
} else if ( option == kpsIptcErase && std::strcmp(signature,"Photoshop 3.0") == 0 ) {
// delete IPTC data segment from JPEG
@@ -779,28 +774,28 @@ namespace Exiv2 {
io_->seek(restore,Exiv2::BasicIo::beg);
delete [] exif;
bLF = false;
-
}
}
}
+ // print COM marker
+ if ( bPrint && marker == com_ ) {
+ int n = (size-2)>32?32:size-2; // size includes 2 for the two bytes for size!
+ out << "| " << Internal::binaryToString(buf,n,2); // start after the two bytes
+ }
+
// Skip the segment if the size is known
if (io_->seek(size - bufRead, BasicIo::cur)) throw Error(14);
if ( bLF ) out << std::endl;
- if (marker == sos_)
- // sos_ is immediately followed by entropy-coded data & eoi_
- done = true;
- else {
+ if (marker != sos_) {
// Read the beginning of the next segment
marker = advanceToMarker();
REPORT_MARKER;
- if ( marker == eoi_ ) {
- if ( option == kpsBasic ) out << std::endl;
- done = true;
- }
}
+ done = marker == eoi_ || marker == sos_;
+ if ( done ) out << std::endl;
}
}
if ( option == kpsIptcErase && iptcDataSegs.size() ) {
@@ -1097,7 +1092,7 @@ namespace Exiv2 {
tmpBuf[0] = 0xff;
tmpBuf[1] = app2_;
- int chunk_size = 256*256-18 ; // leave bytes for marker and header
+ int chunk_size = 256*256-40 ; // leave bytes for marker and header
int size = (int) iccProfile_.size_ ;
int chunks = 1 + (size-1) / chunk_size ;
if (iccProfile_.size_ > 256*chunk_size) throw Error(37, "IccProfile");
@@ -1106,8 +1101,10 @@ namespace Exiv2 {
size -= bytes ;
// write JPEG marker (2 bytes)
- us2Data(tmpBuf + 2, 16 + bytes, bigEndian);
- if (outIo.write(tmpBuf, 4) != 4) throw Error(21); // JPEG Marker
+ if (outIo.write(tmpBuf, 2) != 2) throw Error(21); // JPEG Marker
+ // write length (2 bytes). length includes the 2 bytes for the length
+ us2Data(tmpBuf + 2, 2+16+bytes, bigEndian);
+ if (outIo.write(tmpBuf+2, 2) != 2) throw Error(21); // JPEG Length
// write the ICC_PROFILE header (16 bytes)
char pad[4];
@@ -1115,8 +1112,8 @@ namespace Exiv2 {
pad[1] = chunks;
pad[2] = 0;
pad[3] = 0;
- outIo.write((const byte *) iccId_,(long) ::strlen(iccId_) + 1);
- outIo.write((const byte *) pad, sizeof(pad));
+ outIo.write((const byte *) iccId_,12);
+ outIo.write((const byte *) pad, 4);
if (outIo.write(iccProfile_.pData_+ (chunk*chunk_size), bytes) != bytes)
throw Error(21);
if (outIo.error()) throw Error(21);
diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out
index 27a428d..c63a02c 100644
Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ
diff --git a/test/data/icc-test.out b/test/data/icc-test.out
index ef149e0..9d2553c 100644
--- a/test/data/icc-test.out
+++ b/test/data/icc-test.out
@@ -1,6 +1,6 @@
STRUCTURE OF JPEG FILE: Reagan.jpg
address | marker | length | data
- 0 | 0xffd8 SOI | 0
+ 0 | 0xffd8 SOI
2 | 0xffe0 APP0 | 16 | JFIF.....,.,....
20 | 0xffe1 APP1 | 5671 | Exif..MM.*......................
5693 | 0xffed APP13 | 9594 | Photoshop 3.0.8BIM..........Z...
@@ -11,62 +11,200 @@ STRUCTURE OF JPEG FILE: Reagan.jpg
25665 | 0xffc0 SOF0 | 17
25684 | 0xffdd DRI | 4
25690 | 0xffc4 DHT | 418
- 26110 | 0xffda SOS | 12
+ 26110 | 0xffda SOS
STRUCTURE OF JPEG FILE: Reagan.jpg
address | marker | length | data
- 0 | 0xffd8 SOI | 0
+ 0 | 0xffd8 SOI
2 | 0xffe0 APP0 | 16 | JFIF.....,.,....
20 | 0xffe1 APP1 | 5658 | Exif..MM.*......................
5680 | 0xffe1 APP1 | 7024 | http://ns.adobe.com/xap/1.0/.<?x
- 12706 | 0xffe2 APP2 | 65534 | ICC_PROFILE........ APPL....prtr chunk 1/25
- 78244 | 0xffe2 APP2 | 65534 | ICC_PROFILE.....o.S...r.R...t.RT chunk 2/25
- 143782 | 0xffe2 APP2 | 65534 | ICC_PROFILE.........o..b.tn..Q.K chunk 3/25
- 209320 | 0xffe2 APP2 | 65534 | ICC_PROFILE.......n.....l>...... chunk 4/25
- 274858 | 0xffe2 APP2 | 65534 | ICC_PROFILE.....W8w;.QY2w$.gZ.wY chunk 5/25
- 340396 | 0xffe2 APP2 | 65534 | ICC_PROFILE.....Y1...]W.j....QlT chunk 6/25
- 405934 | 0xffe2 APP2 | 65534 | ICC_PROFILE......ik.....j;....h. chunk 7/25
- 471472 | 0xffe2 APP2 | 65534 | ICC_PROFILE.....a.r2GRW.M...Y.MX chunk 8/25
- 537010 | 0xffe2 APP2 | 65534 | ICC_PROFILE.....`...bs]...dDZ7.b chunk 9/25
- 602548 | 0xffe2 APP2 | 65534 | ICC_PROFILE.....d.}...f.z...hRv. chunk 10/25
- 668086 | 0xffe2 APP2 | 65534 | ICC_PROFILE.......y+...^yy....y. chunk 11/25
- 733624 | 0xffe2 APP2 | 65534 | ICC_PROFILE......v.-i.....kN...< chunk 12/25
- 799162 | 0xffe2 APP2 | 65534 | ICC_PROFILE......'Z.....M.....>. chunk 13/25
- 864700 | 0xffe2 APP2 | 65534 | ICC_PROFILE..................... chunk 14/25
- 930238 | 0xffe2 APP2 | 65534 | ICC_PROFILE........D..........". chunk 15/25
- 995776 | 0xffe2 APP2 | 65534 | ICC_PROFILE.......V[*+..7.,G..'. chunk 16/25
- 1061314 | 0xffe2 APP2 | 65534 | ICC_PROFILE......Z...G.....C.... chunk 17/25
- 1126852 | 0xffe2 APP2 | 65534 | ICC_PROFILE......2yg.Te....VG... chunk 18/25
- 1192390 | 0xffe2 APP2 | 65534 | ICC_PROFILE..................... chunk 19/25
- 1257928 | 0xffe2 APP2 | 65534 | ICC_PROFILE.....1.0.285.0.373.0. chunk 20/25
- 1323466 | 0xffe2 APP2 | 65534 | ICC_PROFILE.....0.260.0.271.0.27 chunk 21/25
- 1389004 | 0xffe2 APP2 | 65534 | ICC_PROFILE.....39.0.145.0.150.0 chunk 22/25
- 1454542 | 0xffe2 APP2 | 65534 | ICC_PROFILE......0.051.0.060.0.0 chunk 23/25
- 1520080 | 0xffe2 APP2 | 65534 | ICC_PROFILE......0.743.0.788.0.8 chunk 24/25
- 1585618 | 0xffe2 APP2 | 41184 | ICC_PROFILE......452.0.452.0.464 chunk 25/25
+ 12706 | 0xffe2 APP2 | 3161 | ICC_PROFILE........HLino....mntr chunk 1/1
+ 15869 | 0xffed APP13 | 9594 | Photoshop 3.0.8BIM..........Z...
+ 25465 | 0xffee APP14 | 14 | Adobe.d at ......
+ 25481 | 0xffdb DQT | 132
+ 25615 | 0xfffe COM | 10 | abcdefg
+ 25627 | 0xffc0 SOF0 | 17
+ 25646 | 0xffdd DRI | 4
+ 25652 | 0xffc4 DHT | 418
+ 26072 | 0xffda SOS
+abcdefg
+STRUCTURE OF JPEG FILE: Reagan.jpg
+ address | marker | length | data
+ 0 | 0xffd8 SOI
+ 2 | 0xffe0 APP0 | 16 | JFIF.....,.,....
+ 20 | 0xffe1 APP1 | 5658 | Exif..MM.*......................
+ 5680 | 0xffe1 APP1 | 7024 | http://ns.adobe.com/xap/1.0/.<?x
+ 12706 | 0xffe2 APP2 | 3162 | ICC_PROFILE..........HLino....mn chunk 1/1
+ 15870 | 0xffed APP13 | 9594 | Photoshop 3.0.8BIM..........Z...
+ 25466 | 0xffee APP14 | 14 | Adobe.d at ......
+ 25482 | 0xffdb DQT | 132
+ 25616 | 0xffc0 SOF0 | 17
+ 25635 | 0xffdd DRI | 4
+ 25641 | 0xffc4 DHT | 418
+ 26061 | 0xffda SOS
+STRUCTURE OF JPEG FILE: Reagan.jpg
+ address | marker | length | data
+ 0 | 0xffd8 SOI
+ 2 | 0xffe0 APP0 | 16 | JFIF.....,.,....
+ 20 | 0xffe1 APP1 | 5658 | Exif..MM.*......................
+ 5680 | 0xffe1 APP1 | 7024 | http://ns.adobe.com/xap/1.0/.<?x
+ 12706 | 0xffe2 APP2 | 65514 | ICC_PROFILE........ APPL....prtr chunk 1/25
+ 78222 | 0xffe2 APP2 | 65514 | ICC_PROFILE.....X..Ih.V...j.U..4 chunk 2/25
+ 143738 | 0xffe2 APP2 | 65514 | ICC_PROFILE.....}.f...~mcx...`. chunk 3/25
+ 209254 | 0xffe2 APP2 | 65514 | ICC_PROFILE......|...S...^...v.. chunk 4/25
+ 274770 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......bXf2..`Og...^0 chunk 5/25
+ 340286 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......~.|...{.}P..y. chunk 6/25
+ 405802 | 0xffe2 APP2 | 65514 | ICC_PROFILE........b.....:...?.. chunk 7/25
+ 471318 | 0xffe2 APP2 | 65514 | ICC_PROFILE.....Q8yq].R.wW].S.uJ chunk 8/25
+ 536834 | 0xffe2 APP2 | 65514 | ICC_PROFILE.....i.T'..RA.Y..P,.. chunk 9/25
+ 602350 | 0xffe2 APP2 | 65514 | ICC_PROFILE.....i.}/..key...l.v. chunk 10/25
+ 667866 | 0xffe2 APP2 | 65514 | ICC_PROFILE.....{....O{.....|..c chunk 11/25
+ 733382 | 0xffe2 APP2 | 65514 | ICC_PROFILE.....E.;.O-F.-.R>J... chunk 12/25
+ 798898 | 0xffe2 APP2 | 65514 | ICC_PROFILE......X..up.......... chunk 13/25
+ 864414 | 0xffe2 APP2 | 65514 | ICC_PROFILE..........<.......... chunk 14/25
+ 929930 | 0xffe2 APP2 | 65514 | ICC_PROFILE................,...' chunk 15/25
+ 995446 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........g.....m%... chunk 16/25
+ 1060962 | 0xffe2 APP2 | 65514 | ICC_PROFILE........s....xX.M..n. chunk 17/25
+ 1126478 | 0xffe2 APP2 | 65514 | ICC_PROFILE..............0...... chunk 18/25
+ 1191994 | 0xffe2 APP2 | 65514 | ICC_PROFILE..........(.n.B...... chunk 19/25
+ 1257510 | 0xffe2 APP2 | 65514 | ICC_PROFILE.....0.0.282.0.282.0. chunk 20/25
+ 1323026 | 0xffe2 APP2 | 65514 | ICC_PROFILE.....175.0.176.0.175. chunk 21/25
+ 1388542 | 0xffe2 APP2 | 65514 | ICC_PROFILE.....103.0.114.0.126. chunk 22/25
+ 1454058 | 0xffe2 APP2 | 65514 | ICC_PROFILE.....6.0.049.0.053.0. chunk 23/25
+ 1519574 | 0xffe2 APP2 | 65514 | ICC_PROFILE......0.670.0.653.0.6 chunk 24/25
+ 1585090 | 0xffe2 APP2 | 41714 | ICC_PROFILE.....09.0.584.0.555.0 chunk 25/25
1626806 | 0xffed APP13 | 9594 | Photoshop 3.0.8BIM..........Z...
1636402 | 0xffee APP14 | 14 | Adobe.d at ......
1636418 | 0xffdb DQT | 132
1636552 | 0xffc0 SOF0 | 17
1636571 | 0xffdd DRI | 4
1636577 | 0xffc4 DHT | 418
- 1636997 | 0xffda SOS | 12
+ 1636997 | 0xffda SOS
+STRUCTURE OF JPEG FILE: Reagan.jpg
+ address | marker | length | data
+ 0 | 0xffd8 SOI
+ 2 | 0xffe0 APP0 | 16 | JFIF.....,.,....
+ 20 | 0xffe1 APP1 | 5658 | Exif..MM.*......................
+ 5680 | 0xffe1 APP1 | 7024 | http://ns.adobe.com/xap/1.0/.<?x
+ 12706 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......... APPL....pr chunk 1/25
+ 78222 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......X..Ih.V...j.U. chunk 2/25
+ 143738 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......}.f...~mcx... chunk 3/25
+ 209254 | 0xffe2 APP2 | 65514 | ICC_PROFILE........|...S...^...v chunk 4/25
+ 274770 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........bXf2..`Og... chunk 5/25
+ 340286 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........~.|...{.}P.. chunk 6/25
+ 405802 | 0xffe2 APP2 | 65514 | ICC_PROFILE..........b.....:...? chunk 7/25
+ 471318 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......Q8yq].R.wW].S. chunk 8/25
+ 536834 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......i.T'..RA.Y..P, chunk 9/25
+ 602350 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......i.}/..key...l. chunk 10/25
+ 667866 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......{....O{.....|. chunk 11/25
+ 733382 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......E.;.O-F.-.R>J. chunk 12/25
+ 798898 | 0xffe2 APP2 | 65514 | ICC_PROFILE........X..up........ chunk 13/25
+ 864414 | 0xffe2 APP2 | 65514 | ICC_PROFILE............<........ chunk 14/25
+ 929930 | 0xffe2 APP2 | 65514 | ICC_PROFILE..................,.. chunk 15/25
+ 995446 | 0xffe2 APP2 | 65514 | ICC_PROFILE...........g.....m%.. chunk 16/25
+ 1060962 | 0xffe2 APP2 | 65514 | ICC_PROFILE..........s....xX.M.. chunk 17/25
+ 1126478 | 0xffe2 APP2 | 65514 | ICC_PROFILE................0.... chunk 18/25
+ 1191994 | 0xffe2 APP2 | 65514 | ICC_PROFILE............(.n.B.... chunk 19/25
+ 1257510 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......0.0.282.0.282. chunk 20/25
+ 1323026 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......175.0.176.0.17 chunk 21/25
+ 1388542 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......103.0.114.0.12 chunk 22/25
+ 1454058 | 0xffe2 APP2 | 65514 | ICC_PROFILE.......6.0.049.0.053. chunk 23/25
+ 1519574 | 0xffe2 APP2 | 65514 | ICC_PROFILE........0.670.0.653.0 chunk 24/25
+ 1585090 | 0xffe2 APP2 | 41715 | ICC_PROFILE.......09.0.584.0.555 chunk 25/25
+ 1626807 | 0xffed APP13 | 9594 | Photoshop 3.0.8BIM..........Z...
+ 1636403 | 0xffee APP14 | 14 | Adobe.d at ......
+ 1636419 | 0xffdb DQT | 132
+ 1636553 | 0xfffe COM | 10 | abcdefg
+ 1636565 | 0xffc0 SOF0 | 17
+ 1636584 | 0xffdd DRI | 4
+ 1636590 | 0xffc4 DHT | 418
+ 1637010 | 0xffda SOS
+abcdefg
STRUCTURE OF JPEG FILE: Reagan.jpg
address | marker | length | data
- 0 | 0xffd8 SOI | 0
+ 0 | 0xffd8 SOI
+ 2 | 0xffe0 APP0 | 16 | JFIF.....,.,....
+ 20 | 0xffe1 APP1 | 5658 | Exif..MM.*......................
+ 5680 | 0xffe1 APP1 | 7024 | http://ns.adobe.com/xap/1.0/.<?x
+ 12706 | 0xffe2 APP2 | 65514 | ICC_PROFILE............ APPL... chunk 1/25
+ 78222 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........X..Ih.V...j. chunk 2/25
+ 143738 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........}.f...~mcx.. chunk 3/25
+ 209254 | 0xffe2 APP2 | 65514 | ICC_PROFILE..........|...S...^.. chunk 4/25
+ 274770 | 0xffe2 APP2 | 65514 | ICC_PROFILE...........bXf2..`Og. chunk 5/25
+ 340286 | 0xffe2 APP2 | 65514 | ICC_PROFILE...........~.|...{.}P chunk 6/25
+ 405802 | 0xffe2 APP2 | 65514 | ICC_PROFILE............b.....:.. chunk 7/25
+ 471318 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........Q8yq].R.wW]. chunk 8/25
+ 536834 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........i.T'..RA.Y.. chunk 9/25
+ 602350 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........i.}/..key... chunk 10/25
+ 667866 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........{....O{..... chunk 11/25
+ 733382 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........E.;.O-F.-.R> chunk 12/25
+ 798898 | 0xffe2 APP2 | 65514 | ICC_PROFILE..........X..up...... chunk 13/25
+ 864414 | 0xffe2 APP2 | 65514 | ICC_PROFILE..............<...... chunk 14/25
+ 929930 | 0xffe2 APP2 | 65514 | ICC_PROFILE...................., chunk 15/25
+ 995446 | 0xffe2 APP2 | 65514 | ICC_PROFILE.............g.....m% chunk 16/25
+ 1060962 | 0xffe2 APP2 | 65514 | ICC_PROFILE............s....xX.M chunk 17/25
+ 1126478 | 0xffe2 APP2 | 65514 | ICC_PROFILE..................0.. chunk 18/25
+ 1191994 | 0xffe2 APP2 | 65514 | ICC_PROFILE..............(.n.B.. chunk 19/25
+ 1257510 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........0.0.282.0.28 chunk 20/25
+ 1323026 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........175.0.176.0. chunk 21/25
+ 1388542 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........103.0.114.0. chunk 22/25
+ 1454058 | 0xffe2 APP2 | 65514 | ICC_PROFILE.........6.0.049.0.05 chunk 23/25
+ 1519574 | 0xffe2 APP2 | 65514 | ICC_PROFILE..........0.670.0.653 chunk 24/25
+ 1585090 | 0xffe2 APP2 | 41716 | ICC_PROFILE.........09.0.584.0.5 chunk 25/25
+ 1626808 | 0xffed APP13 | 9594 | Photoshop 3.0.8BIM..........Z...
+ 1636404 | 0xffee APP14 | 14 | Adobe.d at ......
+ 1636420 | 0xffdb DQT | 132
+ 1636554 | 0xffc0 SOF0 | 17
+ 1636573 | 0xffdd DRI | 4
+ 1636579 | 0xffc4 DHT | 418
+ 1636999 | 0xffda SOS
+STRUCTURE OF JPEG FILE: Reagan.jpg
+ address | marker | length | data
+ 0 | 0xffd8 SOI
2 | 0xffe0 APP0 | 16 | JFIF.....,.,....
20 | 0xffe1 APP1 | 5658 | Exif..MM.*......................
5680 | 0xffe1 APP1 | 7024 | http://ns.adobe.com/xap/1.0/.<?x
12706 | 0xffe2 APP2 | 3160 | ICC_PROFILE........HLino....mntr chunk 1/1
+ 15868 | 0xffed APP13 | 9594 | Photoshop 3.0.8BIM..........Z...
+ 25464 | 0xffee APP14 | 14 | Adobe.d at ......
+ 25480 | 0xffdb DQT | 132
+ 25614 | 0xffc0 SOF0 | 17
+ 25633 | 0xffdd DRI | 4
+ 25639 | 0xffc4 DHT | 418
+ 26059 | 0xffda SOS
+STRUCTURE OF JPEG FILE: Reagan.jpg
+ address | marker | length | data
+ 0 | 0xffd8 SOI
+ 2 | 0xffe0 APP0 | 16 | JFIF.....,.,....
+ 20 | 0xffe1 APP1 | 5658 | Exif..MM.*......................
+ 5680 | 0xffe1 APP1 | 7024 | http://ns.adobe.com/xap/1.0/.<?x
+ 12706 | 0xffe2 APP2 | 3161 | ICC_PROFILE..........HLino....mn chunk 1/1
+ 15869 | 0xffed APP13 | 9594 | Photoshop 3.0.8BIM..........Z...
+ 25465 | 0xffee APP14 | 14 | Adobe.d at ......
+ 25481 | 0xffdb DQT | 132
+ 25615 | 0xfffe COM | 10 | abcdefg
+ 25627 | 0xffc0 SOF0 | 17
+ 25646 | 0xffdd DRI | 4
+ 25652 | 0xffc4 DHT | 418
+ 26072 | 0xffda SOS
+abcdefg
+STRUCTURE OF JPEG FILE: Reagan.jpg
+ address | marker | length | data
+ 0 | 0xffd8 SOI
+ 2 | 0xffe0 APP0 | 16 | JFIF.....,.,....
+ 20 | 0xffe1 APP1 | 5658 | Exif..MM.*......................
+ 5680 | 0xffe1 APP1 | 7024 | http://ns.adobe.com/xap/1.0/.<?x
+ 12706 | 0xffe2 APP2 | 3162 | ICC_PROFILE............HLino... chunk 1/1
15870 | 0xffed APP13 | 9594 | Photoshop 3.0.8BIM..........Z...
25466 | 0xffee APP14 | 14 | Adobe.d at ......
25482 | 0xffdb DQT | 132
25616 | 0xffc0 SOF0 | 17
25635 | 0xffdd DRI | 4
25641 | 0xffc4 DHT | 418
- 26061 | 0xffda SOS | 12
-md5: reagan1_.icc: No such file or directory
-md5: reagan2_.icc: No such file or directory
-md5: small1_.icc: No such file or directory
-md5: small2_.icc: No such file or directory
-md5: big1_.icc: No such file or directory
-md5: big2_.icc: No such file or directory
+ 26061 | 0xffda SOS
+MD5 (reagan_1.icc) = 264d91010fb585eeae33a8eeeaa0495f
+MD5 (reagan_2.icc) = 264d91010fb585eeae33a8eeeaa0495f
+MD5 (small_1.icc) = 75e766757c564c6c4305be96914ea923
+MD5 (small_2.icc) = 75e766757c564c6c4305be96914ea923
+MD5 (big_1.icc) = 1cb491b91a36649ef694c20f493e5d55
+MD5 (big_2.icc) = 1cb491b91a36649ef694c20f493e5d55
diff --git a/test/data/small.icc b/test/data/small.icc
index 7f9d18d..90d13ca 100644
Binary files a/test/data/small.icc and b/test/data/small.icc differ
diff --git a/test/data/webp-test.out b/test/data/webp-test.out
index e91665c..4c52060 100644
--- a/test/data/webp-test.out
+++ b/test/data/webp-test.out
@@ -344,7 +344,7 @@ STRUCTURE OF WEBP FILE: exiv2-bug1199.webp
ICCP | 560 | 30 | ...0ADBE....mntrRGB XYZ ........
VP8 | 172008 | 598 | .G...*.. .>1..B.!..o.. ......]..
EXIF | 12040 | 172614 | II*........................... .
- XMP | 1677405 | 184662 | <x:xmpmeta xmlns:x="adobe:ns:met
+ XMP | 1677406 | 184662 | <x:xmpmeta xmlns:x="adobe:ns:met
STRUCTURE OF WEBP FILE: exiv2-bug1199.webp
Chunk | Length | Offset | Payload
RIFF | 187526 | 0 | WEBP
diff --git a/test/icc-test.sh b/test/icc-test.sh
index 7475de2..a3fac6a 100755
--- a/test/icc-test.sh
+++ b/test/icc-test.sh
@@ -3,6 +3,15 @@
source ./functions.source
+test2120() # --comment and -dc clobbered by writing ICC/JPG
+{
+ runTest exiv2 --comment abcdefg $filename
+ runTest exiv2 -pS $filename
+ runTest exiv2 -pc $filename
+ runTest exiv2 -dc $filename
+ runTest exiv2 -pS $filename
+}
+
( cd "$testdir"
num=1074 # ICC Profile Support
@@ -16,6 +25,7 @@ source ./functions.source
runTest exiv2 -pC $filename > reagan_1.icc
runTest exiv2 -eC --force $filename
mv $iccname_ reagan_2.icc
+ test2120
copyTestFile big.icc $iccname_
runTest exiv2 -iC $filename
@@ -23,19 +33,24 @@ source ./functions.source
runTest exiv2 -pS $filename
runTest exiv2 -eC --force $filename
mv $iccname_ big_2.icc
-
+ test2120
copyTestFile small.icc $iccname_
runTest exiv2 -iC $filename
- runTest exiv2 -pC $filename > small_.icc
+ runTest exiv2 -pC $filename > small_1.icc
runTest exiv2 -pS $filename
runTest exiv2 -eC --force $filename
mv $iccname_ small_2.icc
+ test2120
+
+
for f in reagan small big; do for i in 1 2; do
- md5 ${f}${i}_.icc
+ md5 ${f}_${i}.icc
done ; done
+
+
) 3>&1 > $results 2>&1
printf "
"
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list