ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: 16-bit png
       [not found]   ` <47B55D02.7030400@elvenkind.com>
@ 2008-02-15 10:24     ` Alan BRASLAU
  0 siblings, 0 replies; 10+ messages in thread
From: Alan BRASLAU @ 2008-02-15 10:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Friday 15 February 2008 10:36:02 Taco Hoekwater wrote:
> xpdf (and its derivatives) does not support 16-bit color.
> No warning, the pdf is just displayed incorrectly.
>
> It 'works' in pdflatex in xpdf because the file does not contain a
> 16-bit image at all, it is automatically downgraded.
>
> If you want that same effect in context, set
>    \pdfminorversion=4 % or some other low number
>
> You document will be loosing functionality, and gaining portability.
>
> Best wishes,
> Taco

I am posting this to the mailing list to share the answer/solution.
\externalfigure[16-bit.png]
indeed works correctly. However, xpdf/kpdf/etc. do not handle 16-bit color, 
unlike acroread and ghostview. Note also that pdflatex automatically 
downgrades 16-bit color images to 8-bit.

Alan
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: 16-bit png
  2008-02-15  8:58 ` Taco Hoekwater
@ 2008-02-15 10:22   ` Taco Hoekwater
  0 siblings, 0 replies; 10+ messages in thread
From: Taco Hoekwater @ 2008-02-15 10:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Hi,

We did a bit of offlist emailing and have now fixed this issue.
Because I got confused as well, here is a quick recap with the
correct diagnostics, for future reference:

The context example actually did work as promised: it included
the image in 16-bit color in a PDF 1.5 document.

The context document appeared not to work, because Alan's previewer
(xpdf) does not deal with 16-bit images correctly. The file displayed
fine with acroread or ghostscript.

The latex document appeared to work, but only because it included
a downgraded 8-bit color version of the image.

To get the latex-effect in context, there are two possibilities:
either \pdfminorversion=4 (or lower) or \pdfimagehicolor=0.

To get the context-effect in latex, I have no idea. ?

Best wishes,
Taco
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: 16-bit png
  2008-02-15  8:48 ` Hans Hagen
@ 2008-02-15  8:59   ` Taco Hoekwater
  0 siblings, 0 replies; 10+ messages in thread
From: Taco Hoekwater @ 2008-02-15  8:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Hans Hagen wrote:
> can you send taco /me that image?

no need. find an arbitrary png image, then run

   convert -depth 16

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: 16-bit png
  2008-02-15  8:39 Alan BRASLAU
  2008-02-15  8:48 ` Hans Hagen
@ 2008-02-15  8:58 ` Taco Hoekwater
  2008-02-15 10:22   ` Taco Hoekwater
  1 sibling, 1 reply; 10+ messages in thread
From: Taco Hoekwater @ 2008-02-15  8:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Alan BRASLAU wrote:

> 1. Of course, I tried "\pdfimagehicolor=1" without results before posting the 
> question. 

Next time, post also that you tried that already ;-)

> (I would NEVER think about asking for help without trying different 
> possibilities myself...)

Are you by chance running an old version of context? That input works
for me, so you can try upgrading the context installation, or
you can see if adding \pdfminorversion=5 to your input file helps.

16-bit color is not supported in older versions of the pdf standard,
and older versions of context had an implicit \pdfminorversion=4.

Best wishes,
Taco
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: 16-bit png
  2008-02-15  8:39 Alan BRASLAU
@ 2008-02-15  8:48 ` Hans Hagen
  2008-02-15  8:59   ` Taco Hoekwater
  2008-02-15  8:58 ` Taco Hoekwater
  1 sibling, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2008-02-15  8:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users


