ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* jpeg problem: Dimension too large
@ 2015-03-09 21:18 Harald Koenig
  2015-03-10  8:35 ` luigi scarso
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Harald Koenig @ 2015-03-09 21:18 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Harald Koenig

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

Hi,

and here a 1st problem including (some) JPGs which are created/converted using "convert" 
from ImageMagick (using ImageMagick-6.8.6.9-2.28.1.x86_64 from openSUSE 13.1 -- just in case...)

btw. -- I'm using a decent standalone context installation, full log file attached...

running "context j1.tex" I get

	LuaTeX warning: arithmetic: number too big
	graphics        > inclusion > limiting natural dimensions of './IMG_9712c1_bad.jpg' (height)

	tex error       > error on line 1 in file /home/harald/tex/Indien-2015/j1.tex: ! Dimension too large

for "IMG_9712c1_bad.jpg" which was generated with this command:

     convert -resize 632x330 IMG_9712c1_ok.jpg IMG_9712c1_bad.jpg


using other tools I can't find any problem with that "bad" jpg, only context complains:-(

what's wrong with "IMG_9712c1_bad.jpg" ?


tanks,

Harald
-- 
"I hope to die                                      ___       _____
before I *have* to use Microsoft Word.",           0--,|    /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen.        <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
                                                       \/\/\/\/\/\/\/\/\/
Harald Koenig                                           //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^

[-- Attachment #2: j1.tex --]
[-- Type: application/x-tex, Size: 98 bytes --]

[-- Attachment #3: j1.log --]
[-- Type: text/plain, Size: 7960 bytes --]

open source     > 1 > 1 > /home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-yes.mkiv
                >
ConTeXt  ver: 2015.02.03 23:55 MKIV beta  fmt: 2015.3.5  int: english/english >
                >
system          > 'cont-new.mkiv' loaded
open source     > 2 > 2 > /home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-new.mkiv
close source    > 2 > 2 > /home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > files > jobname 'j1', input './j1', result 'j1'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > 2 > 3 > /home/harald/tex/Indien-2015/j1.tex
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded

LuaTeX warning: arithmetic: number too big
graphics        > inclusion > limiting natural dimensions of './IMG_9712c1_bad.jpg' (height)

tex error       > error on line 1 in file /home/harald/tex/Indien-2015/j1.tex: ! Dimension too large


\relocateexternalfigure ...d \foundexternalfigure 
                                                  \bgroup \box \foundexterna...
l.1 \relocateexternalfigure
                         
\grph_include_place ...\ctxlua {figures.include()}
                                                  \ctxlua {figures.scale()}\...
\grph_include_figure ...include_place [#1][#2][#3]
                                                  \fi 
\syst_helpers_triple_empty_two_spaced ...{#2}][][]
                                                   
<to be read again> 
\par 
l.6 
  

 1 >>  \starttext
 2     
 3     \externalfigure[IMG_9712c1_ok]
 4     
 5     \externalfigure[IMG_9712c1_bad]
 6     
 7     \stoptext
 8     
 9     
10     


? 

tex error       > error on line 1 in file /home/harald/tex/Indien-2015/j1.tex: ! Dimension too large


\page_otr_eject_page_and_flush_inserts ...getotal 
                                                  >\pagegoal \else \normalvf...
\228>last ...ge_otr_command_next_page_and_inserts 
                                                  \relax \doifbothsidesoverr...
\page_breaks_handle_step ...ent_option \endcsname 
                                                  \else \ifcsname \??pagebre...
\9>>1 #1,->\page_breaks_handle_step {#1}
                                        \syst_helpers_do_process_comma_item 
\syst_helpers_do_process_comma_list ...rgument #1,
                                                  ]\relax \global \advance \...
\page_breaks_process ...t \page_breaks_handle {#1}
                                                  \else \page_breaks_handle_...
...
l.7 \stoptext
           

 1 >>  \starttext
 2     
 3     \externalfigure[IMG_9712c1_ok]
 4     
 5     \externalfigure[IMG_9712c1_bad]
 6     
 7     \stoptext
 8     
 9     
10     


? 
backend         > xmp > using file '/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1
pages           > flushing realpage 2, userpage 2
close source    > 2 > 3 > /home/harald/tex/Indien-2015/j1.tex
close source    > 1 > 3 > /home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-yes.mkiv

system          > structure > start used structure

used structure  > text: j1

system          > structure > stop used structure


system          > files > start used files

used file       >    1: filename=cont-yes.mkiv filetype=tex foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-yes.mkiv usedmethod=database
used file       >    2: filename=publ-imp-apa.lua filetype=lua foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/publ-imp-apa.lua usedmethod=database
used file       >    3: filename=cont-new.mkiv filetype=tex foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-new.mkiv usedmethod=database
used file       >    4: filename=lang-us.lua filetype=lua foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/patterns/lang-us.lua usedmethod=database
used file       >    5: filename=/home/harald/tex/Indien-2015/j1.tex foundname=/home/harald/tex/Indien-2015/j1.tex usedmethod=direct
used file       >    6: filename=lm.lfg filetype=tex foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/fonts/lm.lfg usedmethod=database
used file       >    7: filename=lmroman12-regular filetype=otf format=otf foundname=/home/harald/tex/Indien-2015/ct/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=database
used file       >    8: filename=latinmodern-math.otf filetype=opentypefonts foundname=/home/harald/tex/Indien-2015/ct/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
used file       >    9: filename=/home/harald/tex/Indien-2015/IMG_9712c1_ok.jpg format=tex foundname=/home/harald/tex/Indien-2015/IMG_9712c1_ok.jpg usedmethod=direct
used file       >   10: filename=/home/harald/tex/Indien-2015/IMG_9712c1_bad.jpg format=tex foundname=/home/harald/tex/Indien-2015/IMG_9712c1_bad.jpg usedmethod=direct
used file       >   11: filename=lpdf-pdx.xml filetype=tex foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/lpdf-pdx.xml usedmethod=database

system          > files > stop used files


system          > options > start commandline options

used option     > currentrun="1"
used option     > fulljobname="./j1.tex"
used option     > input="./j1.tex"
used option     > kindofrun="1"
used option     > maxnofruns="8"
used option     > no-parse-first-line="true"

system          > options > stop commandline options

system          > options > start commandline files

used file       >    1: ./j1.tex

system          > options > stop commandline files


mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: /home/harald/tex/Indien-2015/ct/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.014 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 11 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 364 modules (0.265 sec), 76 tables (0.007 sec), 440 chunks (0.272 sec)
mkiv lua stats  > running in nuts mode: yes
mkiv lua stats  > cleaned up reserved nodes: 44 nodes, 439 lists of 438
mkiv lua stats  > node memory usage: 2 glue, 2 penalty, 9 attribute, 37 glue_spec, 3 attribute_list, 2 temp
mkiv lua stats  > node list callback tasks: 6 unique task lists, 5 instances (re)created, 81 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > jobdata time: 0.000 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: 273 direct, 243 indirect, 516 total
mkiv lua stats  > randomizer: resumed with value 0.91750514736283
mkiv lua stats  > result saved in file: j1.pdf, compresslevel 3, objectcompresslevel 3
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otf
mkiv lua stats  > fonts load time: 0.260 seconds 
mkiv lua stats  > graphics processing time: 11.089 seconds including tex, 2 processed images, 2 unique asked, 2 bad names
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: texmf-linux-64
mkiv lua stats  > luatex banner: this is luatex, version beta-0.79.3 (tex live 2015/dev) (rev 5140)
mkiv lua stats  > control sequences: 40447 of 65536 + 100000
mkiv lua stats  > lua properties: engine: lua, used memory: 58 MB (ctx: 58 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 12.827 seconds, 2 processed pages, 2 shipped pages, 0.156 pages/second


[-- Attachment #4: IMG_9712c1_ok.jpg --]
[-- Type: image/jpeg, Size: 16916 bytes --]

[-- Attachment #5: IMG_9712c1_bad.jpg --]
[-- Type: image/jpeg, Size: 52091 bytes --]

[-- Attachment #6: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: jpeg problem: Dimension too large
  2015-03-09 21:18 jpeg problem: Dimension too large Harald Koenig
@ 2015-03-10  8:35 ` luigi scarso
  2015-03-10  8:42 ` Hans Hagen
  2015-03-10  8:51 ` Hans Hagen
  2 siblings, 0 replies; 5+ messages in thread
