delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/16/07:03:48

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: PBM Utilities
Date: 16 Jun 2000 10:35:19 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 27
Distribution: world
Message-ID: <8icvt7$2b6$1@nets3.rz.RWTH-Aachen.DE>
References: <394776F6 DOT 43BC33C9 AT celco DOT co DOT uk> <8i7vb5$ieq$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <8iamcl$q1c$1 AT nnrp1 DOT deja DOT com> <lv8jksk9h61ori076kru2tlk73lcc97hsa AT 4ax DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 961151719 2406 137.226.32.75 (16 Jun 2000 10:35:19 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 16 Jun 2000 10:35:19 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comremovebullcr_p> wrote:

> Actually, a binary format such as PNG would probably be better.  IIRC,
> a PGM (portable gray map) file is really a C source file.

No, it isn't. You're confusing PGM and XBM/XPM there. The latter
really are C sourcefiles (i.e. you can just #include <image.xbm> in a
C program, and the image will be compiled in).

PGM and its brothers are extremely simple format. I actually doubt
that any simpler, while still self-contained file format for pixel
images could possibly be invented. They contain of just 3 elements:

	1) a 'magic string' so you can see what type of file it is
	2) size and bit-depth of the image, as human-readable 
           numbers.
	3) the uncompressed image content, either in human-readable
	   numbers, too, or as raw binary data.

Wether PNG or some other, more 'advanced' file format can be an
alternative to the simplicity of PBM is a question of application.  If
storage space essentially doesn't matter, while parsing and generation
speed of image data is of key importance, PBM may well outperform
every other file format.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019