[quote=marcobiscaro2112]Quanto ao método de compressão, o PNG usa uma derivação do LZ77:
[quote]5. Deflate/Inflate Compression
PNG compression method 0 (the only compression method presently
defined for PNG) specifies deflate/inflate compression with a 32K
sliding window. Deflate compression is an LZ77 derivative used in
zip, gzip, pkzip and related programs. Extensive research has been
done supporting its patent-free status. Portable C implementations
are freely available.[/quote]
Existem vários campos em uma imagem PNG, dentre os quais o IDAT se destaca (é nesse campo que fica os bits da imagem comprimida propriamente dita). A especificação desse campo:
Absolutamente nenhuma relação com imagens BMP ou DIF. Mais sobre o campo IDAT:
[quote]4.1.3. IDAT Image Data
The IDAT chunk contains the actual image data. To create this
data:
* Begin with image scanlines represented as described in
Image layout (Section 2.3); the layout and total size of
this raw data are determined by the fields of IHDR.
* Filter the image data according to the filtering method
specified by the IHDR chunk. (Note that with filter
method 0, the only one currently defined, this implies
prepending a filter type byte to each scanline.)
* Compress the filtered data using the compression method
specified by the IHDR chunk.
The IDAT chunk contains the output datastream of the
compression algorithm.
To read the image data, reverse this process.
There can be multiple IDAT chunks; if so, they must appear
consecutively with no other intervening chunks. The compressed
datastream is then the concatenation of the contents of all the
IDAT chunks. The encoder can divide the compressed datastream
into IDAT chunks however it wishes. (Multiple IDAT chunks are
allowed so that encoders can work in a fixed amount of memory;
typically the chunk size will correspond to the encoder's
buffer size.) It is important to emphasize that IDAT chunk
boundaries have no semantic significance and can occur at any
point in the compressed datastream. A PNG file in which each
IDAT chunk contains only one data byte is legal, though
remarkably wasteful of space. (For that matter, zero-length
IDAT chunks are legal, though even more wasteful.)
See Filter Algorithms (Chapter 6) and Deflate/Inflate
Compression (Chapter 5) for details.[/quote]
Referência completa: http://tools.ietf.org/html/rfc2083[/quote]
Vou perguntar de maneira diferente, já que você se recusa a ler o datasheet do bmp.
Porque png não tem nada haver com o bmp, já que ele é um método de compressão?
em qual formato de imagem a compressão png ou jpg deve ser aplicada?