can you send taco /me that image?

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: 16-bit png
  2008-02-15  8:18 ` Aditya Mahajan
@ 2008-02-15  8:43   ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2008-02-15  8:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Aditya Mahajan wrote:
> Hi
> 
> Does adding \setupcolors[state=start] at the top of the context file help?
> 
> Hans, how about enabling colors by default in mkiv?

i'll give it a thought (I always need to set it myself too -)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: 16-bit png
@ 2008-02-15  8:39 Alan BRASLAU
  2008-02-15  8:48 ` Hans Hagen
  2008-02-15  8:58 ` Taco Hoekwater
  0 siblings, 2 replies; 10+ messages in thread
From: Alan BRASLAU @ 2008-02-15  8:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

On Friday 15 February 2008 09:23:12 Taco Hoekwater wrote:
> Alan BRASLAU wrote:
> > $ cat test.tex
>
>    \starttext
>    \pdfimagehicolor=1
>    \externalfigure[red][width=\textwidth]
>    \stoptext
>
> There, fixed that.
>
> That setting could go into the context core, though.
>
> > Does this have something to do with \pdfimagehicolor?
>
> I am always surprised how many people ask a question,
> guess the correct answer themselves, but don't actually
> attempt to see if it works :-)
>
> Best wishes,
> Taco

Thanks for the very rapid answer.
However, no, neither of the proposed solutions work.
1. Of course, I tried "\pdfimagehicolor=1" without results before posting the 
question. (I would NEVER think about asking for help without trying different 
possibilities myself...)
2. "\setupcolors[state=start]" was also in my original file, but did not seem 
to make a difference, so I posted a most simplified example.

What to do? I would think that there is something wrong with my configuration 
(debian/unstable), however pdflatex works just fine.

Alan

(P.S. Why would one need to specify \pdfimagehicolor in any case; From a 
user's point of view, shouldn't it just work transparently?) 

[-- Attachment #2: Taco Hoekwater <taco@elvenkind.com>: Re: [NTG-context] 16-bit png --]
[-- Type: message/rfc822, Size: 5403 bytes --]

From: Taco Hoekwater <taco@elvenkind.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: [NTG-context] 16-bit png
Date: Fri, 15 Feb 2008 09:23:12 +0100
Message-ID: <47B54BF0.8040406@elvenkind.com>

Alan BRASLAU wrote:
> 
> $ cat test.tex

   \starttext
   \pdfimagehicolor=1
   \externalfigure[red][width=\textwidth]
   \stoptext

There, fixed that.

That setting could go into the context core, though.

> Does this have something to do with \pdfimagehicolor?

I am always surprised how many people ask a question,
guess the correct answer themselves, but don't actually
attempt to see if it works :-)

Best wishes,
Taco
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

[-- Attachment #3: Aditya Mahajan <adityam@umich.edu>: Re: [NTG-context] 16-bit png --]
[-- Type: message/rfc822, Size: 5926 bytes --]

From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: [NTG-context] 16-bit png
Date: Fri, 15 Feb 2008 03:18:34 -0500 (EST)
Message-ID: <alpine.DEB.1.00.0802150315000.32477@nqv-yncgbc>

Hi

Does adding \setupcolors[state=start] at the top of the context file help?

Hans, how about enabling colors by default in mkiv?

Aditya

On Thu, 14 Feb 2008, Alan BRASLAU wrote:

> Hello,
>
> I am having problems including 16-bit png files in ConTeXt. In the following
> example, red.png is a 800x600 image of red pixels. The resulting test.pdf
> shows a BLACK rectangle. (The same problem exists with real images.)
>
> However, I can produce the desired result with my installation under
> pdflatex...
>
> $ cat test.tex
> \starttext
> \externalfigure[red][width=\textwidth]
> \stoptext
> $ file red.png
> red.png: PNG image data, 800 x 600, 16-bit/color RGB, non-interlaced
> $ texexec test
>
> $ cat test2.tex
> \documentclass{article}
> \usepackage{graphicx}
> \begin{document}
> \includegraphics[width=\textwidth]{red}
> \end{document}
> $ pdflatex test2
>
> My distribution (debian + texlive) uses
> This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
> in both cases.
>
> Does this have something to do with \pdfimagehicolor?
>
> Thank you
> ___________________________________________________________________________________
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>
>
>
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

[-- Attachment #4: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: 16-bit png
  2008-02-14 10:08 Alan BRASLAU
  2008-02-15  8:18 ` Aditya Mahajan