From: luigi scarso @ 2015-03-10  8:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1700 bytes --]

On Mon, Mar 9, 2015 at 10:18 PM, Harald Koenig <
koenig@tat.physik.uni-tuebingen.de> wrote:

> Hi,
>
> and here a 1st problem including (some) JPGs which are created/converted
> using "convert"
> from ImageMagick (using ImageMagick-6.8.6.9-2.28.1.x86_64 from openSUSE
> 13.1 -- just in case...)
>
> btw. -- I'm using a decent standalone context installation, full log file
> attached...
>
> running "context j1.tex" I get
>
>         LuaTeX warning: arithmetic: number too big
>         graphics        > inclusion > limiting natural dimensions of
> './IMG_9712c1_bad.jpg' (height)
>
>         tex error       > error on line 1 in file
> /home/harald/tex/Indien-2015/j1.tex: ! Dimension too large
>
> for "IMG_9712c1_bad.jpg" which was generated with this command:
>
>      convert -resize 632x330 IMG_9712c1_ok.jpg IMG_9712c1_bad.jpg
>
>
> using other tools I can't find any problem with that "bad" jpg, only
> context complains:-(
>
> what's wrong with "IMG_9712c1_bad.jpg" ?also with pdftex
>

also with pdftex:

figures         : dimensions of IMG_9712c1_ok loaded from figurefile itself


pdfTeX warning: pdftex: arithmetic: number too big
 <./IMG_9712c1_bad.jpg>
! Dimension too large.
<to be read again>
                   >
\setanalyzedfiguredimensions ...lyzedfigurewidth >
                                                  \zeropoint \ifdim
\analyze...

\doanalyzefiguredimensionsinternal ...ions \!!ten
                                                  \fi
<argument> ...}\doanalyzefiguredimensionsinternal

