Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Digital Photography (http://www.velocityreviews.com/forums/f37-digital-photography.html)
-   -   IrfanView Comment bug? (http://www.velocityreviews.com/forums/t958738-irfanview-comment-bug.html)

Terry Pinnell 03-17-2013 11:34 AM

IrfanView Comment bug?
 
I open a JPG in IrfanView, then its Comment dialog. If I enter text which
includes the backslash, such as in c:\test, it gets written as c:\\test.
If Write was used again, it would become c:\\\\test, and so on. Looks
plainly like a bug.

Tests with Picasa and FastStone Image Viewer gave correct handling of the
backslash.

--
Terry, East Grinstead, UK

Robert Coe 03-17-2013 12:32 PM

Re: IrfanView Comment bug?
 
On Sun, 17 Mar 2013 11:34:53 +0000, Terry Pinnell <terrypin@dial.pipex.com>
wrote:
: I open a JPG in IrfanView, then its Comment dialog. If I enter text which
: includes the backslash, such as in c:\test, it gets written as c:\\test.
: If Write was used again, it would become c:\\\\test, and so on. Looks
: plainly like a bug.
:
: Tests with Picasa and FastStone Image Viewer gave correct handling of the
: backslash.

Irfanview is betraying its Unix (or Linux) origins. In Unix and its
derivatives, the backslash is an escape character, indicating that the
following character is to be taken literally, ignoring any control function it
might otherwise have had. So the backslash itself, if it appears in ordinary
text, must be doubled. Unix needs such a feature to balance its complex,
highly recursive, command line capability. Unix programmers will sometimes
double the backslash, as was done here, to keep it from being lost in a
command scan. Since Windows doesn't need the doubling, the extra backslash
becomes superfluous.

Depending on your point of view, this explains either why the behavior you
describe isn't a bug or why the bug is there.

Bob

B. R. 'BeAr' Ederson 03-17-2013 12:35 PM

Re: IrfanView Comment bug?
 
On Sun, 17 Mar 2013 11:34:53 +0000, Terry Pinnell wrote:

> I open a JPG in IrfanView, then its Comment dialog. If I enter text which
> includes the backslash, such as in c:\test, it gets written as c:\\test.
> If Write was used again, it would become c:\\\\test, and so on. Looks
> plainly like a bug.


Confirmed for both, opening with Unicode plugin and without it. Error
is on reading, which assumes the need for character escape sequences.
Such sequences aren't necessary/expected in *.jpeg comments, though.

BeAr
--
================================================== =========================
= What do you mean with: "Perfection is always an illusion"? =
================================================== =============--(Oops!)===

David Taylor 03-17-2013 01:51 PM

Re: IrfanView Comment bug?
 
On 17/03/2013 12:32, Robert Coe wrote:
[]
> Irfanview is betraying its Unix (or Linux) origins.

[]
> Bob


More likely the programmer's use of "C" and its documentation, as there
is no UNIX-like version of IrfanView.
--
Cheers,
David
Web: http://www.satsignal.eu

Mayayana 03-17-2013 02:23 PM

Re: IrfanView Comment bug?
 
If you look at the file in a hex editor you'll
see it's been saved properly. It writes whatever
is in the window but escapes all backslashes with
an extra backslash when the text is displayed. It
does seem to be a bug. Unix has nothing to do
with it.

The only thing I can guess is the following:

\ is an operator character in RichText (RTF) such that
an actual \ in plain text (TXT) must be escaped by an
extra \ when converted to RichText.

Windows standard text windows include plain text
and RichText. The IV comments text window is a plain
text window. It may be that it used to be a RichEdit
window -- or that a RichEdit window was planned and n
ot implemented -- and updating of the text display
operation was overlooked.

Just a thought. I can't think of any valid reason for
the way it's working now.

--
--
"Terry Pinnell" <terrypin@dial.pipex.com> wrote in message
news:739bk893df8lsqr2vs57cqj5bd6dlu0q9e@4ax.com...
|I open a JPG in IrfanView, then its Comment dialog. If I enter text which
| includes the backslash, such as in c:\test, it gets written as c:\\test.
| If Write was used again, it would become c:\\\\test, and so on. Looks
| plainly like a bug.
|
| Tests with Picasa and FastStone Image Viewer gave correct handling of the
| backslash.
|
| --
| Terry, East Grinstead, UK



Terry Pinnell 03-17-2013 02:57 PM

Re: IrfanView Comment bug?
 
"Mayayana" <mayayana@invalid.nospam> wrote:

> If you look at the file in a hex editor you'll
>see it's been saved properly. It writes whatever
>is in the window but escapes all backslashes with
>an extra backslash when the text is displayed. It
>does seem to be a bug. Unix has nothing to do
>with it.
>
>The only thing I can guess is the following:
>
> \ is an operator character in RichText (RTF) such that
>an actual \ in plain text (TXT) must be escaped by an
>extra \ when converted to RichText.
>
> Windows standard text windows include plain text
>and RichText. The IV comments text window is a plain
>text window. It may be that it used to be a RichEdit
>window -- or that a RichEdit window was planned and n
>ot implemented -- and updating of the text display
>operation was overlooked.
>
> Just a thought. I can't think of any valid reason for
>the way it's working now.
>
>--


Thanks all. I've reported the bug to Irfan and will post back here with
his response.

@BeAr: I agree it's not a common requirement in most everyday text, but
for me it's essential! If I implement my Comment/Captions management with
TXT files as per our parallel discussion, then my comment will have to
include the full filename. I don't want to see that initially with double
backslashes like this
C:\\Docs\\My Pictures\\PHOTOS\\Walks
UK\\TP04\\TP04-All\\Tests\\20040820-111730.JPG

then later, after an edit, quadruple, octuple...

I'm an hour or so into trying ExifTools GUI but have a couple of basic
hangups. Will post in that thread.

--
Terry, East Grinstead, UK

B. R. 'BeAr' Ederson 03-17-2013 03:22 PM

Re: IrfanView Comment bug?
 
On Sun, 17 Mar 2013 14:57:59 +0000, Terry Pinnell wrote:

[IrfanView Jpeg comment reading bug]
| Error is on reading, which assumes the need for character escape
| sequences. Such sequences aren't necessary/expected in *.jpeg
| comments, though.
> @BeAr: I agree it's not a common requirement in most everyday text, but
> for me it's essential!


What I wrote is: *escaping characters* is not necessary/expected. ;-)

BeAr
--
================================================== =========================
= What do you mean with: "Perfection is always an illusion"? =
================================================== =============--(Oops!)===

Terry Pinnell 03-17-2013 03:31 PM

Re: IrfanView Comment bug?
 
"B. R. 'BeAr' Ederson" <br.ederson@expires-2013-03-31.arcornews.de> wrote:

>On Sun, 17 Mar 2013 14:57:59 +0000, Terry Pinnell wrote:
>
>[IrfanView Jpeg comment reading bug]
>| Error is on reading, which assumes the need for character escape
>| sequences. Such sequences aren't necessary/expected in *.jpeg
>| comments, though.
>> @BeAr: I agree it's not a common requirement in most everyday text, but
>> for me it's essential!

>
>What I wrote is: *escaping characters* is not necessary/expected. ;-)
>
>BeAr


