tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

Wayne Oldford
Hello everyone

I am not sure when this appeared
(sometime post R 3.5.0 and after I switched to Mac OS Catalina).

I do not think it happens on all platforms (e.g. seems to work on windows).

But it seems that

      tkimage.create()

no longer works on a Mac for all png files.


(It does work for *some* old png files I have on disk but I have not been able to determine what is different about the ones that work)

Any help would be appreciated.

- Wayne


R.W. Oldford
math.uwaterloo.ca/~rwoldfor




> library(tcltk)

> fname <- "Rplot.png"
> png(filename = fname, width = 500, height = 500)
> hist(rnorm(20))
> dev.off()

> tkimage.create("photo", file = fname)

Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
  [tcl] encountered an unsupported criticial chunk type "eXIf".


______________________________

> R.version
               _
platform       x86_64-apple-darwin17.0
arch           x86_64
os             darwin17.0
system         x86_64, darwin17.0
status
major          4
minor          0.0
year           2020
month          04
day            24
svn rev        78286
language       R
version.string R version 4.0.0 (2020-04-24)
nickname       Arbor Day

___________________________

macOS Catalina V 10.15.5

___________________________________________________


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

Peter Dalgaard-2
Happy enough for me on Mojave.

On the off chance that you are picking up an old Tcl, do you see this?

> tcl("info","tclversion")
<Tcl> 8.6


-pd

> On 11 Jun 2020, at 23:04 , Wayne Oldford <[hidden email]> wrote:
>
> Hello everyone
>
> I am not sure when this appeared
> (sometime post R 3.5.0 and after I switched to Mac OS Catalina).
>
> I do not think it happens on all platforms (e.g. seems to work on windows).
>
> But it seems that
>
>      tkimage.create()
>
> no longer works on a Mac for all png files.
>
>
> (It does work for *some* old png files I have on disk but I have not been able to determine what is different about the ones that work)
>
> Any help would be appreciated.
>
> - Wayne
>
>
> R.W. Oldford
> math.uwaterloo.ca/~rwoldfor
>
>
>
>
>> library(tcltk)
>
>> fname <- "Rplot.png"
>> png(filename = fname, width = 500, height = 500)
>> hist(rnorm(20))
>> dev.off()
>
>> tkimage.create("photo", file = fname)
>
> Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
>  [tcl] encountered an unsupported criticial chunk type "eXIf".
>
>
> ______________________________
>
>> R.version
>               _
> platform       x86_64-apple-darwin17.0
> arch           x86_64
> os             darwin17.0
> system         x86_64, darwin17.0
> status
> major          4
> minor          0.0
> year           2020
> month          04
> day            24
> svn rev        78286
> language       R
> version.string R version 4.0.0 (2020-04-24)
> nickname       Arbor Day
>
> ___________________________
>
> macOS Catalina V 10.15.5
>
> ___________________________________________________
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: [hidden email]  Priv: [hidden email]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

Wayne Oldford
Yes.
I seem to be picking up
<Tcl>  8.6
I should have noted that.

Use to work for me too in Mojave.
I have the sneaky feeling that Catalina is the problem.

R. W. Oldford

https://math.uwaterloo.ca/~rwoldfor

________________________________
From: Peter Dalgaard <[hidden email]>
Sent: Thursday, June 11, 2020 5:56:15 PM
To: Wayne Oldford <[hidden email]>
Cc: [hidden email] <[hidden email]>
Subject: Re: [Rd] tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

Happy enough for me on Mojave.

On the off chance that you are picking up an old Tcl, do you see this?

> tcl("info","tclversion")
<Tcl> 8.6


-pd

> On 11 Jun 2020, at 23:04 , Wayne Oldford <[hidden email]> wrote:
>
> Hello everyone
>
> I am not sure when this appeared
> (sometime post R 3.5.0 and after I switched to Mac OS Catalina).
>
> I do not think it happens on all platforms (e.g. seems to work on windows).
>
> But it seems that
>
>      tkimage.create()
>
> no longer works on a Mac for all png files.
>
>
> (It does work for *some* old png files I have on disk but I have not been able to determine what is different about the ones that work)
>
> Any help would be appreciated.
>
> - Wayne
>
>
> R.W. Oldford
> math.uwaterloo.ca/~rwoldfor
>
>
>
>
>> library(tcltk)
>
>> fname <- "Rplot.png"
>> png(filename = fname, width = 500, height = 500)
>> hist(rnorm(20))
>> dev.off()
>
>> tkimage.create("photo", file = fname)
>
> Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
>  [tcl] encountered an unsupported criticial chunk type "eXIf".
>
>
> ______________________________
>
>> R.version
>               _
> platform       x86_64-apple-darwin17.0
> arch           x86_64
> os             darwin17.0
> system         x86_64, darwin17.0
> status
> major          4
> minor          0.0
> year           2020
> month          04
> day            24
> svn rev        78286
> language       R
> version.string R version 4.0.0 (2020-04-24)
> nickname       Arbor Day
>
> ___________________________
>
> macOS Catalina V 10.15.5
>
> ___________________________________________________
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: [hidden email]  Priv: [hidden email]










        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