@ 2008-02-15  8:23 ` Taco Hoekwater
  1 sibling, 0 replies; 10+ messages in thread
From: Taco Hoekwater @ 2008-02-15  8:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Alan BRASLAU wrote:
> 
> $ cat test.tex

   \starttext
   \pdfimagehicolor=1
   \externalfigure[red][width=\textwidth]
   \stoptext

There, fixed that.

That setting could go into the context core, though.

> Does this have something to do with \pdfimagehicolor?

I am always surprised how many people ask a question,
guess the correct answer themselves, but don't actually
attempt to see if it works :-)

Best wishes,
Taco
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: 16-bit png
  2008-02-14 10:08 Alan BRASLAU
@ 2008-02-15  8:18 ` Aditya Mahajan
  2008-02-15  8:43   ` Hans Hagen
  2008-02-15  8:23 ` Taco Hoekwater
  1 sibling, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2008-02-15  8:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi

Does adding \setupcolors[state=start] at the top of the context file help?

Hans, how about enabling colors by default in mkiv?

Aditya

On Thu, 14 Feb 2008, Alan BRASLAU wrote:

> Hello,
>
> I am having problems including 16-bit png files in ConTeXt. In the following
> example, red.png is a 800x600 image of red pixels. The resulting test.pdf
> shows a BLACK rectangle. (The same problem exists with real images.)
>
> However, I can produce the desired result with my installation under
> pdflatex...
>
> $ cat test.tex
> \starttext
> \externalfigure[red][width=\textwidth]
> \stoptext
> $ file red.png
> red.png: PNG image data, 800 x 600, 16-bit/color RGB, non-interlaced
> $ texexec test
>
> $ cat test2.tex
> \documentclass{article}
> \usepackage{graphicx}
> \begin{document}
> \includegraphics[width=\textwidth]{red}
> \end{document}
> $ pdflatex test2
>
> My distribution (debian + texlive) uses
> This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
> in both cases.
>
> Does this have something to do with \pdfimagehicolor?
>
> Thank you
> ___________________________________________________________________________________
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>
>
>
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* 16-bit png
@ 2008-02-14 10:08 Alan BRASLAU
  2008-02-15  8:18 ` Aditya Mahajan
  2008-02-15  8:23 ` Taco Hoekwater
  0 siblings, 2 replies; 10+ messages in thread
From: Alan BRASLAU @ 2008-02-14 10:08 UTC (permalink / raw)
  To: ntg-context

Hello,

I am having problems including 16-bit png files in ConTeXt. In the following 
example, red.png is a 800x600 image of red pixels. The resulting test.pdf 
shows a BLACK rectangle. (The same problem exists with real images.)

However, I can produce the desired result with my installation under 
pdflatex...

$ cat test.tex
\starttext
\externalfigure[red][width=\textwidth]
\stoptext
$ file red.png
red.png: PNG image data, 800 x 600, 16-bit/color RGB, non-interlaced
$ texexec test

$ cat test2.tex
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[width=\textwidth]{red}
\end{document}
$ pdflatex test2

My distribution (debian + texlive) uses
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
in both cases.

Does this have something to do with \pdfimagehicolor?

Thank you
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2008-02-15 10:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200802151012.52928.alan.braslau@cea.fr>
     [not found] ` <200802151026.30378.alan.braslau@cea.fr>
     [not found]   ` <47B55D02.7030400@elvenkind.com>
2008-02-15 10:24     ` 16-bit png Alan BRASLAU
2008-02-15  8:39 Alan BRASLAU
2008-02-15  8:48 ` Hans Hagen
2008-02-15  8:59   ` Taco Hoekwater
2008-02-15  8:58 ` Taco Hoekwater
2008-02-15 10:22   ` Taco Hoekwater
  -- strict thread matches above, loose matches on Subject: below --
2008-02-14 10:08 Alan BRASLAU
2008-02-15  8:18 ` Aditya Mahajan
2008-02-15  8:43   ` Hans Hagen
2008-02-15  8:23 ` Taco Hoekwater

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