Feature #1057

Implement target/modifier - (stdin/stdout) for exiv2 options -i (insert) and -e (extract)

Added by Robin Mills over 2 years ago. Updated about 1 year ago.

Status:ClosedStart date:17 Apr 2015
Priority:NormalDue date:
Assignee:Robin Mills% Done:

100%

Category:testingEstimated time:15.00 hours
Target version:0.26

Description

I added those options to the man page last week. This feature request is ensure I don't forget about this.


Related issues

Related to Exiv2 - Feature #1074: ICC Profile in APP2 segment. Closed 07 May 2015
Related to Exiv2 - Bug #1148: XMP Rights field padded with spaces Closed 08 Jan 2016

Associated revisions

Revision 3801
Added by Robin Mills over 2 years ago

#1057. Update to man page src/exiv2.1 Deferring tgt - (stdin/stdout) to v0.26.

Revision 4220
Added by Robin Mills over 1 year ago

#1057, #1064, #922, #1148. Work in progress. This is a composite patch of several matters in development. None are totally complete at this time.

Revision 4428
Added by Robin Mills about 1 year ago

#1057 man page update for tgt- (stdin/stdout).

Revision 4463
Added by Robin Mills about 1 year ago

#1057 Added support for iC to read ICC profile from stdin to an image.

Revision 4464
Added by Robin Mills about 1 year ago

#1057 Correction to r4633 to fix Windows build-breakers (Cygwin/MinGW and msvc)

Revision 4465
Added by Robin Mills about 1 year ago

#1057 Fixed src\exiv2app.hpp formatting. Moved reading stdin from ctor to getStdin(). WIP: unsolved Windows pipe issues.

Revision 4466
Added by Robin Mills about 1 year ago

#1057 Fixed issues with stdin on Windows which were documented in http://dev.exiv2.org/issues/1057#note-8

Revision 4467
Added by Robin Mills about 1 year ago

#1057. Simplification of r4466

Revision 4468
Added by Robin Mills about 1 year ago

#1057 Added support for iXX

Revision 4470
Added by Robin Mills about 1 year ago

#1074 and #1057 Fixing build breakers on Cygwin and msvc MinGW to be further investigaged. add checkSum to test functions

History

#1 Updated by Robin Mills over 2 years ago

  • Target version changed from 0.25 to 0.26

Punted to v0.26. Insufficient time. I've removed the references to stdin/stdout in the man page: r3801

#2 Updated by Robin Mills over 2 years ago

  • Assignee deleted (Robin Mills)

#3 Updated by Robin Mills almost 2 years ago

  • Assignee set to Robin Mills

#4 Updated by Robin Mills over 1 year ago

  • % Done changed from 0 to 10
  • Estimated time set to 10.00

#5 Updated by Robin Mills over 1 year ago

  • % Done changed from 10 to 40

I've done quite a lot of work on this in pursuit of #1148. I have the common target parser working and respecting stdout for Sidecars. I also have some debugging/support code ready to submit when I add code to support -eXX and -eXX-.

#6 Updated by Robin Mills about 1 year ago

  • % Done changed from 40 to 70

r4428. I believe this is done. I'll add some tests and appropriate fixes.

#7 Updated by Robin Mills about 1 year ago

  • % Done changed from 70 to 60
  • Estimated time changed from 10.00 to 15.00

r4463. Added support for -iC- to read IccProfile from stdin. Includes support in Params to read from stdin.

Work in progress. I still have to add other -itgt types such as c,a,e,XX appropriate tests to the test suite.

#8 Updated by Robin Mills about 1 year ago

r4464. Fixed file format/line-endings. Moved the code to read stdin to getStdin(). It's only read once and only read when required.

There are significant issues with this on Windows. The select() function on Unix returns when there is nothing in the stdin pipe. Windows select() only works on winsock, so Windows wants to wait until there is something in stdin or ^z (eof). Not good. I'm also getting blood curling messages on the console such as:

C:\cygwin64\home\rmills\gnu\exiv2\trunk\msvc2005\bin\win32\release>dir Reagan.* *.icc
 Volume in drive C has no label.
 Volume Serial Number is 0899-EF40

 Directory of C:\cygwin64\home\rmills\gnu\exiv2\trunk\msvc2005\bin\win32\release

09/01/2016  06:28 PM         1,613,600 Reagan.icc
08/23/2016  01:39 PM            49,770 Reagan.jpg

 Directory of C:\cygwin64\home\rmills\gnu\exiv2\trunk\msvc2005\bin\win32\release

09/01/2016  06:28 PM         1,613,600 big.icc
09/01/2016  06:28 PM         1,613,600 Reagan.icc
09/05/2016  07:19 PM             3,142 small.icc
               5 File(s)      4,893,712 bytes
               0 Dir(s)  26,778,259,456 bytes free

C:\cygwin64\home\rmills\gnu\exiv2\trunk\msvc2005\bin\win32\release>cat big.icc | exiv2 -iC- Reagan.jpg
cat: write error: No space left on device

C:\cygwin64\home\rmills\gnu\exiv2\trunk\msvc2005\bin\win32\release>type big.icc | exiv2 -iC- Reagan.jpg
The process tried to write to a nonexistent pipe.

C:\cygwin64\home\rmills\gnu\exiv2\trunk\msvc2005\bin\win32\release>type big.icc | exiv2 -pS Reagan.jpg
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 | 0xffed APP13 |    9594 | Photoshop 3.0.8BIM..........Z...
   22302 | 0xffee APP14 |      14 | Adobe.d@......
   22318 | 0xffdb DQT   |     132
   22452 | 0xffc0 SOF0  |      17
   22471 | 0xffdd DRI   |       4
   22477 | 0xffc4 DHT   |     418
   22897 | 0xffda SOS
The process tried to write to a nonexistent pipe.

C:\cygwin64\home\rmills\gnu\exiv2\trunk\msvc2005\bin\win32\release>
I haven't found anything useful yet on Google about this. Probably lots of pain ahead.

#9 Updated by Robin Mills about 1 year ago

  • % Done changed from 60 to 80

#10 Updated by Robin Mills about 1 year ago

  • Status changed from Assigned to Closed
  • % Done changed from 80 to 100

I have to add a few more tests for this. It is used in webp-test and icc-test. I'll declare victory over this now in order to update the project "News" to report feature-complete and add some more tests later today.

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux