Problem with PNG images in the latest standalone version
Hello. After a long time of using ConText from TeXlive installation I tried the standalone version again. I found that my old documents that I normally compile exclusively with the old ConText ver: 2018.04.04 00:51 MKIV beta fmt: 2019.5.2 latest version of standalone ConText compiles smoothly, seamlessly and most importantly very quickly and the results are the same at a glance. Unfortunately, the only problem I have not been able to solve is that the new standalone ConTeXt (ConTeXt ver: 2024.05.17 16:32 LMTX fmt: 2024.5.23) does not display PNG files in my PDF document for me. If I replace the PNG files with JPG files, the images are loaded and displayed in PDF file after compilation. I have also tried experimenting with the png method, see e.g. \setupexternalfigures[directory={../texlibrary/}, method=png], I have tried a few things, but it fails to work. I tried to search for something, but I couldn't find anything relevant. Can anyone advise me what the problem is or what I'm doing wrong? Is it caused by some version incompatibility or some setting? I apologize if something similar has already been addressed here, but I have not been able to follow the happenings in this mailing list for quite some time. Thanks a lot for any advice. Jaroslav
Hajtmar, please provide a complete, self-contained, minimal working example.
See http://www.sscce.org/ for details.
On Thu, May 23, 2024 at 3:43 PM Hajtmar Jaroslav
Hello. After a long time of using ConText from TeXlive installation I tried the standalone version again. I found that my old documents that I normally compile exclusively with the old ConText ver: 2018.04.04 00:51 MKIV beta fmt: 2019.5.2 latest version of standalone ConText compiles smoothly, seamlessly and most importantly very quickly and the results are the same at a glance. Unfortunately, the only problem I have not been able to solve is that the new standalone ConTeXt (ConTeXt ver: 2024.05.17 16:32 LMTX fmt: 2024.5.23) does not display PNG files in my PDF document for me. If I replace the PNG files with JPG files, the images are loaded and displayed in PDF file after compilation. I have also tried experimenting with the png method, see e.g. \setupexternalfigures[directory={../texlibrary/}, method=png], I have tried a few things, but it fails to work. I tried to search for something, but I couldn't find anything relevant. Can anyone advise me what the problem is or what I'm doing wrong? Is it caused by some version incompatibility or some setting? I apologize if something similar has already been addressed here, but I have not been able to follow the happenings in this mailing list for quite some time.
Thanks a lot for any advice. Jaroslav
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
Thangalin schrieb am 24.05.2024 um 07:56:
Hajtmar, please provide a complete, self-contained, minimal working example.
Yes, a example and the problematic images are needed because a simple test with mill.png which is part of ConTeXt shows no problems but image formats are more complex than Hajtmar believes. \setupexternalfigure[location=default] \starttext \externalfigure[mill] \stoptext Wolfgang
Hello, thanx for reply. PNG and JPG files are available at the URL given, as well as PDF documents with the compilation results. The old ConTeXt seems to be able to embed PNGs from the local disk, but no longer from a remote address. The new ConTeXt handles both local and remote PNG image in different ways. Thanx Jaroslav \setupinteraction[state=start] \starttext JPG URL: \externalfigure[https://hajtmar.cz/temp-ntg/gyzalogo-new.jpg][height=3.5cm] \par JPG local: \externalfigure[gyzalogo-new.jpg][height=3.5cm] \par PNG URL: \externalfigure[https://hajtmar.cz/temp-ntg/gyzalogo-new.png][height=3.5cm] \par PNG local file: \externalfigure[gyzalogo-new.png][height=3.5cm] \par Results: \par \goto{PDF file by ConTeXt ver: 2024.05.17}[url(https://hajtmar.cz/temp-ntg/minimalexample20240517.pdf)] \par \goto{PDF file by ConTeXt ver: 2018.04.04}[url(https://hajtmar.cz/temp-ntg/minimalexample20180404.pdf)] \stoptext
24. 5. 2024 v 9:17, Wolfgang Schuster
: Thangalin schrieb am 24.05.2024 um 07:56:
Hajtmar, please provide a complete, self-contained, minimal working example.
Yes, a example and the problematic images are needed because a simple test with mill.png which is part of ConTeXt shows no problems but image formats are more complex than Hajtmar believes.
\setupexternalfigure[location=default]
\starttext \externalfigure[mill] \stoptext
Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
Hajtmar Jaroslav schrieb am 24.05.2024 um 13:48:
Hello, thanx for reply.
PNG and JPG files are available at the URL given, as well as PDF documents with the compilation results. The old ConTeXt seems to be able to embed PNGs from the local disk, but no longer from a remote address. The new ConTeXt handles both local and remote PNG image in different ways.
I tested both of your images and I had a problem with the png-version as well but when you look at the log-file you should find the following message: graphics > inclusion > image 'gyzalogo-new.png' has bad dimensions (0pt,0pt), discarding My next step was to open the file with a image viewer which showed my the file is a jpeg rather than a png, afterwards i changed the file extension from png to jpg and it appears in my document. The conclusion here is that somebody just changed the file extension to *convert* the image from jpeg to png which of yourse is nonsense. Another clue to notice there is something wrong is the size of both value because there should be a difference between jpeg and png but both have the same file size. Wolfgang
Thanks Wolfgang for the analysis and explanation. Both pictures are "not from my workshop" and I received them as background material. Moreover, I have reduced them a lot today for the purpose of sending them to the conference (I have reduced the quality a lot to reduce their size). Strangely, I have been translating documents with this image for several years with the old version of ConTeXt, so I was surprised that the new ConTeXt was not able to process them as I expected. Unfortunately, it didn't really occur to me that the problem might be with the image rather than ConTeXt, but the images were commonly displayed on several computers (Windows and OS X), and I didn't think to look at the log file. Thanks again for the explanation and for the lesson, which I will certainly remember. Have a nice day. Jaroslav
24. 5. 2024 v 15:22, Wolfgang Schuster
: Hajtmar Jaroslav schrieb am 24.05.2024 um 13:48:
Hello, thanx for reply. PNG and JPG files are available at the URL given, as well as PDF documents with the compilation results. The old ConTeXt seems to be able to embed PNGs from the local disk, but no longer from a remote address. The new ConTeXt handles both local and remote PNG image in different ways.
I tested both of your images and I had a problem with the png-version as well but when you look at the log-file you should find the following message:
graphics > inclusion > image 'gyzalogo-new.png' has bad dimensions (0pt,0pt), discarding
My next step was to open the file with a image viewer which showed my the file is a jpeg rather than a png, afterwards i changed the file extension from png to jpg and it appears in my document.
The conclusion here is that somebody just changed the file extension to *convert* the image from jpeg to png which of yourse is nonsense. Another clue to notice there is something wrong is the size of both value because there should be a difference between jpeg and png but both have the same file size.
Wolfgang
participants (3)
-
Hajtmar Jaroslav
-
Thangalin
-
Wolfgang Schuster