[NTG-pdftex] Expanded png inclusion support
The Thanh Han
hanthethanh at myrealbox.com
Sat Jan 29 01:39:16 CET 2005
Hi,
is anyone doing something with Taco's patch? If not I will merge it to
pdftex sources (will be uploaded soon as 1.20c-beta<date>
Thanh
On Tue, Jan 11, 2005 at 05:29:39PM +0100, Taco Hoekwater wrote:
>
> Hi,
>
> This is a complete, working patch, but the zip only contains the actual
> pngextra.ch and replacement writepng.c, so some manual editting has to
> be done to the Makefile. The change file needs to be added as the last
> item of the "pdftex_web_srcs" collection, the C file can overwrite the
> current file.
>
> This version is for testing purposes. I can provide linux 2.6 binaries,
> but I don't know how to create win32 executables, sorry.
>
> The main part of the patch is the new writepng.c, but there is also
> some web glue to set defaults. The patch contains improvements for PNG
> image inclusion, specifically:
>
> - alpha channel and transparency (only if %!PDF >=1.4)
> - 16-bit colour (only if %!PDF >=1.5)
> - gamma correction
> - forced reduction to greyscale (for Hans)
>
> A few primitives had to be introduced to set some default values.
> There are a total of four new primitives, that are all integer
> parameters. I almost certainly made mistakes in the WEB coding
> (initialization locations etc.), but works well enough for testing.
>
> Here are the primitives and their defaults:
>
> \pdfoptionpdfimagehicolor = 1
> %
> % can be set to 0 if undesirable. This is perhaps needed because
> % the reader 5 will reject the pdf document's page completely
> % otherwise.
>
> \pdfimagegamma = 2200
> %
> % if not supplied in the image. This example implies that the image
> % was originally created with gamma value 2.2 (like magnification)
>
>
> \pdfgamma = 1000
> %
> % Gamma value for the 'pdf device'. It looks like this is the
> % 'correct' value used by Adobe, but I'm not 100% sure.
>
> \pdfoptionimageforcegray = 0
> %
> % If 1, all included PNGs are written to the pdf as greyscale.
>
> The problem with these primitives is that I am unsure how and
> when to convert the internal parameters into their C 'fixedxxxxxx'
> counterparts. It would be a lot cleaner if the C code would use
> the internal parameters directly, but I'm not sure if that is
> even possible. Help needed!
>
>
> Greetings, Taco
>
> noreply at sarovar.org wrote:
> >Patches item #259, was opened at 2005-01-11 16:44
> >
> >Submitted By: Taco Hoekwater (taco)
> >Summary: Expanded png inclusion support
> _______________________________________________
> ntg-pdftex mailing list
> ntg-pdftex at ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-pdftex
>
More information about the ntg-pdftex
mailing list