diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp index 338991a0..4e34869c 100644 --- a/src/jpgimage.cpp +++ b/src/jpgimage.cpp @@ -475,8 +475,8 @@ namespace Exiv2 { std::cerr << "Found ICC Profile chunk " << chunk <<" of "<< chunks << "\n"; #endif - io_->seek(-bufRead , BasicIo::cur); // back up to start of buffer (after marker+size) - io_->seek( 16 , BasicIo::cur); // step over header + io_->seek(-bufRead , BasicIo::cur); // back up to start of buffer (after marker) + io_->seek( 16+2 , BasicIo::cur); // step size + header // read in profile DataBuf icc(size-2-16) ; io_->read( icc.pData_,icc.size_); diff --git a/test/data/icc-test.out b/test/data/icc-test.out index 32738ec7..7f2e9901 100644 --- a/test/data/icc-test.out +++ b/test/data/icc-test.out @@ -18,15 +18,15 @@ STRUCTURE OF JPEG FILE: Reagan.jpg 2 | 0xffe0 APP0 | 16 | JFIF.....,.,.... 20 | 0xffe1 APP1 | 5658 | Exif..MM.*...................... 5680 | 0xffe1 APP1 | 7024 | http://ns.adobe.com/xap/1.0/.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@...... - 1636419 | 0xffdb DQT | 132 - 1636553 | 0xfffe COM | 10 | abcdefg - 1636565 | 0xffc0 SOF0 | 17 - 1636584 | 0xffdd DRI | 4 - 1636590 | 0xffc4 DHT | 418 - 1637010 | 0xffda SOS + 12706 | 0xffe2 APP2 | 41714 | ICC_PROFILE.....09.0.584.0.555.0 chunk 1/1 + 54422 | 0xffed APP13 | 9594 | Photoshop 3.0.8BIM..........Z... + 64018 | 0xffee APP14 | 14 | Adobe.d@...... + 64034 | 0xffdb DQT | 132 + 64168 | 0xfffe COM | 10 | abcdefg + 64180 | 0xffc0 SOF0 | 17 + 64199 | 0xffdd DRI | 4 + 64205 | 0xffc4 DHT | 418 + 64625 | 0xffda SOS abcdefg STRUCTURE OF JPEG FILE: Reagan.jpg address | marker | length | data @@ -126,38 +102,14 @@ STRUCTURE OF JPEG FILE: Reagan.jpg 2 | 0xffe0 APP0 | 16 | JFIF.....,.,.... 20 | 0xffe1 APP1 | 5658 | Exif..MM.*...................... 5680 | 0xffe1 APP1 | 7024 | http://ns.adobe.com/xap/1.0/. 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@...... - 1636420 | 0xffdb DQT | 132 - 1636554 | 0xffc0 SOF0 | 17 - 1636573 | 0xffdd DRI | 4 - 1636579 | 0xffc4 DHT | 418 - 1636999 | 0xffda SOS + 12706 | 0xffe2 APP2 | 41714 | ICC_PROFILE.....09.0.584.0.555.0 chunk 1/1 + 54422 | 0xffed APP13 | 9594 | Photoshop 3.0.8BIM..........Z... + 64018 | 0xffee APP14 | 14 | Adobe.d@...... + 64034 | 0xffdb DQT | 132 + 64168 | 0xffc0 SOF0 | 17 + 64187 | 0xffdd DRI | 4 + 64193 | 0xffc4 DHT | 418 + 64613 | 0xffda SOS STRUCTURE OF JPEG FILE: Reagan.jpg address | marker | length | data 0 | 0xffd8 SOI @@ -178,15 +130,15 @@ STRUCTURE OF JPEG FILE: Reagan.jpg 2 | 0xffe0 APP0 | 16 | JFIF.....,.,.... 20 | 0xffe1 APP1 | 5658 | Exif..MM.*...................... 5680 | 0xffe1 APP1 | 7024 | http://ns.adobe.com/xap/1.0/.