Le 05/01/2014 21:57, Matthias Wandel a écrit :
Yes.  Use jhead in a different way.

According to the jhead documentation "jhead -ta-1 DSC.JPG" should change the 
time, not the comments.
It looks like a jhead bug (or at least an undocumented feature).

How do you propose to use jhead to change the time only?

Can you be more explicit about the feature that the proposed patch do remove?

Thanks

-----Original Message----- From: Ludovic Rousseau
Sent: Sunday, January 05, 2014 2:27 PM
To: Matthias Wandel
Cc: 733...@bugs.debian.org
Subject: Re: Fwd: Bug#733608: jhead: Comment removed when adjusting time

2014/1/5 Matthias Wandel <mwan...@sentex.ca>:
That patch removes a feature.  I'm not taking it.

OK.
Can you propose another solution to solve the problem reported by the user?

Bye

-----Original Message----- From: Ludovic Rousseau
Sent: Sunday, January 05, 2014 12:52 PM
To: Matthias Wandel
Subject: Fwd: Bug#733608: jhead: Comment removed when adjusting time


Hello Matthias,

Here is a new bug report for jhead.
I don't know if the patch is correct.

Bye


---------- Forwarded message ----------
From: Sylvain LEVEQUE <sylvain.leveque+bugrep...@gmail.com>
Date: 2013/12/30
Subject: Bug#733608: jhead: Comment removed when adjusting time
To: Debian Bug Tracking System <sub...@bugs.debian.org>


Package: jhead
Version: 1:2.97-1
Severity: normal

Dear Maintainer,

While adjusting some EXIF dates on pictures, the observed change
between the original picture and the jhead-ed one goes beyond time
modifications of the corresponding tags.

The default EXIF comment from my camera is a sequence of spaces, which
translates inside the header to "ASCII\0\0\0                   " (36
spaces overall).

This is basically my workflow:
cp -p DSC.JPG DSC_orig.JPG
jhead -ta-1 DSC.JPG
hexdump -Cv DSC_orig.JPG > DSC_orig.txt
hexdump -Cv DSC.JPG > DSC.txt

`diff DSC_orig.txt DSC.txt` returns
17c17
< 00000100  32 3a 32 35 3a 35 35 00  20 20 20 20 20 20 20 20  |2:25:55. |
---

00000100  31 3a 32 35 3a 35 35 00  20 20 20 20 20 20 20 20  |1:25:55. |

56,57c56,57
< 00000370  3a 31 32 3a 32 35 20 31  32 3a 32 35 3a 35 35 00  |:12:25
12:25:55.|
< 00000380  32 30 31 33 3a 31 32 3a  32 35 20 31 32 3a 32 35  |2013:12:25
12:25|
---

00000370  3a 31 32 3a 32 35 20 31  31 3a 32 35 3a 35 35 00  |:12:25
11:25:55.|
00000380  32 30 31 33 3a 31 32 3a  32 35 20 31 31 3a 32 35  |2013:12:25
11:25|

60,62c60,62
< 000003b0  00 00 00 0a 41 53 43 49  49 00 00 00 20 20 20 20 |....ASCII...
|
< 000003c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  | |
< 000003d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  | |
---

000003b0  00 00 00 0a 41 53 43 49  49 00 00 00 00 00 00 00
|....ASCII.......|
000003c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
|................|
000003d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
|................|



I expect the output to be
17c17
< 00000100  32 3a 32 35 3a 35 35 00  20 20 20 20 20 20 20 20  |2:25:55. |
---

00000100  31 3a 32 35 3a 35 35 00  20 20 20 20 20 20 20 20  |1:25:55. |

56,57c56,57
< 00000370  3a 31 32 3a 32 35 20 31  32 3a 32 35 3a 35 35 00  |:12:25
12:25:55.|
< 00000380  32 30 31 33 3a 31 32 3a  32 35 20 31 32 3a 32 35  |2013:12:25
12:25|
---

00000370  3a 31 32 3a 32 35 20 31  31 3a 32 35 3a 35 35 00  |:12:25
11:25:55.|
00000380  32 30 31 33 3a 31 32 3a  32 35 20 31 31 3a 32 35  |2013:12:25
11:25|



I tracked the issue down to exif.c where the code takes conditional
actions on the comment field. It will remove trailing spaces and
replace them with \0, then conditionnally copy the comment if one of
the five first characters after the 'ASCII' string is different from a
space of \0.

I expect this situation to lead to a corner case bug (untested): a
comment starting with several spaces will be wiped when adjusting
time.

I also think this happens upon creation of the modified file and is
likely not limited to the -ta option.

The issue is not Debian specific but in the upstream code. A patch is
attached to suggest a more conservative behaviour of jhead.

Thank you
--
Sylvain

-- System Information:
Debian Release: jessie/sid
 APT prefers testing
 APT policy: (990, 'testing'), (50, 'unstable'), (40, 'experimental')
Architecture: armel (armv5tel)

Kernel: Linux 3.11-2-kirkwood
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages jhead depends on:
ii  libc6          2.17-97
ii  libjpeg-progs  8d-2

jhead recommends no packages.

Versions of packages jhead suggests:
ii  imagemagick  8:6.7.7.10-7

-- no debconf information


--
Dr. Ludovic Rousseau





--
 Dr. Ludovic Rousseau


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to