OK, my slip!

--
Terry, East Grinstead, UK

Jon Danniken 03-17-2013 06:39 PM

Re: IrfanView Comment bug?
 
On 03/17/2013 05:32 AM, Robert Coe wrote:
> On Sun, 17 Mar 2013 11:34:53 +0000, Terry Pinnell <terrypin@dial.pipex.com>
> wrote:
> : I open a JPG in IrfanView, then its Comment dialog. If I enter text which
> : includes the backslash, such as in c:\test, it gets written as c:\\test.
> : If Write was used again, it would become c:\\\\test, and so on. Looks
> : plainly like a bug.
> :
> : Tests with Picasa and FastStone Image Viewer gave correct handling of the
> : backslash.
>
> Irfanview is betraying its Unix (or Linux) origins.


Irfanview has no *nix origins, as it is, and always has been, a Windows
application.

Perhaps you are thinking of another application?

Jon


Terry Pinnell 03-18-2013 07:56 PM

Re: IrfanView Comment bug?
 
Terry Pinnell <terrypin@dial.pipex.com> wrote:


>Thanks all. I've reported the bug to Irfan and will post back here with
>his response.


Pleased to report that Irfan fixed it with impressive promptness. A new
Metadata.dll in the Plugins folder did the trick. I expect Irfan will soon
release it.

--- Start paste ---
"\" is a special character and it was handled like that in the
original read-comment code from the JPG-Library ;-)

=> I removed the special handling, so it should be OK now, I hope no
side effects.

See the new plugin DLL, unzip it over your current DLL.
--- End paste ---


--
Terry, East Grinstead, UK


All times are GMT. The time now is 08:31 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.