PNG Image Tests

This EPUB tests PNG image rendering.

Navigate through chapters to verify each test case.

Test Plan:

PNG decoding (no crash)

Grayscale rendering (4 levels)

Image centering

Large image scaling

PNG Format Test

Basic PNG decoding test.

If the image above is visible and no crash occurred, PNG decoding works.

Grayscale Test

Verify 4 distinct gray levels are visible.

Gradient Test

Verify gradient quantizes to 4 bands.

Centering Test

Verify image is centered horizontally.

Scaling Test

This image is 1200x1500 pixels - larger than the screen.

It should be scaled down to fit.

Wide Scaling Test

This image is 1807x736 pixels - a wide landscape format.

Tests scaling with dimensions that can cause cache mismatches.

Cache Test - Page A

First cache test page. Note the load time.

Navigate to next page, then come back.

Cache Test - Page B

Second cache test page.

Navigate back to Page A - it should load faster from cache.

Image Centering Bleed Test

Tests that image centering does not bleed into following text blocks (issue #1026).

Set Paragraph Alignment to Justify and Embedded Style to OFF before testing.

All paragraphs below the images should be justified, not centered.

FIRST PARAGRAPH after image. This paragraph follows an empty heading and an image-only paragraph. With the bug present, this text appears centered instead of justified because the empty heading's default Center alignment bleeds through the chain of empty text blocks. Lorem ipsum dolor sit amet, consectetur adipiscing elit sed do eiusmod tempor.

SECOND PARAGRAPH in the same div. This paragraph should always be justified because the first paragraph's text block was flushed. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia.