Lines 477-483
Link Here
|
477 |
) |
477 |
) |
478 |
{ |
478 |
{ |
479 |
// Palette is at info_ptr->palette |
479 |
// Palette is at info_ptr->palette |
480 |
INT32 PaletteSize = 1 << info_ptr->bit_depth; |
480 |
INT32 PaletteSize = 1 << png_get_bit_depth(png_ptr, info_ptr); |
481 |
// Read in palette into the palette of the DIB |
481 |
// Read in palette into the palette of the DIB |
482 |
LPRGBQUAD lpPalette = (*Info)->bmiColors; |
482 |
LPRGBQUAD lpPalette = (*Info)->bmiColors; |
483 |
TRACEUSER( "Jonathan", _T("PNG read: allocate palette and copy size %d\n"),PaletteSize); |
483 |
TRACEUSER( "Jonathan", _T("PNG read: allocate palette and copy size %d\n"),PaletteSize); |
Lines 497-503
Link Here
|
497 |
{ |
497 |
{ |
498 |
// We have a greyscale image and so generate a greyscale palette |
498 |
// We have a greyscale image and so generate a greyscale palette |
499 |
// Palette is at info_ptr->palette |
499 |
// Palette is at info_ptr->palette |
500 |
INT32 PaletteSize = 1 << info_ptr->bit_depth; |
500 |
INT32 PaletteSize = 1 << png_get_bit_depth(png_ptr, info_ptr); |
501 |
TRACEUSER( "Jonathan", _T("PNG read: Greyscale, so set up a greyscale palette for the DIB size %d\n"),PaletteSize); |
501 |
TRACEUSER( "Jonathan", _T("PNG read: Greyscale, so set up a greyscale palette for the DIB size %d\n"),PaletteSize); |
502 |
// Read in palette into the palette of the DIB |
502 |
// Read in palette into the palette of the DIB |
503 |
LPRGBQUAD lpPalette = (*Info)->bmiColors; |
503 |
LPRGBQUAD lpPalette = (*Info)->bmiColors; |