/usr/share/doc/tilestache/html/TileStache.Pixels.html is in tilestache 1.31.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module TileStache.Pixels</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="TileStache.html"><font color="#ffffff">TileStache</font></a>.Pixels</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a></font></td></tr></table>
<p><tt>Support for 8-bit image palettes in PNG output.<br>
<br>
PNG images can be significantly cut down in size by using a color look-up table.<br>
TileStache layers support Adobe Photoshop's .act file format for PNG output,<br>
and can be referenced in a layer configuration file like this:<br>
<br>
"osm":<br>
{<br>
"provider": {"name": "proxy", "provider": "OPENSTREETMAP"},<br>
"png options": {"palette": "<a href="http://tilestache.org/example-palette-openstreetmap-mapnik.act">http://tilestache.org/example-palette-openstreetmap-mapnik.act</a>"}<br>
}<br>
<br>
The example OSM palette above is a real file with a 32 color (5 bit) selection<br>
of colors appropriate for use with OpenStreetMap's default Mapnik cartography.<br>
<br>
To generate an .act file, convert an existing image in Photoshop to indexed<br>
color, and access the color table under Image -> Mode -> Color Table. Saving<br>
the color table results in a usable .act file, internally structured as a<br>
fixed-size 772-byte table with 256 3-byte RGB triplets, followed by a two-byte<br>
unsigned int with the number of defined colors (may be less than 256) and a<br>
finaly two-byte unsigned int with the optional index of a transparent color<br>
in the lookup table. If the final byte is 0xFFFF, there is no transparency.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="Image.html">Image</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-add"><strong>add</strong></a>(...)</dt><dd><tt><a href="#-add">add</a>(a, b) -- Same as a + b.</tt></dd></dl>
<dl><dt><a name="-apply_palette"><strong>apply_palette</strong></a>(image, palette, t_index)</dt><dd><tt>Apply a palette array to an image, return a new image.</tt></dd></dl>
<dl><dt><a name="-ceil"><strong>ceil</strong></a>(...)</dt><dd><tt><a href="#-ceil">ceil</a>(x)<br>
<br>
Return the ceiling of x as a float.<br>
This is the smallest integral value >= x.</tt></dd></dl>
<dl><dt><a name="-load_palette"><strong>load_palette</strong></a>(file_href)</dt><dd><tt>Load colors from a Photoshop .act file, return palette info.<br>
<br>
Return tuple is an array of [ (r, g, b), (r, g, b), ... ],<br>
bit depth of the palette, and a numeric transparency index<br>
or None if not defined.</tt></dd></dl>
<dl><dt><a name="-log"><strong>log</strong></a>(...)</dt><dd><tt><a href="#-log">log</a>(x[, base]) -> the logarithm of x to the given base.<br>
If the base not specified, returns the natural logarithm (base e) of x.</tt></dd></dl>
<dl><dt><a name="-pack"><strong>pack</strong></a>(...)</dt><dd><tt>Return string containing values v1, v2, ... packed according to fmt.</tt></dd></dl>
<dl><dt><a name="-palette_color"><strong>palette_color</strong></a>(r, g, b, palette, t_index)</dt><dd><tt>Return best palette match index.<br>
<br>
Find the closest color in the palette based on dumb euclidian distance,<br>
assign its index in the palette to a mapping from 24-bit color tuples.</tt></dd></dl>
<dl><dt><a name="-sqrt"><strong>sqrt</strong></a>(...)</dt><dd><tt><a href="#-sqrt">sqrt</a>(x)<br>
<br>
Return the square root of x.</tt></dd></dl>
<dl><dt><a name="-unpack"><strong>unpack</strong></a>(...)</dt><dd><tt>Unpack the string containing packed C structure data, according to fmt.<br>
Requires len(string) == calcsize(fmt).</tt></dd></dl>
</td></tr></table>
</body></html>
|