Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!well!jef From: jef@well.sf.ca.us (Jef Poskanzer) Newsgroups: comp.graphics Subject: Re: Scan line lengths in image file formats Message-ID: <21667@well.sf.ca.us> Date: 14 Nov 90 22:45:31 GMT References: <1579@ncrwat.Waterloo.NCR.COM> Reply-To: Jef Poskanzer Organization: Paratheo-Anametamystikhood Of Eris Esoteric, Ada Lovelace Cabal Lines: 23 In the referenced message, dgs@swdev.Waterloo.NCR.COM (David G. Schwartz) wrote: } Does there exist any standard }or convention that an image input device should pad the length of a scan }line to a byte, word or double-word boundary? I'm thinking specifically }about monochrome (i.e. 1 bit/pel) images. Some formats specify padding. Some formats specify no padding. Some formats can go either way, because they store bytes per line separately from pixels per line. There is no standard. My preference is for no padding. I can see that there might be a speed advantage to padding in very specialized circumstances (homogenous hardware / software environment, and you want to do image I/O between the disk and the screen with no extra data copies). But that's a very rare situation, and most of the time padding has no perceptible speed advantage, and encourages non-portable implementations. And the either-way formats are useless, since you can't take advantage of the padding if you're not sure it will be there. --- Jef Jef Poskanzer jef@well.sf.ca.us {ucbvax, apple, hplabs}!well!jef "Say yur prayers, yuh flea-pickin' varmint!" -- Yosemite Sam