\doanalyzefiguredimensions...

\firstoftwoarguments #1#2->#1

\dododoanalyzeunknownfiguretype ...guredimensions
                                                  \fi
...

-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 2843 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: jpeg problem: Dimension too large
  2015-03-09 21:18 jpeg problem: Dimension too large Harald Koenig
  2015-03-10  8:35 ` luigi scarso
@ 2015-03-10  8:42 ` Hans Hagen
  2015-03-10  8:51 ` Hans Hagen
  2 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2015-03-10  8:42 UTC (permalink / raw)
  To: ntg-context

On 3/9/2015 10:18 PM, Harald Koenig wrote:

> btw. -- I'm using a decent standalone context installation, full log file attached...

fyi, you can use

gm identify -verbose IMG_9712c1_bad.jpg

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: jpeg problem: Dimension too large
  2015-03-09 21:18 jpeg problem: Dimension too large Harald Koenig
  2015-03-10  8:35 ` luigi scarso
  2015-03-10  8:42 ` Hans Hagen
@ 2015-03-10  8:51 ` Hans Hagen
  2015-03-10  9:30   ` luigi scarso
  2 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2015-03-10  8:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Harald Koenig

On 3/9/2015 10:18 PM, Harald Koenig wrote:
> Hi,
>
> and here a 1st problem including (some) JPGs which are created/converted using "convert"
> from ImageMagick (using ImageMagick-6.8.6.9-2.28.1.x86_64 from openSUSE 13.1 -- just in case...)
>
> btw. -- I'm using a decent standalone context installation, full log file attached...
>
> running "context j1.tex" I get
>
> 	LuaTeX warning: arithmetic: number too big
> 	graphics        > inclusion > limiting natural dimensions of './IMG_9712c1_bad.jpg' (height)

when i provide more detail here:

graphics        > inclusion > limiting natural dimensions of 
'./IMG_9712c1_ok.jpg', old -32768pt * 17778.42pt, new -30197.89787pt * 
16383.99998pt

so we have a bug in the engine (or jpg library)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: jpeg problem: Dimension too large
  2015-03-10  8:51 ` Hans Hagen
@ 2015-03-10  9:30   ` luigi scarso
  0 siblings, 0 replies; 5+ messages in thread
From: luigi scarso @ 2015-03-10  9:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2880 bytes --]

On Tue, Mar 10, 2015 at 9:51 AM, Hans Hagen <pragma@wxs.nl> wrote:

> On 3/9/2015 10:18 PM, Harald Koenig wrote:
>
>> Hi,
>>
>> and here a 1st problem including (some) JPGs which are created/converted
>> using "convert"
>> from ImageMagick (using ImageMagick-6.8.6.9-2.28.1.x86_64 from openSUSE
>> 13.1 -- just in case...)
>>
>> btw. -- I'm using a decent standalone context installation, full log file
>> attached...
>>
>> running "context j1.tex" I get
>>
>>         LuaTeX warning: arithmetic: number too big
>>         graphics        > inclusion > limiting natural dimensions of
>> './IMG_9712c1_bad.jpg' (height)
>>
>
> when i provide more detail here:
>
> graphics        > inclusion > limiting natural dimensions of
> './IMG_9712c1_ok.jpg', old -32768pt * 17778.42pt, new -30197.89787pt *
> 16383.99998pt
>
> so we have a bug in the engine (or jpg library)
>
>
 convert IMG_9712c1_bad.jpg IMG_9712c1_bad_1.jpg
IMG_9712c1_bad_1.jpg now wroks

identify -verbose IMG_9712c1_bad_1.jpg > o1
identify -verbose IMG_9712c1_bad.jpg > o


 $ diff o o1
1c1
< Image: IMG_9712c1_bad.jpg
---
> Image: IMG_9712c1_bad_1.jpg
7c7
<   Units: Undefined
---
>   Units: PixelsPerInch
20,23c20,23
<       mean: 124.329 (0.487564)
<       standard deviation: 17.5202 (0.0687068)
<       kurtosis: 2.41664
<       skewness: -1.26318
---
>       mean: 124.324 (0.487547)
>       standard deviation: 17.5075 (0.0686569)
>       kurtosis: 2.41645
>       skewness: -1.2637
27,30c27,30
<       mean: 111.362 (0.436713)
<       standard deviation: 15.7153 (0.0616287)
<       kurtosis: 2.28057
<       skewness: -1.32468
---
>       mean: 111.364 (0.436722)
>       standard deviation: 15.7186 (0.0616417)
>       kurtosis: 2.2811
>       skewness: -1.32482
34,37c34,37
<       mean: 93.8436 (0.368014)
<       standard deviation: 14.7826 (0.0579712)
<       kurtosis: 1.96665
<       skewness: -1.31581
---
>       mean: 93.842 (0.368008)
>       standard deviation: 14.7911 (0.0580042)
>       kurtosis: 1.96604
>       skewness: -1.31629
42,45c42,45
<       mean: 109.845 (0.430764)
<       standard deviation: 16.0464 (0.0629269)
<       kurtosis: 5.8085
<       skewness: -1.07043
---
>       mean: 109.844 (0.430759)
>       standard deviation: 16.0454 (0.0629232)
>       kurtosis: 5.81176
>       skewness: -1.07339
66,67c66,67
<     date:create: 2015-03-10T09:44:29+01:00
<     date:modify: 2015-03-10T09:29:18+01:00
---
>     date:create: 2015-03-10T10:19:42+01:00
>     date:modify: 2015-03-10T10:19:42+01:00
70c70
<     signature:
9a007a0aa8c2cec2e9a4a7c6be79b538eac50590d343c3f31e2b0dbe1561e2dc
---
>     signature:
3b838a4b66f58fb8e4b06578358c51e6efb8cc72ff7a5f4a88acf6f42067e228
72c72
<     filename: IMG_9712c1_bad.jpg
---
>     filename: IMG_9712c1_bad_1.jpg

shows that Units: Undefined
is the problem.
Imo, this is a bad jpg that should be fixed  and not a bug of luatex.

-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 4714 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2015-03-10  9:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-09 21:18 jpeg problem: Dimension too large Harald Koenig
2015-03-10  8:35 ` luigi scarso
2015-03-10  8:42 ` Hans Hagen
2015-03-10  8:51 ` Hans Hagen
2015-03-10  9:30   ` luigi scarso

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).