ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Strange behavior concerning pdf-output of .png-externalfigures
@ 2019-05-17  8:23 Rudolf Bahr
  2019-05-21  8:07 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Rudolf Bahr @ 2019-05-17  8:23 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 2108 bytes --]


On Thu, May 16, 2019 at 02:40:07PM +0200, Hans Hagen wrote:
> On 5/16/2019 12:21 PM, Rudolf Bahr wrote:
> > The problem with artefacts in .png images is still unsolved for me.
> > I can circumvent it by using .jpg or .tiff images instead of .png images
> > as long as no transparent areas in the images are needed. As far as I know
> > .jpg and .tiff formats cannot handle transparancy, do they?
> > 
> > Now in .log files messages like
> > "luatex warning  > pdfe: invalid 11 0 R object at offset 223611"
> > can be seen. Please, what do they mean?

> Does that come from an pdf generated by image magick>? If so, the problem is
> there ... the last years I've seen lots of converted files with bogus pdf
> objects. (Kind of harmless but still.)
> 
> Hans


No. I never use neither ImageMagick nor GraphicsMagick to generate images in
.pdf-format. Even with my scanner software I produce always .jpg-images though it
is capable to produce .pdf-output too. The only .pdf-files I'm doing are made by
ConTeXt-LMTX!

I shall append another, interesting MWE. There is a .png-image which is, as it
occasionally happens, represented as it should, by ConTeXt. And then the same .png-image
to which I added a red frame by GIMP2.10. This one shows artefacts in ConTeXt!

I'm adding the .log-file too. There again is a luatex-warning, as I could observe them
often in ConTeXt-LMTX:

-------------------------------------------------------------
luatex warning  > pdfe: invalid 11 0 R object at offset 41603
-------------------------------------------------------------
Please, what does mean it? I fear there is something wrong with the .png-handling
of ConTeXt/luatex.

The outputs of
feh image----red-frame.png
gm display image----red-frame.png
are looking ok. And GIMP2.10 has produced all image-files.

Rudolf


PS.:
echo $PATH
/home/sam/Android/platform-tools:/bin:/usr/bin:/home/sam/context-lmtx/tex/texmf-linux-64/bin:/home/sam/context-lmtx/bin:/home/sam/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

The .tiff-image is always too big for this forums upper limit

[-- Attachment #2: Artefakte.tex --]
[-- Type: text/x-tex, Size: 340 bytes --]


\starttext

\midaligned{
  \externalfigure[image-no-red-frame.png][width=15mm,height=25mm] \hskip12pt

  \externalfigure[image----red-frame.png][width=15mm,height=25mm] \hskip12pt

  \externalfigure[image----red-frame.jpg][width=15mm,height=25mm] \hskip12pt

  \externalfigure[image----red-frame.tiff][width=15mm,height=25mm]
}

\stoptext

[-- Attachment #3: Artefakte---from-pdf-by-GIMP.jpg --]
[-- Type: image/jpeg, Size: 17680 bytes --]

[-- Attachment #4: Artefakte.log --]
[-- Type: text/plain, Size: 7084 bytes --]

open source     > level 1, order 1, name 'cont-yes.mkiv'
system          > 
system          > ConTeXt  ver: 2019.05.12 19:40 MKIV beta  fmt: 2019.5.14  int: english/english
system          > 
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name '/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name '/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > files > jobname 'Artefakte', input './Artefakte', result 'Artefakte'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name './Artefakte.tex'
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
luatex warning  > pdfe: invalid 11 0 R object at offset 41603
backend         > xmp > using file '/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
close source    > level 2, order 3, name './Artefakte.tex'
close source    > level 1, order 3, name 'cont-yes.mkiv'

system          > start used files

system          > text: Artefakte

system          > stop used files


system          > start used files

system          >    1: filename=char-prv.lua filetype=tex format=tex foundname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/char-prv.lua fullname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/char-prv.lua usedmethod=database
system          >    2: filename=cont-yes.mkiv filetype=tex format=tex foundname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv fullname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv usedmethod=database
system          >    3: filename=publ-imp-default.lua filetype=scripts foundname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua fullname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua usedmethod=database
system          >    4: filename=cont-new.mkiv filetype=tex foundname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv fullname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv usedmethod=database
system          >    5: filename=lang-exc.lua filetype=scripts foundname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua fullname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua usedmethod=database
system          >    6: filename=lang-us.lua filetype=scripts foundname=/home/sam/context-lmtx/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua fullname=/home/sam/context-lmtx/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua usedmethod=database
system          >    7: filename=/home/sam/Dokumente-Extern/Husche-II/111---kandidaten/Artefakte.tex format=tex foundname=/home/sam/Dokumente-Extern/Husche-II/111---kandidaten/Artefakte.tex fullname=/home/sam/Dokumente-Extern/Husche-II/111---kandidaten/Artefakte.tex usedmethod=direct
system          >    8: filename=lm.lfg filetype=tex foundname=/home/sam/context-lmtx/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg fullname=/home/sam/context-lmtx/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg usedmethod=database
system          >    9: filename=lmroman12-regular filetype=otf format=otf foundname=/home/sam/context-lmtx/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf fullname=/home/sam/context-lmtx/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=database
system          >   10: filename=latinmodern-math.otf filetype=opentypefonts foundname=/home/sam/context-lmtx/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf fullname=/home/sam/context-lmtx/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
system          >   11: filename=lpdf-pdx.xml filetype=tex foundname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml fullname=/home/sam/context-lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml usedmethod=database

system          > stop used files


system          > start commandline options

system          > currentrun="1"
system          > fulljobname="./Artefakte"
system          > input="./Artefakte"
system          > kindofrun="1"
system          > maxnofruns="9"
system          > texmfbinpath="/home/sam/context-lmtx/tex/texmf-linux-64/bin"

system          > stop commandline options


system          > start commandline files

system          >    1: ./Artefakte

system          > stop commandline files


modules         > start used modules


modules         > stop used modules


mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: /home/sam/context-lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 11 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 454 modules (0.167 sec), 93 tables (0.008 sec), 547 chunks (0.175 sec)
mkiv lua stats  > traced context: maxstack: 1384, freed: 0, unreachable: 1384
mkiv lua stats  > cleaned up reserved nodes: 54 nodes, 9 lists of 440
mkiv lua stats  > node memory usage: 2 whatsit, 1 glue, 3 kern, 2 penalty, 8 attribute, 50 glue_spec, 4 attribute_list, 2 temp
mkiv lua stats  > node list callback tasks: 8 unique task lists, 7 instances (re)created, 67 calls
mkiv lua stats  > used backend: lmtx version 0.10, pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.002 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: internal: 169, file: 148, direct: 10, late: 4, function 581, total: 912
mkiv lua stats  > randomizer: resumed with value 0.60140219822971
mkiv lua stats  > result saved in file: Artefakte.pdf, compresslevel 3, objectcompresslevel 1
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.108, afm 1.513, tfm 1.000, 7 instances, 3 shared in backend, 3 common vectors, 0 common hashes, load time 0.155 seconds 
mkiv lua stats  > graphics processing time: 0.003 seconds including tex, 4 processed images, 4 unique asked, 3 bad names
mkiv lua stats  > font embedding time: 0.003 seconds, 1 fonts
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: texmf-linux-64
mkiv lua stats  > used engine: luametatex version 2.0
mkiv lua stats  > control sequences: 45210 of 65536 + 100000
mkiv lua stats  > lua properties: engine: lua 5.4, used memory: 51 MB (ctx: 50 MB), hash chars: min(64,40), symbol mask: ascii (tex)
mkiv lua stats  > runtime: 0.392 seconds, 1 processed pages, 1 shipped pages, 2.553 pages/second


[-- Attachment #5: image-no-red-frame.png --]
[-- Type: image/png, Size: 20838 bytes --]

[-- Attachment #6: image----red-frame.png --]
[-- Type: image/png, Size: 22461 bytes --]

[-- Attachment #7: image----red-frame.jpg --]
[-- Type: image/jpeg, Size: 14097 bytes --]

[-- Attachment #8: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Strange behavior concerning pdf-output of .png-externalfigures
  2019-05-17  8:23 Strange behavior concerning pdf-output of .png-externalfigures Rudolf Bahr
@ 2019-05-21  8:07 ` Hans Hagen
  2019-05-23  6:43   ` Rudolf Bahr
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2019-05-21  8:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Rudolf Bahr

On 5/17/2019 10:23 AM, Rudolf Bahr wrote:
> 
> On Thu, May 16, 2019 at 02:40:07PM +0200, Hans Hagen wrote:
>> On 5/16/2019 12:21 PM, Rudolf Bahr wrote:
>>> The problem with artefacts in .png images is still unsolved for me.
>>> I can circumvent it by using .jpg or .tiff images instead of .png images
>>> as long as no transparent areas in the images are needed. As far as I know
>>> .jpg and .tiff formats cannot handle transparancy, do they?
>>>
>>> Now in .log files messages like
>>> "luatex warning  > pdfe: invalid 11 0 R object at offset 223611"
>>> can be seen. Please, what do they mean?
> 
>> Does that come from an pdf generated by image magick>? If so, the problem is
>> there ... the last years I've seen lots of converted files with bogus pdf
>> objects. (Kind of harmless but still.)
>>
>> Hans
> 
> 
> No. I never use neither ImageMagick nor GraphicsMagick to generate images in
> .pdf-format. Even with my scanner software I produce always .jpg-images though it
> is capable to produce .pdf-output too. The only .pdf-files I'm doing are made by
> ConTeXt-LMTX!
> 
> I shall append another, interesting MWE. There is a .png-image which is, as it
> occasionally happens, represented as it should, by ConTeXt. And then the same .png-image
> to which I added a red frame by GIMP2.10. This one shows artefacts in ConTeXt!
> 
> I'm adding the .log-file too. There again is a luatex-warning, as I could observe them
> often in ConTeXt-LMTX:
the second image has a mask which is split off (an all 0xFF mask btw) .. 
it shows ok in acrobat so maybe gimp is at fault here?

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Strange behavior concerning pdf-output of .png-externalfigures
  2019-05-21  8:07 ` Hans Hagen
@ 2019-05-23  6:43   ` Rudolf Bahr
  0 siblings, 0 replies; 3+ messages in thread
From: Rudolf Bahr @ 2019-05-23  6:43 UTC (permalink / raw)
  To: ntg-context

On Tue, May 21, 2019 at 10:07:01AM +0200, Hans Hagen wrote:
> On 5/17/2019 10:23 AM, Rudolf Bahr wrote:
> > 
> > On Thu, May 16, 2019 at 02:40:07PM +0200, Hans Hagen wrote:
> > > On 5/16/2019 12:21 PM, Rudolf Bahr wrote:
> > > > The problem with artefacts in .png images is still unsolved for me.
> > > > I can circumvent it by using .jpg or .tiff images instead of .png images
> > > > as long as no transparent areas in the images are needed. As far as I know
> > > > .jpg and .tiff formats cannot handle transparancy, do they?
> > > > 
> > > > Now in .log files messages like
> > > > "luatex warning  > pdfe: invalid 11 0 R object at offset 223611"
> > > > can be seen. Please, what do they mean?
> > 
> > > Does that come from an pdf generated by image magick>? If so, the problem is
> > > there ... the last years I've seen lots of converted files with bogus pdf
> > > objects. (Kind of harmless but still.)
> > > 
> > > Hans
> > 
> > 
> > No. I never use neither ImageMagick nor GraphicsMagick to generate images in
> > .pdf-format. Even with my scanner software I produce always .jpg-images though it
> > is capable to produce .pdf-output too. The only .pdf-files I'm doing are made by
> > ConTeXt-LMTX!
> > 
> > I shall append another, interesting MWE. There is a .png-image which is, as it
> > occasionally happens, represented as it should, by ConTeXt. And then the same .png-image
> > to which I added a red frame by GIMP2.10. This one shows artefacts in ConTeXt!
> > 
> > I'm adding the .log-file too. There again is a luatex-warning, as I could observe them
> > often in ConTeXt-LMTX:
> the second image has a mask which is split off (an all 0xFF mask btw) .. it
> shows ok in acrobat so maybe gimp is at fault here?
> 
> Hans



In the mean time I had some more tries with another OS and even with MKIV. Unfortunatly
I changed to OS "LinuxMint" at the same time LMTX came out. Now after going to
"Fedora 30" there are no problems left in this respect up to now. So I agree with you,
GIMP could have been the cause. Not GIMP in general, but possibly only "LinuxMint"-GIMP's
png-part.

I'm sorry because of the trouble, my fault!
Thanks to All who answered to this problem and contributed to a solution!

Best wishes, Rudolf
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-23  6:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-17  8:23 Strange behavior concerning pdf-output of .png-externalfigures Rudolf Bahr
2019-05-21  8:07 ` Hans Hagen
2019-05-23  6:43   ` Rudolf Bahr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).