Discussion:
Img package 1.4.13 broken
Add Reply
Helmut Giese
2024-11-20 20:36:34 UTC
Reply
Permalink
Hello out there,
the Img package distributed with the latest versions of Tcl contain a
bug - well, not really 'Img' itself but rather the zlib DLL it uses.

Here is what happened:
When trying to run the second example from

https://wiki.tcl-lang.org/page/CollapsableFrame+%2DA+Toggle+Resized+Labelled+Frame+Container
I got the error
IDAT: invalid distance too far back
while executing
image create photo iconeClose -format png -data $data
...
with data being defined as
set data
"iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAAHeSjtLAAAABGdBTUEAAYagMei\
WXwAAAKBJREFUCJmlUCESxCAMXJiIPqfyJOJEn8WTIpGRJxEInoKoOAGTo6X05uZ2EGw2ySYxZS8ALIC\
coqmMcooATNlL/QEgAMyhkpbXFM1hDhYdSAs+3db1oaEYX8yBlOCIJpwqzvaK7bnZnOJCS//qcGcP7Wn\
HPl+Ei6nagt77MV1EDne8B3MQEVI+uij6e9FMmDWabjfDHwWX84xx45z7yeENMlJR1s8KWugAAAAASUV\
ORK5CYII="

I found a mention of this error in
https://mirror.netzwerge.de/openbsd/Changelogs/ChangeLog.62
Search for 'invalid distance' , 2nd occurrence.

There it is said that this error was introduced in zlib 1.2.2.2 and
fixed - I think - by this commit
CVSROOT: /cvs
Module name: src
Changes by: ***@cvs.openbsd.org 2022/03/25 04:58:39

It's long ago that I filed a bug and have forgotten how and where.
If you consider it a bug, too, I would be glad for a note how to
report it.
Helmut
Paul Obermeier
2024-11-20 21:59:25 UTC
Reply
Permalink
Post by Helmut Giese
Hello out there,
the Img package distributed with the latest versions of Tcl contain a
bug - well, not really 'Img' itself but rather the zlib DLL it uses.
When trying to run the second example from
https://wiki.tcl-lang.org/page/CollapsableFrame+%2DA+Toggle+Resized+Labelled+Frame+Container
I got the error
IDAT: invalid distance too far back
while executing
image create photo iconeClose -format png -data $data
...
with data being defined as
set data
"iVBORw0KGgoAAAANSUhEUgAAABAAAAAOCAIAAAHeSjtLAAAABGdBTUEAAYagMei\
WXwAAAKBJREFUCJmlUCESxCAMXJiIPqfyJOJEn8WTIpGRJxEInoKoOAGTo6X05uZ2EGw2ySYxZS8ALIC\
coqmMcooATNlL/QEgAMyhkpbXFM1hDhYdSAs+3db1oaEYX8yBlOCIJpwqzvaK7bnZnOJCS//qcGcP7Wn\
HPl+Ei6nagt77MV1EDne8B3MQEVI+uij6e9FMmDWabjfDHwWX84xx45z7yeENMlJR1s8KWugAAAAASUV\
ORK5CYII="
I found a mention of this error in
https://mirror.netzwerge.de/openbsd/Changelogs/ChangeLog.62
Search for 'invalid distance' , 2nd occurrence.
There it is said that this error was introduced in zlib 1.2.2.2 and
fixed - I think - by this commit
CVSROOT: /cvs
Module name: src
It's long ago that I filed a bug and have forgotten how and where.
If you consider it a bug, too, I would be glad for a note how to
report it.
Helmut
Hi Helmut,

I can confirm, that the example script gives the mentioned error, if using Img 1.4.17.

It does however work, if using the latest Img version 2.0 or if using the native Tk PNG parser.
As the Img 1.4.X branch is not supported anymore (see https://tkimg.sourceforge.net/history.html#Version_1_4_17),
I have no plans to fix this specific bug.

Regards,
Paul
Helmut Giese
2024-11-22 07:51:35 UTC
Reply
Permalink
Thank you Paul,
Post by Paul Obermeier
I can confirm, that the example script gives the mentioned error, if using Img 1.4.17.
It does however work, if using the latest Img version 2.0 or if using the native Tk PNG parser.
As the Img 1.4.X branch is not supported anymore (see https://tkimg.sourceforge.net/history.html#Version_1_4_17),
I have no plans to fix this specific bug.
so no need to file a bug report.

I would like then to use Img 2.0, but when I followed the link on
https://tkimg.sourceforge.net/
where it said
Sources and executables are available in the Files section
it led me to a download page where I only obtained the sources.
Alas, I am not able to create my own binaries, so I will have to wait
until binaries for Img 2.0 will be officially available.

Best regards and have a nice weekend
Helmut

Loading...