On Tue, 15 Jul 2014 19:55:16 +0200 Markus Teich <markus.te...@stusta.mhn.de> wrote:
> Why do you overwrite the blanks before checking if they are blanks? If the > file > format specifies these characters as blanks, they should be checked for. > Otherwise the format specification should not say „blank“ but „any one byte“. There obviously is a little confusion about blanks (0x00) and ASCII-blanks. Replacing the "spaces" with \0 is just a trick and has nothing to do with the data-represenation. > ASCII only uses 7bit and since you probably want to use this one extra bit as > well, I would at least consider the data portion to be binary and not a > string. Yup, my mistake. The basic idea fortunately isn't affected by that. > I also think it is a well defined format. If someone want's to transfer an > image > over the network, he can easily use an arbitrary compression algorithm, > therefore we do not need one inside the format and also get rid of different > pixel formats (peek at the possibilities of DirectX if you want to throw up). > One problem could be if someone needs more than 8 bit per color channel, but I > think 8 bit are enough. I just imagine how well this format would work with gzip, especially for instance when an image doesn't have an alpha-channel and the gzip-algorithm can substitute each "fourth 0". Cheers FRIGN -- FRIGN <d...@frign.de>