diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-12-25 03:06:05 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-12-25 03:06:05 +0000 |
commit | 1017cbebe5d5edd859e0fddad0a8600f509f4821 (patch) | |
tree | 78bdf336648566f7a7d55f42837357dea3dd674c /pnmscalefixed.html | |
parent | 16f2ac126651015a376eba864a3a35f738b0b25a (diff) | |
download | netpbm-mirror-1017cbebe5d5edd859e0fddad0a8600f509f4821.tar.gz netpbm-mirror-1017cbebe5d5edd859e0fddad0a8600f509f4821.tar.xz netpbm-mirror-1017cbebe5d5edd859e0fddad0a8600f509f4821.zip |
Place user guide into Subversion repository
git-svn-id: http://svn.code.sf.net/p/netpbm/code/userguide@181 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'pnmscalefixed.html')
-rw-r--r-- | pnmscalefixed.html | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/pnmscalefixed.html b/pnmscalefixed.html new file mode 100644 index 00000000..58dfde35 --- /dev/null +++ b/pnmscalefixed.html @@ -0,0 +1,71 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML><HEAD><TITLE>Pnmscalefixed User Manual</TITLE></HEAD> +<BODY> +<H1>pnmscalefixed</H1> +Updated: 18 November 2000 +<BR> +<A HREF="#index">Table Of Contents</A> + +<A NAME="lbAB"> </A> +<H2>NAME</H2> + +pnmscale - scale a PNM file quickly + +<A NAME="lbAC"> </A> +<H2>DESCRIPTION</H2> + +<p>This program is part of <a href="index.html">Netpbm</a>. + +<B>pnmscalefixed</B> is the same thing as <B>pnmscale</B> except that +it uses fixed point arithmetic internally instead of floating point, +which makes it run faster. In turn, it is less accurate and may +distort the image. + +<P>Use the <B>pnmscale</B> user manual with <B>pnmscalefixed</B>. This +document only describes the difference. + +<P><B>pnmscalefixed</B> uses fixed point 12 bit arithmetic. By +contrast, <B>pnmscale</B> uses floating point arithmetic which on most +machines is probably 24 bit precision. This makes +<B>pnmscalefixed</B> run faster (30% faster in one experiment), but +the imprecision can cause distortions at the right and bottom edges. + +<P>The distortion takes the following form: One pixel from the edge of +the input is rendered larger in the output than the scaling factor +requires. Consequently, the rest of the image is smaller than the +scaling factor requires, because the overall dimensions of the image +are always as requested. This distortion will usually be very hard to +see. + +<P><B>pnmscalefixed</B> with the <B>-verbose</B> option tells you how +much distortion there is. + +<P>The amount of distortion depends on the size of the input image and how +close the scaling factor is to an integral 1/4096th. + +<P>If the scaling factor is an exact multiple of 1/4096, there is no +distortion. So, for example doubling or halving an image causes no +distortion. But reducing it or enlarging it by a third would cause +some distortion. To consider an extreme case, scaling a 100,000 row +image down to 50,022 rows would create an output image with all of the +input squeezed into the top 50,000 rows, and the last row of the input +copied into the bottom 22 rows of output. + +<P><B>pnmscalefixed</B> could probably be modified to use 16 bit or +better arithmetic without losing anything. The modification would +consist of a single constant in the source code. Until there is a +demonstrated need for that, though, the Netpbm maintainer wants to +keep the safety cushion afforded by the original 12 bit precision. + +<P><B>pnmscalefixed</B> does not have <B>pnmscale</b>'s <B>-nomix</B> +option. + +<HR> +<A NAME="index"> </A> +<H2>Table Of Contents</H2> +<UL> +<LI><A HREF="#lbAB">NAME</A> +<LI><A HREF="#lbAC">DESCRIPTION</A> +</UL> +</BODY> +</HTML> |