Fox, John
In reply to this post by Peter Dalgaard-2
Dear Wayne and Peter,

FWIW, I observe exactly the same problem in Catalina. The error and my session info:

-------- snip --------

> tkimage.create("photo", file = fname)
Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
  [tcl] encountered an unsupported criticial chunk type "eXIf".

> sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.5

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] tcltk     stats     graphics  grDevices utils     datasets  methods   base    

loaded via a namespace (and not attached):
[1] compiler_4.0.0 tools_4.0.0  

-------- snip --------

This is from RStudio but I see the same thing in the R.app.

I hope this is of some help,
 John

 -----------------------------
  John Fox, Professor Emeritus
  McMaster University
  Hamilton, Ontario, Canada
  Web: http::/socserv.mcmaster.ca/jfox

> On Jun 11, 2020, at 6:43 PM, Wayne Oldford <[hidden email]> wrote:
>
> Yes.
> I seem to be picking up
> <Tcl>  8.6
> I should have noted that.
>
> Use to work for me too in Mojave.
> I have the sneaky feeling that Catalina is the problem.
>
> R. W. Oldford
>
> https://math.uwaterloo.ca/~rwoldfor
>
> ________________________________
> From: Peter Dalgaard <[hidden email]>
> Sent: Thursday, June 11, 2020 5:56:15 PM
> To: Wayne Oldford <[hidden email]>
> Cc: [hidden email] <[hidden email]>
> Subject: Re: [Rd] tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"
>
> Happy enough for me on Mojave.
>
> On the off chance that you are picking up an old Tcl, do you see this?
>
>> tcl("info","tclversion")
> <Tcl> 8.6
>
>
> -pd
>
>> On 11 Jun 2020, at 23:04 , Wayne Oldford <[hidden email]> wrote:
>>
>> Hello everyone
>>
>> I am not sure when this appeared
>> (sometime post R 3.5.0 and after I switched to Mac OS Catalina).
>>
>> I do not think it happens on all platforms (e.g. seems to work on windows).
>>
>> But it seems that
>>
>>     tkimage.create()
>>
>> no longer works on a Mac for all png files.
>>
>>
>> (It does work for *some* old png files I have on disk but I have not been able to determine what is different about the ones that work)
>>
>> Any help would be appreciated.
>>
>> - Wayne
>>
>>
>> R.W. Oldford
>> math.uwaterloo.ca/~rwoldfor
>>
>>
>>
>>
>>> library(tcltk)
>>
>>> fname <- "Rplot.png"
>>> png(filename = fname, width = 500, height = 500)
>>> hist(rnorm(20))
>>> dev.off()
>>
>>> tkimage.create("photo", file = fname)
>>
>> Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
>> [tcl] encountered an unsupported criticial chunk type "eXIf".
>>
>>
>> ______________________________
>>
>>> R.version
>>              _
>> platform       x86_64-apple-darwin17.0
>> arch           x86_64
>> os             darwin17.0
>> system         x86_64, darwin17.0
>> status
>> major          4
>> minor          0.0
>> year           2020
>> month          04
>> day            24
>> svn rev        78286
>> language       R
>> version.string R version 4.0.0 (2020-04-24)
>> nickname       Arbor Day
>>
>> ___________________________
>>
>> macOS Catalina V 10.15.5
>>
>> ___________________________________________________
>>
>>
>>       [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Office: A 4.23
> Email: [hidden email]  Priv: [hidden email]
>
>
>
>
>
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



 
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

Wayne Oldford
I don't know what has changed with Catalina

But I just tried my tk console from the shell command tkcon
And got the following error.
Here is my shell:

$ tkcon

  dyld: Library not loaded: /usr/local/lib:/opt/X11/lib/libtk8.6.dylib
      Referenced from: /usr/local/bin/wish
      Reason: image not found
    Abort trap: 6


I don't know whether this is a red herring or not, but the
Console fails to boot.

John does it work for you?

Not sure whether Python has the same trouble.  Kind of old info at https://www.python.org/download/mac/tcltk/ 




-----Original Message-----
From: "Fox, John" <[hidden email]>
Date: Thursday, June 11, 2020 at 7:54 PM
To: Wayne Oldford <[hidden email]>
Cc: Peter Dalgaard <[hidden email]>, "[hidden email]" <[hidden email]>
Subject: Re: [Rd]  tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

    Dear Wayne and Peter,
   
    FWIW, I observe exactly the same problem in Catalina. The error and my session info:
   
    -------- snip --------
   
    > tkimage.create("photo", file = fname)
    Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
      [tcl] encountered an unsupported criticial chunk type "eXIf".
   
    > sessionInfo()
    R version 4.0.0 (2020-04-24)
    Platform: x86_64-apple-darwin17.0 (64-bit)
    Running under: macOS Catalina 10.15.5
   
    Matrix products: default
    BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
    LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
   
    locale:
    [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
   
    attached base packages:
    [1] tcltk     stats     graphics  grDevices utils     datasets  methods   base    
   
    loaded via a namespace (and not attached):
    [1] compiler_4.0.0 tools_4.0.0  
   
    -------- snip --------
   
    This is from RStudio but I see the same thing in the R.app.
   
    I hope this is of some help,
     John
   
     -----------------------------
      John Fox, Professor Emeritus
      McMaster University
      Hamilton, Ontario, Canada
      Web: http::/socserv.mcmaster.ca/jfox
   
    > On Jun 11, 2020, at 6:43 PM, Wayne Oldford <[hidden email]> wrote:
    >
    > Yes.
    > I seem to be picking up
    > <Tcl>  8.6
    > I should have noted that.
    >
    > Use to work for me too in Mojave.
    > I have the sneaky feeling that Catalina is the problem.
    >
    > R. W. Oldford
    >
    > https://math.uwaterloo.ca/~rwoldfor
    >
    > ________________________________
    > From: Peter Dalgaard <[hidden email]>
    > Sent: Thursday, June 11, 2020 5:56:15 PM
    > To: Wayne Oldford <[hidden email]>
    > Cc: [hidden email] <[hidden email]>
    > Subject: Re: [Rd] tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"
    >
    > Happy enough for me on Mojave.
    >
    > On the off chance that you are picking up an old Tcl, do you see this?
    >
    >> tcl("info","tclversion")
    > <Tcl> 8.6
    >
    >
    > -pd
    >
    >> On 11 Jun 2020, at 23:04 , Wayne Oldford <[hidden email]> wrote:
    >>
    >> Hello everyone
    >>
    >> I am not sure when this appeared
    >> (sometime post R 3.5.0 and after I switched to Mac OS Catalina).
    >>
    >> I do not think it happens on all platforms (e.g. seems to work on windows).
    >>
    >> But it seems that
    >>
    >>     tkimage.create()
    >>
    >> no longer works on a Mac for all png files.
    >>
    >>
    >> (It does work for *some* old png files I have on disk but I have not been able to determine what is different about the ones that work)
    >>
    >> Any help would be appreciated.
    >>
    >> - Wayne
    >>
    >>
    >> R.W. Oldford
    >> math.uwaterloo.ca/~rwoldfor
    >>
    >>
    >>
    >>
    >>> library(tcltk)
    >>
    >>> fname <- "Rplot.png"
    >>> png(filename = fname, width = 500, height = 500)
    >>> hist(rnorm(20))
    >>> dev.off()
    >>
    >>> tkimage.create("photo", file = fname)
    >>
    >> Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
    >> [tcl] encountered an unsupported criticial chunk type "eXIf".
    >>
    >>
    >> ______________________________
    >>
    >>> R.version
    >>              _
    >> platform       x86_64-apple-darwin17.0
    >> arch           x86_64
    >> os             darwin17.0
    >> system         x86_64, darwin17.0
    >> status
    >> major          4
    >> minor          0.0
    >> year           2020
    >> month          04
    >> day            24
    >> svn rev        78286
    >> language       R
    >> version.string R version 4.0.0 (2020-04-24)
    >> nickname       Arbor Day
    >>
    >> ___________________________
    >>
    >> macOS Catalina V 10.15.5
    >>
    >> ___________________________________________________
    >>
    >>
    >>       [[alternative HTML version deleted]]
    >>
    >> ______________________________________________
    >> [hidden email] mailing list
    >> https://stat.ethz.ch/mailman/listinfo/r-devel
    >
    > --
    > Peter Dalgaard, Professor,
    > Center for Statistics, Copenhagen Business School
    > Solbjerg Plads 3, 2000 Frederiksberg, Denmark
    > Phone: (+45)38153501
    > Office: A 4.23
    > Email: [hidden email]  Priv: [hidden email]
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    > [[alternative HTML version deleted]]
    >
    > ______________________________________________
    > [hidden email] mailing list
    > https://stat.ethz.ch/mailman/listinfo/r-devel
   
   
   
     

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

Simon Urbanek
Wayne,

that one is unrelated, but interesting - you can fix it with

sudo install_name_tool -change \
  /usr/local/lib:/opt/X11/lib/libtk8.6.dylib \
  /usr/local/lib/libtk8.6.dylib \
  /usr/local/bin/wish8.6

There is a bug in tcltk with IDs on the libraries which I have worked-around for R, but not for wish.

Back to the original question - do you have any example of a file that doesn't work so I could test? Exif chunks are fairly rare in PNG and are a more late extension so I couldn't find any examples.

Thanks,
Simon


> On 12/06/2020, at 12:24 PM, Wayne Oldford <[hidden email]> wrote:
>
> I don't know what has changed with Catalina
>
> But I just tried my tk console from the shell command tkcon
> And got the following error.
> Here is my shell:
>
> $ tkcon
>
>  dyld: Library not loaded: /usr/local/lib:/opt/X11/lib/libtk8.6.dylib
>      Referenced from: /usr/local/bin/wish
>      Reason: image not found
>    Abort trap: 6
>
>
> I don't know whether this is a red herring or not, but the
> Console fails to boot.
>
> John does it work for you?
>
> Not sure whether Python has the same trouble.  Kind of old info at https://www.python.org/download/mac/tcltk/ 
>
>
>
>
> -----Original Message-----
> From: "Fox, John" <[hidden email]>
> Date: Thursday, June 11, 2020 at 7:54 PM
> To: Wayne Oldford <[hidden email]>
> Cc: Peter Dalgaard <[hidden email]>, "[hidden email]" <[hidden email]>
> Subject: Re: [Rd]  tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"
>
>    Dear Wayne and Peter,
>
>    FWIW, I observe exactly the same problem in Catalina. The error and my session info:
>
>    -------- snip --------
>
>> tkimage.create("photo", file = fname)
>    Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
>      [tcl] encountered an unsupported criticial chunk type "eXIf".
>
>> sessionInfo()
>    R version 4.0.0 (2020-04-24)
>    Platform: x86_64-apple-darwin17.0 (64-bit)
>    Running under: macOS Catalina 10.15.5
>
>    Matrix products: default
>    BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
>    LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
>
>    locale:
>    [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
>
>    attached base packages:
>    [1] tcltk     stats     graphics  grDevices utils     datasets  methods   base    
>
>    loaded via a namespace (and not attached):
>    [1] compiler_4.0.0 tools_4.0.0  
>
>    -------- snip --------
>
>    This is from RStudio but I see the same thing in the R.app.
>
>    I hope this is of some help,
>     John
>
>     -----------------------------
>      John Fox, Professor Emeritus
>      McMaster University
>      Hamilton, Ontario, Canada
>      Web: http::/socserv.mcmaster.ca/jfox
>
>> On Jun 11, 2020, at 6:43 PM, Wayne Oldford <[hidden email]> wrote:
>>
>> Yes.
>> I seem to be picking up
>> <Tcl>  8.6
>> I should have noted that.
>>
>> Use to work for me too in Mojave.
>> I have the sneaky feeling that Catalina is the problem.
>>
>> R. W. Oldford
>>
>> https://math.uwaterloo.ca/~rwoldfor
>>
>> ________________________________
>> From: Peter Dalgaard <[hidden email]>
>> Sent: Thursday, June 11, 2020 5:56:15 PM
>> To: Wayne Oldford <[hidden email]>
>> Cc: [hidden email] <[hidden email]>
>> Subject: Re: [Rd] tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"
>>
>> Happy enough for me on Mojave.
>>
>> On the off chance that you are picking up an old Tcl, do you see this?
>>
>>> tcl("info","tclversion")
>> <Tcl> 8.6
>>
>>
>> -pd
>>
>>> On 11 Jun 2020, at 23:04 , Wayne Oldford <[hidden email]> wrote:
>>>
>>> Hello everyone
>>>
>>> I am not sure when this appeared
>>> (sometime post R 3.5.0 and after I switched to Mac OS Catalina).
>>>
>>> I do not think it happens on all platforms (e.g. seems to work on windows).
>>>
>>> But it seems that
>>>
>>>    tkimage.create()
>>>
>>> no longer works on a Mac for all png files.
>>>
>>>
>>> (It does work for *some* old png files I have on disk but I have not been able to determine what is different about the ones that work)
>>>
>>> Any help would be appreciated.
>>>
>>> - Wayne
>>>
>>>
>>> R.W. Oldford
>>> math.uwaterloo.ca/~rwoldfor
>>>
>>>
>>>
>>>
>>>> library(tcltk)
>>>
>>>> fname <- "Rplot.png"
>>>> png(filename = fname, width = 500, height = 500)
>>>> hist(rnorm(20))
>>>> dev.off()
>>>
>>>> tkimage.create("photo", file = fname)
>>>
>>> Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
>>> [tcl] encountered an unsupported criticial chunk type "eXIf".
>>>
>>>
>>> ______________________________
>>>
>>>> R.version
>>>             _
>>> platform       x86_64-apple-darwin17.0
>>> arch           x86_64
>>> os             darwin17.0
>>> system         x86_64, darwin17.0
>>> status
>>> major          4
>>> minor          0.0
>>> year           2020
>>> month          04
>>> day            24
>>> svn rev        78286
>>> language       R
>>> version.string R version 4.0.0 (2020-04-24)
>>> nickname       Arbor Day
>>>
>>> ___________________________
>>>
>>> macOS Catalina V 10.15.5
>>>
>>> ___________________________________________________
>>>
>>>
>>>      [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> [hidden email] mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>> --
>> Peter Dalgaard, Professor,
>> Center for Statistics, Copenhagen Business School
>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>> Phone: (+45)38153501
>> Office: A 4.23
>> Email: [hidden email]  Priv: [hidden email]
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
>
>
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

Simon Urbanek
Some googling suggests that this is an issue in tcltk which doesn't support png files with Exif tags. Are you sure this ever worked? This doesn't seem to be related to the macOS version since it's a feature tcltk, not the system.

I had no issue using the png package, so you could simply remove any offending chunks with

writePNG("test.png",readPNG("exIf.png", TRUE,TRUE))

then the output work with tcltk.

Cheers,
Simon


> On 12/06/2020, at 1:00 PM, Simon Urbanek <[hidden email]> wrote:
>
> Wayne,
>
> that one is unrelated, but interesting - you can fix it with
>
> sudo install_name_tool -change \
>  /usr/local/lib:/opt/X11/lib/libtk8.6.dylib \
>  /usr/local/lib/libtk8.6.dylib \
>  /usr/local/bin/wish8.6
>
> There is a bug in tcltk with IDs on the libraries which I have worked-around for R, but not for wish.
>
> Back to the original question - do you have any example of a file that doesn't work so I could test? Exif chunks are fairly rare in PNG and are a more late extension so I couldn't find any examples.
>
> Thanks,
> Simon
>
>
>> On 12/06/2020, at 12:24 PM, Wayne Oldford <[hidden email]> wrote:
>>
>> I don't know what has changed with Catalina
>>
>> But I just tried my tk console from the shell command tkcon
>> And got the following error.
>> Here is my shell:
>>
>> $ tkcon
>>
>> dyld: Library not loaded: /usr/local/lib:/opt/X11/lib/libtk8.6.dylib
>>     Referenced from: /usr/local/bin/wish
>>     Reason: image not found
>>   Abort trap: 6
>>
>>
>> I don't know whether this is a red herring or not, but the
>> Console fails to boot.
>>
>> John does it work for you?
>>
>> Not sure whether Python has the same trouble.  Kind of old info at https://www.python.org/download/mac/tcltk/ 
>>
>>
>>
>>
>> -----Original Message-----
>> From: "Fox, John" <[hidden email]>
>> Date: Thursday, June 11, 2020 at 7:54 PM
>> To: Wayne Oldford <[hidden email]>
>> Cc: Peter Dalgaard <[hidden email]>, "[hidden email]" <[hidden email]>
>> Subject: Re: [Rd]  tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"
>>
>>   Dear Wayne and Peter,
>>
>>   FWIW, I observe exactly the same problem in Catalina. The error and my session info:
>>
>>   -------- snip --------
>>
>>> tkimage.create("photo", file = fname)
>>   Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
>>     [tcl] encountered an unsupported criticial chunk type "eXIf".
>>
>>> sessionInfo()
>>   R version 4.0.0 (2020-04-24)
>>   Platform: x86_64-apple-darwin17.0 (64-bit)
>>   Running under: macOS Catalina 10.15.5
>>
>>   Matrix products: default
>>   BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
>>   LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
>>
>>   locale:
>>   [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
>>
>>   attached base packages:
>>   [1] tcltk     stats     graphics  grDevices utils     datasets  methods   base    
>>
>>   loaded via a namespace (and not attached):
>>   [1] compiler_4.0.0 tools_4.0.0  
>>
>>   -------- snip --------
>>
>>   This is from RStudio but I see the same thing in the R.app.
>>
>>   I hope this is of some help,
>>    John
>>
>>    -----------------------------
>>     John Fox, Professor Emeritus
>>     McMaster University
>>     Hamilton, Ontario, Canada
>>     Web: http::/socserv.mcmaster.ca/jfox
>>
>>> On Jun 11, 2020, at 6:43 PM, Wayne Oldford <[hidden email]> wrote:
>>>
>>> Yes.
>>> I seem to be picking up
>>> <Tcl>  8.6
>>> I should have noted that.
>>>
>>> Use to work for me too in Mojave.
>>> I have the sneaky feeling that Catalina is the problem.
>>>
>>> R. W. Oldford
>>>
>>> https://math.uwaterloo.ca/~rwoldfor
>>>
>>> ________________________________
>>> From: Peter Dalgaard <[hidden email]>
>>> Sent: Thursday, June 11, 2020 5:56:15 PM
>>> To: Wayne Oldford <[hidden email]>
>>> Cc: [hidden email] <[hidden email]>
>>> Subject: Re: [Rd] tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"
>>>
>>> Happy enough for me on Mojave.
>>>
>>> On the off chance that you are picking up an old Tcl, do you see this?
>>>
>>>> tcl("info","tclversion")
>>> <Tcl> 8.6
>>>
>>>
>>> -pd
>>>
>>>> On 11 Jun 2020, at 23:04 , Wayne Oldford <[hidden email]> wrote:
>>>>
>>>> Hello everyone
>>>>
>>>> I am not sure when this appeared
>>>> (sometime post R 3.5.0 and after I switched to Mac OS Catalina).
>>>>
>>>> I do not think it happens on all platforms (e.g. seems to work on windows).
>>>>
>>>> But it seems that
>>>>
>>>>   tkimage.create()
>>>>
>>>> no longer works on a Mac for all png files.
>>>>
>>>>
>>>> (It does work for *some* old png files I have on disk but I have not been able to determine what is different about the ones that work)
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> - Wayne
>>>>
>>>>
>>>> R.W. Oldford
>>>> math.uwaterloo.ca/~rwoldfor
>>>>
>>>>
>>>>
>>>>
>>>>> library(tcltk)
>>>>
>>>>> fname <- "Rplot.png"
>>>>> png(filename = fname, width = 500, height = 500)
>>>>> hist(rnorm(20))
>>>>> dev.off()
>>>>
>>>>> tkimage.create("photo", file = fname)
>>>>
>>>> Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
>>>> [tcl] encountered an unsupported criticial chunk type "eXIf".
>>>>
>>>>
>>>> ______________________________
>>>>
>>>>> R.version
>>>>            _
>>>> platform       x86_64-apple-darwin17.0
>>>> arch           x86_64
>>>> os             darwin17.0
>>>> system         x86_64, darwin17.0
>>>> status
>>>> major          4
>>>> minor          0.0
>>>> year           2020
>>>> month          04
>>>> day            24
>>>> svn rev        78286
>>>> language       R
>>>> version.string R version 4.0.0 (2020-04-24)
>>>> nickname       Arbor Day
>>>>
>>>> ___________________________
>>>>
>>>> macOS Catalina V 10.15.5
>>>>
>>>> ___________________________________________________
>>>>
>>>>
>>>>     [[alternative HTML version deleted]]
>>>>
>>>> ______________________________________________
>>>> [hidden email] mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>
>>> --
>>> Peter Dalgaard, Professor,
>>> Center for Statistics, Copenhagen Business School
>>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>>> Phone: (+45)38153501
>>> Office: A 4.23
>>> Email: [hidden email]  Priv: [hidden email]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> [hidden email] mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>>
>>
>>
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

Fox, John
In reply to this post by Simon Urbanek
Dear Simon,

> On Jun 11, 2020, at 9:00 PM, Simon Urbanek <[hidden email]> wrote:
>
> Wayne,
>
> that one is unrelated, but interesting - you can fix it with
>
> sudo install_name_tool -change \
>  /usr/local/lib:/opt/X11/lib/libtk8.6.dylib \
>  /usr/local/lib/libtk8.6.dylib \
>  /usr/local/bin/wish8.6
>
> There is a bug in tcltk with IDs on the libraries which I have worked-around for R, but not for wish.
>
> Back to the original question - do you have any example of a file that doesn't work so I could test? Exif chunks are fairly rare in PNG and are a more late extension so I couldn't find any examples.

The code in Wayne's original message (copied below) generated the offending file:

library(tcltk)

fname <- "Rplot.png"
png(filename = fname, width = 500, height = 500)
hist(rnorm(20))
dev.off()

tkimage.create("photo", file = fname)

Best,
 John


>
> Thanks,
> Simon
>
>
>> On 12/06/2020, at 12:24 PM, Wayne Oldford <[hidden email]> wrote:
>>
>> I don't know what has changed with Catalina
>>
>> But I just tried my tk console from the shell command tkcon
>> And got the following error.
>> Here is my shell:
>>
>> $ tkcon
>>
>> dyld: Library not loaded: /usr/local/lib:/opt/X11/lib/libtk8.6.dylib
>>     Referenced from: /usr/local/bin/wish
>>     Reason: image not found
>>   Abort trap: 6
>>
>>
>> I don't know whether this is a red herring or not, but the
>> Console fails to boot.
>>
>> John does it work for you?
>>
>> Not sure whether Python has the same trouble.  Kind of old info at https://www.python.org/download/mac/tcltk/ 
>>
>>
>>
>>
>> -----Original Message-----
>> From: "Fox, John" <[hidden email]>
>> Date: Thursday, June 11, 2020 at 7:54 PM
>> To: Wayne Oldford <[hidden email]>
>> Cc: Peter Dalgaard <[hidden email]>, "[hidden email]" <[hidden email]>
>> Subject: Re: [Rd]  tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"
>>
>>   Dear Wayne and Peter,
>>
>>   FWIW, I observe exactly the same problem in Catalina. The error and my session info:
>>
>>   -------- snip --------
>>
>>> tkimage.create("photo", file = fname)
>>   Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
>>     [tcl] encountered an unsupported criticial chunk type "eXIf".
>>
>>> sessionInfo()
>>   R version 4.0.0 (2020-04-24)
>>   Platform: x86_64-apple-darwin17.0 (64-bit)
>>   Running under: macOS Catalina 10.15.5
>>
>>   Matrix products: default
>>   BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
>>   LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
>>
>>   locale:
>>   [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
>>
>>   attached base packages:
>>   [1] tcltk     stats     graphics  grDevices utils     datasets  methods   base    
>>
>>   loaded via a namespace (and not attached):
>>   [1] compiler_4.0.0 tools_4.0.0  
>>
>>   -------- snip --------
>>
>>   This is from RStudio but I see the same thing in the R.app.
>>
>>   I hope this is of some help,
>>    John
>>
>>    -----------------------------
>>     John Fox, Professor Emeritus
>>     McMaster University
>>     Hamilton, Ontario, Canada
>>     Web: http::/socserv.mcmaster.ca/jfox
>>
>>> On Jun 11, 2020, at 6:43 PM, Wayne Oldford <[hidden email]> wrote:
>>>
>>> Yes.
>>> I seem to be picking up
>>> <Tcl>  8.6
>>> I should have noted that.
>>>
>>> Use to work for me too in Mojave.
>>> I have the sneaky feeling that Catalina is the problem.
>>>
>>> R. W. Oldford
>>>
>>> https://math.uwaterloo.ca/~rwoldfor
>>>
>>> ________________________________
>>> From: Peter Dalgaard <[hidden email]>
>>> Sent: Thursday, June 11, 2020 5:56:15 PM
>>> To: Wayne Oldford <[hidden email]>
>>> Cc: [hidden email] <[hidden email]>
>>> Subject: Re: [Rd] tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"
>>>
>>> Happy enough for me on Mojave.
>>>
>>> On the off chance that you are picking up an old Tcl, do you see this?
>>>
>>>> tcl("info","tclversion")
>>> <Tcl> 8.6
>>>
>>>
>>> -pd
>>>
>>>> On 11 Jun 2020, at 23:04 , Wayne Oldford <[hidden email]> wrote:
>>>>
>>>> Hello everyone
>>>>
>>>> I am not sure when this appeared
>>>> (sometime post R 3.5.0 and after I switched to Mac OS Catalina).
>>>>
>>>> I do not think it happens on all platforms (e.g. seems to work on windows).
>>>>
>>>> But it seems that
>>>>
>>>>   tkimage.create()
>>>>
>>>> no longer works on a Mac for all png files.
>>>>
>>>>
>>>> (It does work for *some* old png files I have on disk but I have not been able to determine what is different about the ones that work)
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> - Wayne
>>>>
>>>>
>>>> R.W. Oldford
>>>> math.uwaterloo.ca/~rwoldfor
>>>>
>>>>
>>>>
>>>>
>>>>> library(tcltk)
>>>>
>>>>> fname <- "Rplot.png"
>>>>> png(filename = fname, width = 500, height = 500)
>>>>> hist(rnorm(20))
>>>>> dev.off()
>>>>
>>>>> tkimage.create("photo", file = fname)
>>>>
>>>> Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
>>>> [tcl] encountered an unsupported criticial chunk type "eXIf".
>>>>
>>>>
>>>> ______________________________
>>>>
>>>>> R.version
>>>>            _
>>>> platform       x86_64-apple-darwin17.0
>>>> arch           x86_64
>>>> os             darwin17.0
>>>> system         x86_64, darwin17.0
>>>> status
>>>> major          4
>>>> minor          0.0
>>>> year           2020
>>>> month          04
>>>> day            24
>>>> svn rev        78286
>>>> language       R
>>>> version.string R version 4.0.0 (2020-04-24)
>>>> nickname       Arbor Day
>>>>
>>>> ___________________________
>>>>
>>>> macOS Catalina V 10.15.5
>>>>
>>>> ___________________________________________________
>>>>
>>>>
>>>>     [[alternative HTML version deleted]]
>>>>
>>>> ______________________________________________
>>>> [hidden email] mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>
>>> --
>>> Peter Dalgaard, Professor,
>>> Center for Statistics, Copenhagen Business School
>>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>>> Phone: (+45)38153501
>>> Office: A 4.23
>>> Email: [hidden email]  Priv: [hidden email]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> ______________________________________________
>>> [hidden email] mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>>
>>
>>
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

Prof Brian Ripley
On 12/06/2020 03:49, Fox, John wrote:

> Dear Simon,
>
>> On Jun 11, 2020, at 9:00 PM, Simon Urbanek <[hidden email]> wrote:
>>
>> Wayne,
>>
>> that one is unrelated, but interesting - you can fix it with
>>
>> sudo install_name_tool -change \
>>   /usr/local/lib:/opt/X11/lib/libtk8.6.dylib \
>>   /usr/local/lib/libtk8.6.dylib \
>>   /usr/local/bin/wish8.6
>>
>> There is a bug in tcltk with IDs on the libraries which I have worked-around for R, but not for wish.
>>
>> Back to the original question - do you have any example of a file that doesn't work so I could test? Exif chunks are fairly rare in PNG and are a more late extension so I couldn't find any examples.
>
> The code in Wayne's original message (copied below) generated the offending file:
>
> library(tcltk)
>
> fname <- "Rplot.png"
> png(filename = fname, width = 500, height = 500)
> hist(rnorm(20))
> dev.off()
>
> tkimage.create("photo", file = fname)

There are several png() devices for R.  The default on macOS is to use
Quartz, and that depends on macOS system functions so might well have
changed with Mojave -> Catalina.

As a workaround, try e.g. png(type='cairo').  E.g.

fname <- file.path(tempdir(), "Rplot.png")
png(filename = fname, width = 500, height = 500, type="cairo")
hist(rnorm(20))
dev.off()

library(tcltk)
tkimage.create("photo", file = fname)

works for me on Catalina.


--
Brian D. Ripley,                  [hidden email]
Emeritus Professor of Applied Statistics, University of Oxford

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

Simon Urbanek-4
Ah, thanks, Brian, so the issue is that Catalina is now embedding Exif tags while previous versions didn’t. Tcltk never supported them, but it only came up now as Catalina is generating them. I’ll check if tcltk has ever fixed it.

Sent from my iPhone

> On 12 Jun 2020, at 19:00, Prof Brian Ripley <[hidden email]> wrote:
>
>> On 12/06/2020 03:49, Fox, John wrote:
>> Dear Simon,
>>> On Jun 11, 2020, at 9:00 PM, Simon Urbanek <[hidden email]> wrote:
>>>
>>> Wayne,
>>>
>>> that one is unrelated, but interesting - you can fix it with
>>>
>>> sudo install_name_tool -change \
>>>  /usr/local/lib:/opt/X11/lib/libtk8.6.dylib \
>>>  /usr/local/lib/libtk8.6.dylib \
>>>  /usr/local/bin/wish8.6
>>>
>>> There is a bug in tcltk with IDs on the libraries which I have worked-around for R, but not for wish.
>>>
>>> Back to the original question - do you have any example of a file that doesn't work so I could test? Exif chunks are fairly rare in PNG and are a more late extension so I couldn't find any examples.
>> The code in Wayne's original message (copied below) generated the offending file:
>> library(tcltk)
>> fname <- "Rplot.png"
>> png(filename = fname, width = 500, height = 500)
>> hist(rnorm(20))
>> dev.off()
>> tkimage.create("photo", file = fname)
>
> There are several png() devices for R.  The default on macOS is to use Quartz, and that depends on macOS system functions so might well have changed with Mojave -> Catalina.
>
> As a workaround, try e.g. png(type='cairo').  E.g.
>
> fname <- file.path(tempdir(), "Rplot.png")
> png(filename = fname, width = 500, height = 500, type="cairo")
> hist(rnorm(20))
> dev.off()
>
> library(tcltk)
> tkimage.create("photo", file = fname)
>
> works for me on Catalina.
>
>
> --
> Brian D. Ripley,                  [hidden email]
> Emeritus Professor of Applied Statistics, University of Oxford
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

Wayne Oldford
In reply to this post by Prof Brian Ripley

Thanks everyone for getting a solution.

Brian's solution works for me too.

Thanks again!!

Wayne


-----Original Message-----
From: Prof Brian Ripley <[hidden email]>
Date: Friday, June 12, 2020 at 3:00 AM
To: "Fox, John" <[hidden email]>, Simon Urbanek <[hidden email]>
Cc: Wayne Oldford <[hidden email]>, "[hidden email]" <[hidden email]>
Subject: Re: [Rd] tcltk image reading problem (on a mac?): [tcl] encountered an unsupported criticial chunk type "eXIf"

    On 12/06/2020 03:49, Fox, John wrote:
    > Dear Simon,
    >
    >> On Jun 11, 2020, at 9:00 PM, Simon Urbanek <[hidden email]> wrote:
    >>
    >> Wayne,
    >>
    >> that one is unrelated, but interesting - you can fix it with
    >>
    >> sudo install_name_tool -change \
    >>   /usr/local/lib:/opt/X11/lib/libtk8.6.dylib \
    >>   /usr/local/lib/libtk8.6.dylib \
    >>   /usr/local/bin/wish8.6
    >>
    >> There is a bug in tcltk with IDs on the libraries which I have worked-around for R, but not for wish.
    >>
    >> Back to the original question - do you have any example of a file that doesn't work so I could test? Exif chunks are fairly rare in PNG and are a more late extension so I couldn't find any examples.
    >
    > The code in Wayne's original message (copied below) generated the offending file:
    >
    > library(tcltk)
    >
    > fname <- "Rplot.png"
    > png(filename = fname, width = 500, height = 500)
    > hist(rnorm(20))
    > dev.off()
    >
    > tkimage.create("photo", file = fname)
   
    There are several png() devices for R.  The default on macOS is to use
    Quartz, and that depends on macOS system functions so might well have
    changed with Mojave -> Catalina.
   
    As a workaround, try e.g. png(type='cairo').  E.g.
   
    fname <- file.path(tempdir(), "Rplot.png")
    png(filename = fname, width = 500, height = 500, type="cairo")
    hist(rnorm(20))
    dev.off()
   
    library(tcltk)
    tkimage.create("photo", file = fname)
   
    works for me on Catalina.
   
   
    --
    Brian D. Ripley,                  [hidden email]
    Emeritus Professor of Applied Statistics, University of Oxford
   

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel