dgs@swdev.Waterloo.NCR.COM (David G. Schwartz (11/15/90)
I have been requested to look up information about image formats with respect to standards on scan line length. 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. Microsoft says that Bitmaps should have scan lines padded to LONG (32 bit) boundaries but is no help otherwise. Is this representative of the industry? Any information you may have or pointers to sources would be appreciated (even just a "I'd like to know that too"). Please respond by Email and I will summarize if there is any interest. ---- Remember: Net.advice is usually worth what you pay for it. UUCP: uunet!{ncrlnk,watmath}!ncrwat!swdev!dgs VOICE: (519) 884-1710 x701 NCR: <dave.schwartz@Waterloo.NCR.COM> VoicePlus: 643-1701 DoD#00066
jef@well.sf.ca.us (Jef Poskanzer) (11/15/90)
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