libpng Validation
Port build from safelibs/port-libpng at commit f31e4c81c123 (release build-f31e4c81c123)
Tests
PNG chunk metadata inspection Original / libpng / chunk-metadata-inspection Passed
Malformed PNG rejection Original / libpng / malformed-png-rejection Passed
Palette PNG fixture handling Original / libpng / palette-fixture-handling Passed
pngfix fixture handling Original / libpng / pngfix-fixture-handling Passed
libpng read write C API smoke Original / libpng / read-write-c-api-smoke Passed
netpbm pamdeinterlace height Original / libpng / usage-netpbm-batch11-pamdeinterlace-height Passed
netpbm pamdice tiles Original / libpng / usage-netpbm-batch11-pamdice-tiles Passed
netpbm pamstretch double Original / libpng / usage-netpbm-batch11-pamstretch-double Passed
netpbm pamthreshold black white Original / libpng / usage-netpbm-batch11-pamthreshold-bw Passed
netpbm pngtopam pamfile Original / libpng / usage-netpbm-batch11-pngtopam-pamfile Passed
netpbm pnmarith add Original / libpng / usage-netpbm-batch11-pnmarith-add Passed
netpbm pnmgamma shape Original / libpng / usage-netpbm-batch11-pnmgamma-shape Passed
netpbm pnmnorm shape Original / libpng / usage-netpbm-batch11-pnmnorm-shape Passed
netpbm pnmrotate right angle Original / libpng / usage-netpbm-batch11-pnmrotate-right-angle Passed
netpbm pnmshear width Original / libpng / usage-netpbm-batch11-pnmshear-width Passed
netpbm pamarith add PNG inputs Original / libpng / usage-netpbm-pamarith-add-png Passed
netpbm pamarith mean PNG inputs Original / libpng / usage-netpbm-pamarith-mean-png Passed
netpbm pamarith multiply PNG inputs Original / libpng / usage-netpbm-pamarith-multiply-png Passed
Multiplies two PNG-derived PGM images with pamarith -multiply and validates the per-pixel result against the expected normalized product.
netpbm pamcat -lr on PNG-derived inputs Original / libpng / usage-netpbm-pamcat-lr-png-fixture Passed
Decodes the basn2c08 fixture twice into PAM, concatenates them left-to-right with pamcat -lr, re-encodes to PNG, and asserts the result is a 64x32 PNG.
netpbm pamcat -tb on PNG-derived inputs Original / libpng / usage-netpbm-pamcat-tb-png-fixture Passed
Decodes the basn2c08 fixture twice into PAM, concatenates them top-to-bottom with pamcat -tb, re-encodes to PNG, and asserts the result is a 32x64 PNG that round-trips through libpng.
netpbm generated PNG blue channel Original / libpng / usage-netpbm-pamchannel-blue-generated-png Passed
netpbm blue channel PNG Original / libpng / usage-netpbm-pamchannel-blue-png Passed
netpbm pamchannel green PNG generated Original / libpng / usage-netpbm-pamchannel-green-png-generated Passed
Extracts the green channel from a generated RGB PNG with pamchannel and verifies the resulting grayscale values.
netpbm green channel PNG Original / libpng / usage-netpbm-pamchannel-green-png Passed
Extracts the green channel from a PNG fixture with PAM tools and verifies the single-channel output metadata.
netpbm generated PNG red channel Original / libpng / usage-netpbm-pamchannel-red-generated-png Passed
netpbm pamchannel red PNG generated Original / libpng / usage-netpbm-pamchannel-red-png-generated Passed
Extracts the red channel from a generated RGB PNG with netpbm and verifies the grayscale channel values.
netpbm red channel PNG Original / libpng / usage-netpbm-pamchannel-red-png Passed
netpbm pamcomp -align center on PNG fixture Original / libpng / usage-netpbm-pamcomp-align-center-png Passed
Crops a 16x16 patch out of basn2c08.png and composites it back onto the original via pamcomp -align center -valign middle, then re-encodes the result to PNG and verifies the geometry matches the underlying image.
netpbm pamcut crops PNG-derived PAM to exact dims Original / libpng / usage-netpbm-pamcut-specific-dims-png Passed
Decodes basn2c08.png to PAM, crops a 12x9 region anchored at offset (5,7) with pamcut, and verifies the result has exactly those dimensions and that a sample pixel matches the original at the corresponding source coordinate.
netpbm pamdepth 65535 + pamtopng yields 16-bit PNG Original / libpng / usage-netpbm-pamdepth-16bit-pamtopng-png Passed
Decodes basn2c08.png to a maxval-255 PPM, promotes it to maxval 65535 via pamdepth, encodes through pamtopng, and confirms the resulting PNG IHDR reports bit depth 16 (rather than 8) -- exercising libpng's 16-bit RGB write path through the netpbm toolchain.
netpbm pamenlarge by 4 on PNG-derived PGM Original / libpng / usage-netpbm-pamenlarge-by-four-png Passed
Decodes a synthesised 2x2 PNG to PGM, enlarges it 4x with pamenlarge, and verifies the output is exactly 8x8 with each source pixel replicated into the expected 4x4 block.
netpbm pamfile PNG Original / libpng / usage-netpbm-pamfile-png Passed
netpbm pamflip ccw grayscale PNG Original / libpng / usage-netpbm-pamflip-ccw-grayscale-png Passed
Rotates a generated grayscale PNG counter-clockwise with pamflip and verifies the rotated pixel order.
netpbm pamflip cw PNG generated Original / libpng / usage-netpbm-pamflip-cw-png-generated Passed
netpbm pamflip leftright on PNG-derived image Original / libpng / usage-netpbm-pamflip-lr-png Passed
Round-trips a small image through PNG, flips it left-right with pamflip, and checks horizontal mirroring of pixel values.
netpbm rotate PNG Original / libpng / usage-netpbm-pamflip-png Passed
netpbm pamflip topbottom on PNG-derived image Original / libpng / usage-netpbm-pamflip-tb-png Passed
Round-trips a small image through PNG, flips it top-bottom with pamflip, and checks vertical row reversal.
netpbm pamflip -transpose on PNG-derived PGM Original / libpng / usage-netpbm-pamflip-transpose-png Passed
Decodes a synthesised 3x2 PNG, applies pamflip -transpose, and verifies the resulting 2x3 PGM payload equals the matrix transpose of the original pixel grid.
netpbm pamfunc -multiplier 0.5 on PNG fixture Original / libpng / usage-netpbm-pamfunc-multiplier-half-png Passed
Converts basn2c08.png to PAM, applies pamfunc -multiplier 0.5, re-encodes to PNG, and verifies every output sample is at most half (rounded) the corresponding input sample.
netpbm pamlevels brightening factor Original / libpng / usage-netpbm-pamlevels-brighten-png Passed
Maps midtone grey (0x40) to bright (0x80) via pamlevels on a PNG-derived ppm and verifies the brightened pixel value.
netpbm pammixinterlace blends rows of PNG-derived PGM Original / libpng / usage-netpbm-pammixinterlace-png Passed
Decodes a synthesised 2x4 PNG to a PGM, runs pammixinterlace -filter=linear, and verifies the output dimensions are preserved and that interior rows are a (1/4, 1/2, 1/4) blend of their neighbors per the linear filter.
netpbm pampaintspill spreads paint sources on PNG-derived input Original / libpng / usage-netpbm-pampaintspill-png Passed
Builds a sparse PPM with two off-corner red and blue pixels on a black background, encodes through PNG and back, runs pampaintspill --bgcolor=black, and verifies the result is a 4x4 PPM where every pixel has at least some red or blue contribution (the background has been painted over).
netpbm pampick selects image from multi-image stream Original / libpng / usage-netpbm-pampick-image-png Passed
Concatenates two PNG-derived PAM images into a multi-image stream and uses pampick to extract the second image, verifying its content.
netpbm pamscale 0.5 halves PNG-derived dimensions Original / libpng / usage-netpbm-pamscale-half-roundtrip-png Passed
Decodes basn2c08.png to PPM, scales it by 0.5 with pamscale, re-encodes via pnmtopng, and confirms the resulting PNG is exactly 16x16 (half of the source 32x32) and parses as a valid PNG with the expected IHDR width/height.
netpbm pamsharpmap on PNG fixture Original / libpng / usage-netpbm-pamsharpmap-png Passed
Decodes basn2c08.png to PAM, runs pamsharpmap to apply local-contrast sharpening, and verifies the output preserves dimensions and channel depth and survives a pnmtopng round-trip.
netpbm pamslice column from PNG fixture Original / libpng / usage-netpbm-pamslice-column-png Passed
Converts the basn2c08 fixture to PAM via pngtopam and uses pamslice -column 0 to extract the first column of pixel values; asserts pamslice produced 32 rows of tabular output.
netpbm pamstack combines RGB + alpha bands into RGBA PNG Original / libpng / usage-netpbm-pamstack-combine-bands-png Passed
Builds three single-band PGM planes derived from a PNG round-trip plus a synthesised alpha band, stacks them with pamstack into an RGB_ALPHA PAM, encodes the result with pamtopng, and verifies pngtopam -alpha extracts the original alpha mask byte-for-byte.
netpbm pamthreshold -threshold=0.5 on PNG-derived PGM Original / libpng / usage-netpbm-pamthreshold-threshold-half-png Passed
Decodes a 4x1 PNG-derived grayscale ramp and runs pamthreshold -threshold=0.5, verifying that values strictly below 0.5 (mid-gray) become black and values at or above become white in a BLACKANDWHITE PAM.
netpbm pamtopng -background emits bKGD chunk Original / libpng / usage-netpbm-pamtopng-background-chunk-png Passed
Re-encodes basn2c08.png with pamtopng -background=red, walks the resulting PNG chunk stream to confirm a 6-byte bKGD chunk is present (RGB color type stores three big-endian uint16 components), and confirms the encoded background's red channel is non-zero while green and blue are zero. pamtopng emits the channel values at the source bit-depth scale (here 8-bit, i.e. R=255), not the spec's nominal 16-bit max, so we just check for an unmistakably-red triple.
netpbm pamtopng -gamma emits gAMA chunk Original / libpng / usage-netpbm-pamtopng-gamma-chunk-png Passed
Re-encodes basn2c08.png with pamtopng -gamma=0.45 and confirms the resulting PNG carries a 4-byte gAMA chunk whose big-endian value is 45000 (gamma * 100000), distinguishing the gAMA-bearing output from a default pamtopng encoding which omits gAMA.
netpbm pamtopng -itxt injects iTXt chunk Original / libpng / usage-netpbm-pamtopng-itxt-chunk-png Passed
Encodes basn2c08.png with pamtopng -itxt pointing at an international-text descriptor file, walks the output PNG chunk stream to confirm at least one iTXt chunk is present alongside structural IHDR/IDAT, and confirms the marker payload survives unmodified in the raw bytes.
pamtopng RGB_ALPHA PAM color type 6 Original / libpng / usage-netpbm-pamtopng-r9-rgb-alpha-png Passed
Builds an RGB_ALPHA 4-channel PAM and converts via pamtopng, verifying the output PNG IHDR carries color type 6 (truecolor with alpha).
pamtopng RGB 8-bit PAM Original / libpng / usage-netpbm-pamtopng-r9-rgb8-png Passed
Builds an RGB 8-bit PAM and converts it via pamtopng, verifying the output IHDR reports color type 2 (truecolor) and bit depth 8.
netpbm pamtopng -srgbintent emits sRGB chunk Original / libpng / usage-netpbm-pamtopng-srgbintent-png Passed
Decodes basn2c08.png to PPM, re-encodes with pamtopng -srgbintent=perceptual, and parses the resulting PNG to confirm an sRGB chunk is present with a 1-byte payload equal to 0 (perceptual rendering intent).
netpbm pamtopng -text injects tEXt chunks Original / libpng / usage-netpbm-pamtopng-text-chunk-png Passed
Builds a pamtopng text-keywords file with two entries, encodes basn2c08.png using pamtopng -text, walks the output to confirm at least two tEXt chunks were emitted, and greps the raw PNG bytes to confirm the keyword payload marker is preserved verbatim.
netpbm pamtopng -transparent emits tRNS chunk Original / libpng / usage-netpbm-pamtopng-transparent-trns-png Passed
Synthesises a 4x4 PPM containing known cyan pixels, encodes via pamtopng -transparent=rgb:00/ff/ff, walks the resulting PNG to confirm a 6-byte tRNS chunk is present (RGB color type stores three uint16 components naming the transparent color), and confirms the chunk's encoded color matches cyan (R=0, G=255, B=255 at 8-bit scale, packed into the uint16 fields).
netpbm PAM to PNM round trip Original / libpng / usage-netpbm-pamtopnm-roundtrip-png Passed
netpbm pamundice rebuilds diced PNG Original / libpng / usage-netpbm-pamundice-png Passed
Slices a PNG-derived image into tiles with pamdice and reassembles it with pamundice, verifying byte-exact recovery.
netpbm pbmtoxbm bilevel via threshold Original / libpng / usage-netpbm-pbmtoxbm-bilevel-png Passed
Thresholds a PNG-derived grayscale image to bilevel PBM and converts it to an X bitmap, verifying the XBM C header.
netpbm pgmnoise seeded determinism into PNG Original / libpng / usage-netpbm-pgmnoise-seeded-png Passed
Generates a deterministic noise PGM with pgmnoise -randomseed twice, encodes one to PNG, decodes it back and verifies the round-tripped bytes match the second seeded run.
netpbm pngtopam -alpha extracts the alpha plane only Original / libpng / usage-netpbm-pngtopam-alpha-only-png Passed
Synthesises an RGBA PNG by pamstack-ing RGB and alpha planes and pamtopng-encoding the result, then runs pngtopam -alpha on it and verifies the extracted alpha PGM matches the original alpha plane byte-for-byte.
netpbm pngtopam Original / libpng / usage-netpbm-pngtopam Passed
pngtopnm decodes solid blue PNG Original / libpng / usage-netpbm-pngtopnm-r9-color-decode Passed
Encodes a solid blue 4x4 RGB PNG via pnmtopng then decodes it back with pngtopnm and verifies the resulting PPM payload contains the expected (0,0,255) pixel triplets.
netpbm pngtopnm Original / libpng / usage-netpbm-pngtopnm Passed
netpbm pnmcat leftright PNG generated Original / libpng / usage-netpbm-pnmcat-leftright-png-generated Passed
Concatenates two generated grayscale PNGs side-by-side with pnmcat and verifies the combined pixel row.
netpbm pnmcat left-right PNG Original / libpng / usage-netpbm-pnmcat-leftright-png Passed
netpbm pnmcat -lr concatenates multiple PNG-derived PGMs Original / libpng / usage-netpbm-pnmcat-lr-multi-png Passed
Decodes three single-pixel PGMs (re-encoded through PNG via pnmtopng/pngtopnm) and concatenates them with pnmcat -lr; verifies the result is a 3x1 grayscale image with the expected pixel triple.
netpbm pnmcat topbottom PNG generated Original / libpng / usage-netpbm-pnmcat-topbottom-png-generated Passed
Stacks two generated grayscale PNGs vertically with pnmcat and verifies the combined pixel column.
netpbm pnmcat top-bottom PNG Original / libpng / usage-netpbm-pnmcat-topbottom-png Passed
netpbm crop generated PNG border Original / libpng / usage-netpbm-pnmcrop-border-png Passed
Converts a generated PNG through Netpbm and verifies pnmcrop removes a zero border down to the populated center pixels.
netpbm bottom row PNG cut Original / libpng / usage-netpbm-pnmcut-bottom-row-png Passed
netpbm corner cut PNG Original / libpng / usage-netpbm-pnmcut-corner-png Passed
Cuts a corner region from a PNG fixture through PNM tools and verifies the reconstructed PNG output.
netpbm pnmcut middle column PNG Original / libpng / usage-netpbm-pnmcut-middle-column-png Passed
netpbm pnmcut middle row PNG Original / libpng / usage-netpbm-pnmcut-middle-row-png Passed
netpbm crops PNG Original / libpng / usage-netpbm-pnmcut-png Passed
netpbm pnmdepth 15 PNG generated Original / libpng / usage-netpbm-pnmdepth-15-png-generated Passed
netpbm pnmdepth 63 PNG generated Original / libpng / usage-netpbm-pnmdepth-63-png-generated Passed
Reduces a generated grayscale PNG depth to 63 with pnmdepth and verifies the resulting maxval header.
netpbm depth PNG Original / libpng / usage-netpbm-pnmdepth-png Passed
netpbm pnmenlarge integer factor Original / libpng / usage-netpbm-pnmenlarge-png Passed
Enlarges a PNG-derived 2x2 image by an integer factor of 3 with pnmenlarge and verifies the replicated 6x6 pixel pattern.
netpbm pnmfile PNG Original / libpng / usage-netpbm-pnmfile-png Passed
netpbm pnmfile round trip PNG Original / libpng / usage-netpbm-pnmfile-roundtrip-png Passed
Round-trips a PNG fixture through PNM conversion tools and verifies pnmfile reports valid image dimensions afterward.
netpbm left right generated PNG flip Original / libpng / usage-netpbm-pnmflip-leftright-generated-png Passed
netpbm pnmflip leftright PNG generated Original / libpng / usage-netpbm-pnmflip-leftright-png-generated Passed
Flips a generated grayscale PNG left-to-right with netpbm and verifies the pixel order in the output image.
netpbm flips PNG Original / libpng / usage-netpbm-pnmflip-png Passed
netpbm pnmflip r180 PNG Original / libpng / usage-netpbm-pnmflip-r180-png Passed
netpbm pnmflip rotate180 RGB PNG Original / libpng / usage-netpbm-pnmflip-rotate180-rgb-png Passed
netpbm pnmflip topbottom PNG generated Original / libpng / usage-netpbm-pnmflip-topbottom-png-generated Passed
Flips a generated grayscale PNG top-to-bottom with netpbm and verifies the pixel order in the output image.
netpbm top-bottom flip PNG Original / libpng / usage-netpbm-pnmflip-topbottom-png Passed
Converts a PNG fixture to PNM, flips it top-to-bottom, and verifies the reconstructed PNG output.
netpbm transpose PNG flip Original / libpng / usage-netpbm-pnmflip-transpose-png Passed
netpbm gamma PNG Original / libpng / usage-netpbm-pnmgamma-png Passed
netpbm pnminvert PNG generated Original / libpng / usage-netpbm-pnminvert-png-generated Passed
netpbm inverts PNG grayscale Original / libpng / usage-netpbm-pnminvert-png Passed
Converts a tiny grayscale PNG through Netpbm inversion and verifies the inverted sample values survive a PNG round trip.
netpbm pnminvert RGB PNG roundtrip Original / libpng / usage-netpbm-pnminvert-rgb-png-roundtrip Passed
Inverts a generated RGB PNG with pnminvert and verifies the inverted per-channel pixel values after a PNG roundtrip.
netpbm pnmpaste onto PNG-derived canvas Original / libpng / usage-netpbm-pnmpaste-png Passed
netpbm pnmpsnr PNG comparison Original / libpng / usage-netpbm-pnmpsnr-png Passed
netpbm pnmscale double PNG generated Original / libpng / usage-netpbm-pnmscale-double-png-generated Passed
Doubles a generated grayscale PNG with netpbm and verifies the scaled output dimensions and pixel values.
netpbm double scale PNG Original / libpng / usage-netpbm-pnmscale-double-png Passed
netpbm pnmscale half PNG generated Original / libpng / usage-netpbm-pnmscale-half-png-generated Passed
Scales a generated grayscale PNG to half size with pnmscale and verifies the resulting one-by-one shape.
netpbm pnmscale half PNG Original / libpng / usage-netpbm-pnmscale-half-png Passed
netpbm scales PNG Original / libpng / usage-netpbm-pnmscale-png Passed
netpbm triple PNG scale Original / libpng / usage-netpbm-pnmscale-triple-png Passed
netpbm pnmsmooth PNG Original / libpng / usage-netpbm-pnmsmooth-png Passed
netpbm pnmtile from PNG fixture Original / libpng / usage-netpbm-pnmtile-png Passed
netpbm pnmtopng -compression 0 vs 9 Original / libpng / usage-netpbm-pnmtopng-compression-zero-png Passed
Encodes basn2c08.png with pnmtopng -compression 0 (store) and -compression 9 (best) and verifies the compression-0 PNG IDAT stream is materially larger than the compression-9 stream while both decode to identical pixels.
netpbm pnmtopng -filter 0 (none) Original / libpng / usage-netpbm-pnmtopng-filter-none-png Passed
Re-encodes basn2c08.png through pnmtopng with -filter 0 (force PNG filter type "None") and confirms every IDAT-decoded scanline begins with filter byte 0x00 while pixel content round-trips identically to the unfiltered re-encode.
netpbm pnmtopng -sub restricts row filter Original / libpng / usage-netpbm-pnmtopng-filter-sub-png Passed
Re-encodes basn2c08.png with pnmtopng -sub (only Sub filter permitted), decompresses the resulting IDAT stream and confirms every scanline filter byte is either 0 (None) or 1 (Sub) -- pnmtopng documents -sub as "permits the Sub filter" and the encoder must not emit Up/Average/Paeth filter bytes when only Sub is allowed. Pixel content must round-trip identically.
netpbm pnmtopng -interlace Adam7 Original / libpng / usage-netpbm-pnmtopng-interlace-adam7-png Passed
Re-encodes basn2c08.png with pnmtopng -interlace, parses the IHDR chunk to confirm the interlace method byte equals 1 (Adam7), and verifies the interlaced output decodes to pixels identical to the non-interlaced re-encode.
netpbm pnmtopng -palette derived from fixture Original / libpng / usage-netpbm-pnmtopng-palette-from-fixture-png Passed
Quantizes basn2c08.png to a small palette via pnmquant 16, encodes the result with pnmtopng -palette using a derived 16-color palette PPM, and verifies the resulting PNG IHDR reports color type 3 (indexed) and contains a PLTE chunk with the expected 48-byte (16-entry) length.
pnmtopng 16-bit PGM input Original / libpng / usage-netpbm-pnmtopng-r9-bitdepth16-pgm-png Passed
Encodes a 16-bit PGM through pnmtopng and verifies the resulting PNG IHDR carries bit depth 16 and color type 0.
pnmtopng -compression 9 emits PNG Original / libpng / usage-netpbm-pnmtopng-r9-compression-level-png Passed
Encodes a PPM with pnmtopng -compression 9 and verifies that the output is a PNG file and is generally smaller than -compression 0 output.
pnmtopng -filter up emits valid PNG Original / libpng / usage-netpbm-pnmtopng-r9-filter-up-png Passed
Encodes a PPM through pnmtopng -filter up and verifies the output is recognized as PNG image data and reopens with the expected dimensions.
pnmtopng grayscale PGM stays non-truecolor Original / libpng / usage-netpbm-pnmtopng-r9-grayscale-png Passed
Encodes a PGM grayscale ramp and verifies the resulting PNG IHDR carries a non-truecolor color type (0 grayscale or 3 palette), proving pnmtopng didn't expand to RGB.
netpbm pnmtopng -modtime adds tIME chunk Original / libpng / usage-netpbm-pnmtopng-time-now-png Passed
Encodes basn2c08.png with pnmtopng -modtime set to the current UTC timestamp (the formatted form pnmtopng requires) and parses the resulting PNG to confirm a tIME chunk is present with a canonical 7-byte payload and the encoded year matches the requested year.
netpbm pnmtopng -transparent specific color Original / libpng / usage-netpbm-pnmtopng-transparent-color-png Passed
Builds a 4x4 PPM containing a known magenta pixel, encodes it with pnmtopng -transparent =rgb:ff/00/ff, and confirms the resulting PNG carries a tRNS chunk and that pngtopam exposes a four-channel image whose alpha channel is 0 exactly at the magenta pixels.
netpbm pnmtopng Original / libpng / usage-netpbm-pnmtopng Passed
netpbm ppmtoyuv from PNG-derived ppm Original / libpng / usage-netpbm-ppmtoyuv-png Passed
Decodes the basn2c08 PNG fixture to a ppm and converts it to YUV via ppmtoyuv, then verifies the YUV byte count matches the 4:2:2 Abekas layout for 32x32.
netpbm pamditherbw produces a 1-bit raster from a PNG-derived grayscale image Original / libpng / usage-netpbm-r10-pamditherbw-png Passed
Decodes a PNG with a 4-step grayscale ramp through pngtopnm, runs pamditherbw, and verifies the output declares 1 BLACKANDWHITE channel via pamfile.
netpbm pamfind locates a known color in a PNG-derived PAM Original / libpng / usage-netpbm-r10-pamfind-color-png Passed
Builds a PNG with a single red pixel in a known position, decodes it through pngtopam, and confirms pamfind reports the matching coordinate.
netpbm pamhue 120-degree rotation maps red to green Original / libpng / usage-netpbm-r10-pamhue-shift-png Passed
Decodes a pure-red PNG, rotates the hue by 120 degrees with pamhue, and verifies the result is dominated by the green channel.
netpbm pamrgbatopng emits an RGBA PNG from a synthetic PAM Original / libpng / usage-netpbm-r10-pamrgbatopng-rgba Passed
Builds a 2x1 PAM with the RGB_ALPHA tuple type and converts it with pamrgbatopng, asserting the resulting PNG announces 8-bit RGBA via the file(1) classifier.
netpbm pamtable dumps PNG-derived PAM as a numeric table Original / libpng / usage-netpbm-r10-pamtable-png Passed
Decodes a synthetic PNG with pngtopam and pipes it through pamtable, then verifies the resulting text grid contains the expected RGB sample values.
netpbm pamcrater elevation pipes through pnmgamma into PNG Original / libpng / usage-netpbm-r11-pamcrater-pnmgamma-png Passed
Generates a synthetic crater field with pamcrater, normalises the elevation tuple type via pnmgamma, and writes the result as a 16-bit grayscale PNG, exercising the elevation-to-pnm bridge.
netpbm pamoil oil-paint preserves geometry through PNG encode Original / libpng / usage-netpbm-r11-pamoil-png-roundtrip Passed
Decodes a synthetic PNG to PAM, applies pamoil's oil-paint stylisation, and re-encodes via pnmtopng, confirming the output PNG retains the original 32x24 dimensions and color type.
netpbm pnmscalefixed 2 doubles PNG-derived dimensions Original / libpng / usage-netpbm-r11-pnmscalefixed-double-png Passed
Decodes a synthetic PNG to PAM, scales it 2x with pnmscalefixed (fixed-point integer scaling), and re-encodes via pnmtopng, verifying the output PNG geometry is exactly twice the input.
netpbm pnmtopng -interlace sets IHDR Adam7 flag Original / libpng / usage-netpbm-r11-pnmtopng-interlace-flag Passed
Encodes a synthetic PPM with pnmtopng -interlace and confirms the resulting PNG IHDR interlace byte is 1 (Adam7) while the default encoding uses byte 0.
netpbm pnmtopng -filter=4 produces a valid PNG Original / libpng / usage-netpbm-r11-pnmtopng-paeth-filter Passed
Encodes a synthetic gradient PPM with pnmtopng -filter=4 (Paeth filter strategy) and verifies the output is a well-formed PNG, exercising the explicit filter selection path through libpng.
netpbm pngtopnm -alpha extracts the alpha channel as a PGM Original / libpng / usage-netpbm-r12-pngtopnm-alpha-extracts-mask Passed
Encodes an RGBA PNG via pamrgbatopng, decodes it back with pngtopnm -alpha, and verifies the result is a PGM grayscale image with the same width and height as the source — the -alpha flag must produce a single-channel mask.
netpbm pngtopnm -mix flattens an RGBA PNG into a 3-channel PPM Original / libpng / usage-netpbm-r12-pngtopnm-mix-flattens-alpha Passed
Encodes an RGBA PNG, decodes it with pngtopnm -mix which composites the alpha channel against a background to produce a 3-channel PPM, and verifies the output identifies as PPM with the original width and height.
netpbm pnmtopng -compression=9 produces a valid PNG Original / libpng / usage-netpbm-r12-pnmtopng-compression-9-png Passed
Encodes a synthetic 32x32 PPM with pnmtopng -compression=9 (maximum zlib level) and verifies the output is a well-formed PNG with the expected geometry, exercising the high-compression code path through libpng.
netpbm pnmtopng -filter=3 produces a valid PNG Original / libpng / usage-netpbm-r12-pnmtopng-filter-average-png Passed
Encodes a synthetic gradient PPM with pnmtopng -filter=3 (Average filter strategy) and verifies the output is a well-formed PNG, exercising the explicit Average filter selection path through libpng — distinct from the existing -filter=4 (Paeth) test.
netpbm pnmtopng -force keeps explicit truecolor encoding Original / libpng / usage-netpbm-r12-pnmtopng-force-flag-png Passed
Encodes a 16x16 PPM with pnmtopng -force which suppresses the optimization that would convert to a paletted PNG when colors are few, and verifies the output IHDR records color type 2 (truecolor RGB) rather than 3 (palette).
netpbm pnmtopng -text inserts a tEXt chunk with the supplied keyword Original / libpng / usage-netpbm-r12-pnmtopng-text-chunk-keyword-png Passed
Encodes a synthetic PPM with pnmtopng -text pointing at a small file that declares "Author Alice" and verifies the resulting PNG contains a tEXt chunk whose keyword "Author" and value "Alice" are present in the binary stream.
netpbm pngtopam -alphapam decodes an RGBA PNG into a 4-channel RGB_ALPHA PAM Original / libpng / usage-netpbm-r13-pngtopam-rgba-from-rgba-png Passed
Encodes an RGBA PAM into a PNG via pamtopng, decodes it back with pngtopam -alphapam, and verifies the result is a P7-magic PAM with DEPTH 4, MAXVAL 255, and TUPLTYPE RGB_ALPHA, locking in pngtopam's alpha-preserving decode path distinct from the existing -alpha extract-mask test which yields a single-channel PGM.
netpbm pnmtopng -rgb writes a cHRM chunk with eight 4-byte fields Original / libpng / usage-netpbm-r13-pnmtopng-chroma-emits-chrm-chunk Passed
Encodes a synthetic PPM with pnmtopng -rgb supplying explicit white-point and primary chromaticity coordinates as a single quoted string of eight floats, and walks the resulting PNG to confirm a cHRM chunk is present whose payload is exactly 32 bytes (eight 4-byte big-endian integers for white-point and RGB primaries), locking in the cHRM emission path through libpng.
netpbm pnmtopng -gamma=0.45455 emits a gAMA chunk Original / libpng / usage-netpbm-r13-pnmtopng-gamma-emits-gama-chunk Passed
Encodes a synthetic PPM with pnmtopng -gamma=0.45455 (the canonical sRGB gamma) and walks the chunk stream of the resulting PNG to confirm exactly one gAMA chunk is present whose 4-byte big-endian payload equals 45455 — pnmtopng stores the supplied gamma scaled by 100000 in the gAMA payload.
netpbm pnmtopng -size emits a pHYs chunk recording the requested pixels-per-unit Original / libpng / usage-netpbm-r13-pnmtopng-phys-aspect-2-1 Passed
Encodes a synthetic PPM with pnmtopng -size declaring 200 pixels-per-unit on the x axis and 100 on the y axis with unit specifier 0 (aspect-only), and walks the resulting PNG to confirm a pHYs chunk is present whose 9-byte payload encodes those exact integers — locking in pnmtopng's physical-pixel-size emission path through libpng.
netpbm pnmtopng -srgbintent=perceptual emits an sRGB chunk with rendering-intent byte 0 Original / libpng / usage-netpbm-r13-pnmtopng-srgbintent-perceptual Passed
Encodes a synthetic PPM with pnmtopng -srgbintent=perceptual (the named token Ubuntu 24.04 pnmtopng requires) and walks the chunk stream of the resulting PNG to confirm exactly one sRGB chunk is present whose 1-byte payload equals 0, locking in the perceptual rendering-intent emission path.
netpbm pngtopnm -byrow decodes a non-interlaced RGB PNG row-at-a-time path Original / libpng / usage-netpbm-r14-pngtopnm-byrow-decodes-rgb Passed
Encodes a synthetic 16x16 RGB PPM via pnmtopng (non-interlaced), then decodes it back with pngtopnm -byrow and verifies the result is a P6 PPM of the original dimensions — locking in pngtopnm/pngtopam's row-by-row decode path through libpng's png_read_row() on Ubuntu 24.04.
netpbm pngtopnm -text dumps tEXt keyword and value into a side file Original / libpng / usage-netpbm-r14-pngtopnm-text-extracts-text-chunk Passed
Builds a PNG containing a tEXt "Author Alice" chunk with pnmtopng -text and decodes it back with pngtopnm -text=<file>, asserting the side-file pngtopnm writes contains both the keyword "Author" and the value "Alice" — locking in pngtopnm's tEXt-extraction path which is distinct from -alpha and -mix.
netpbm pnmtopng -alpha=mask.pgm encodes per-pixel transparency into the PNG Original / libpng / usage-netpbm-r14-pnmtopng-alpha-emits-trns-or-rgba Passed
Encodes a 16x16 RGB PPM with pnmtopng -alpha pointing at a 16x16 PGM transparency mask, and walks the chunk stream of the resulting PNG to confirm transparency was preserved either as an RGBA color type (6) or via a tRNS chunk paired with a paletted color type — locking in that the pnmtopng alpha-mask path through libpng produces a structurally valid transparent PNG.
netpbm pnmtopng -comp_strategy=huffman_only writes a valid PNG of the original dimensions Original / libpng / usage-netpbm-r14-pnmtopng-comp-strategy-huffman-only Passed
Encodes a synthetic 24x24 PPM with pnmtopng -comp_strategy=huffman_only (one of the documented zlib strategies) and verifies the output is a valid 24x24 RGB PNG, locking in that the Huffman-only zlib strategy path is reachable on Ubuntu 24.04 and produces a well-formed PNG.
netpbm pnmtopng -modtime emits a tIME chunk encoding the requested instant Original / libpng / usage-netpbm-r14-pnmtopng-modtime-emits-time-chunk Passed
Encodes a synthetic PPM with pnmtopng -modtime="2024-01-15 12:00:00" and walks the resulting PNG to confirm exactly one tIME chunk is present whose 7-byte payload encodes the precise calendar date 2024-01-15 with all time fields in valid PNG ranges — locking in the tIME emission path through libpng on Ubuntu 24.04. The hour field is allowed to be shifted from the supplied local time because pnmtopng stores tIME in UTC.
netpbm pnmtopng -ztxt emits a zTXt chunk instead of a tEXt chunk Original / libpng / usage-netpbm-r14-pnmtopng-ztxt-compresses-text Passed
Encodes a synthetic PPM with pnmtopng -ztxt pointing at a "Comment Hello" descriptor file and walks the resulting PNG to confirm a zTXt chunk is present and that no tEXt chunk was emitted for the same payload — locking in that -ztxt selects the compressed-text path through libpng, distinct from the tEXt path covered elsewhere.
netpbm pnmtopng -background=red emits a bKGD chunk Original / libpng / usage-netpbm-r15-pnmtopng-background-bkgd-chunk Passed
Encodes a synthetic 16x16 PPM with pnmtopng -background=red (the documented option that records a suggested background color) and walks the resulting PNG to confirm at least one bKGD chunk is present — locking in libpng's background-color emission path on Ubuntu 24.04 netpbm. Distinct from -transparent, -alpha, and -srgbintent.
netpbm pnmtopng -comp_mem_level=9 writes a valid PNG with max zlib mem-level Original / libpng / usage-netpbm-r15-pnmtopng-comp-mem-level-9 Passed
Encodes a synthetic 24x24 PPM with pnmtopng -comp_mem_level=9 (the documented maximum-memory zlib setting) and verifies the output is a valid 24x24 RGB PNG — locking in that the zlib memory-level override path is reachable on Ubuntu 24.04 netpbm.
netpbm pnmtopng -comp_window_bits=15 writes a valid PNG with max-window zlib Original / libpng / usage-netpbm-r15-pnmtopng-comp-window-bits-15 Passed
Encodes a synthetic 24x24 PPM with pnmtopng -comp_window_bits=15 (the documented maximum, log2(32 KiB)) and verifies the output is a valid 24x24 RGB PNG — locking in that the zlib window-size override path is reachable on Ubuntu 24.04 netpbm. Distinct from -compression and -comp_strategy.
netpbm pnmtopng -hist on a small palette image emits a hIST chunk Original / libpng / usage-netpbm-r15-pnmtopng-hist-emits-hist-chunk Passed
Encodes a tiny 4x4 PPM with only 4 distinct colors using pnmtopng -hist (the documented option that records color frequencies) and walks the resulting PNG to confirm at least one hIST chunk is present — locking in libpng's color-histogram emission path on Ubuntu 24.04 netpbm. The image is designed to be paletted so the hIST chunk is well-defined.
netpbm pnmtopng -nofilter writes a valid PNG of the original dimensions Original / libpng / usage-netpbm-r15-pnmtopng-nofilter-writes-valid-png Passed
Encodes a synthetic 24x24 PPM with pnmtopng -nofilter (one of the documented per-row filter selectors) and verifies the output is a valid 24x24 RGB PNG — locking in that the row-filter selection path through libpng accepts -nofilter on Ubuntu 24.04 netpbm. Distinct from -avg, -up, -sub, -paeth covered/coverable elsewhere.
netpbm pnmtopng -srgbintent=relativecolorimetric emits an sRGB chunk with byte 1 Original / libpng / usage-netpbm-r15-pnmtopng-srgbintent-relativecolorimetric Passed
Encodes a synthetic PPM with pnmtopng -srgbintent=relativecolorimetric (one of the four documented named tokens) and walks the chunk stream to confirm exactly one sRGB chunk is present whose 1-byte payload equals 1 — locking in the relative-colorimetric rendering-intent emission path. Distinct from perceptual (0) and saturation (2) intent tests.
netpbm pnmtopng -srgbintent=saturation emits an sRGB chunk with rendering-intent byte 2 Original / libpng / usage-netpbm-r15-pnmtopng-srgbintent-saturation Passed
Encodes a synthetic PPM with pnmtopng -srgbintent=saturation (one of the four documented named tokens) and walks the chunk stream to confirm exactly one sRGB chunk is present whose 1-byte payload equals 2 — locking in the saturation rendering-intent emission path. Distinct from the perceptual (0) intent test in r13.
netpbm pnmtopng -up writes a valid PNG using the up row-filter selector Original / libpng / usage-netpbm-r15-pnmtopng-up-filter-writes-valid-png Passed
Encodes a synthetic 24x24 PPM with pnmtopng -up (one of the documented per-row filter selectors that allows the Up filter) and verifies the output is a valid 24x24 RGB PNG — locking in the up-filter path on Ubuntu 24.04 netpbm. Distinct from -sub, -avg, -nofilter, -paeth.
netpbm pnmpsnr on a PNG-derived self-comparison reports no difference Original / libpng / usage-netpbm-r16-pnmpsnr-identical-no-difference Passed
Builds a synthetic 8x8 PNG, decodes to PPM twice via pngtopnm, runs pnmpsnr on the two byte-identical PNMs, and asserts the captured diagnostic contains "no difference" — pinning Ubuntu 24.04 netpbm's identical-image report.
netpbm pamcomp composites a 2x2 overlay onto a 4x4 base via PNG-derived inputs Original / libpng / usage-netpbm-r17-pamcomp-opaque-overlay-produces-output Passed
Builds a 4x4 base PPM and a 2x2 overlay PPM, runs pamcomp through pnm2png/png2pnm round trips, and asserts the result has dimensions "4 by 4" — exercising libpng-mediated alpha-free overlay composition.
netpbm pamfile reports "PPM raw" on a libpng-derived color PPM Original / libpng / usage-netpbm-r17-pamfile-reports-ppm-raw-string Passed
Decodes a PNG to PPM with pngtopnm and asserts pamfile output contains the literal "PPM raw" magic-type descriptor, pinning the Ubuntu 24.04 netpbm pamfile schema string.
netpbm pamstretch -xscale 2 -yscale 1 doubles width and preserves height Original / libpng / usage-netpbm-r17-pamstretch-xscale-2-doubles-width Passed
Stretches a 4x3 PNG-derived PGM with pamstretch -xscale 2 -yscale 1 and asserts pamfile reports an 8x3 output via "8 by 3", pinning Ubuntu netpbm's directional scaling factor behavior.
netpbm pamtopng then pngtopam round-trip preserves dimensions Original / libpng / usage-netpbm-r17-pamtopng-then-pngtopam-roundtrip-dims Passed
Converts a 6x5 PPM to PNG with pamtopng and back to PAM with pngtopam, then asserts pamfile reports "6 by 5" — verifying libpng-mediated dimension fidelity end-to-end.
netpbm pnmcat -lr concatenation of three images yields width equal to sum Original / libpng / usage-netpbm-r17-pnmcat-lr-three-images-width-is-sum Passed
Joins three PNG-derived 2x2 grayscale images horizontally via pnmcat -lr and asserts the resulting pamfile listing shows "6 by 2", verifying width additivity across three inputs through the libpng round trip.
netpbm pamcut -left -top -width -height carves a 3x3 window from a PNG-decoded PPM Original / libpng / usage-netpbm-r18-pamcut-window-dims Passed
Encodes an 8x8 PPM to PNG with pnmtopng, decodes with pngtopnm, then runs pamcut -left 2 -top 1 -width 3 -height 3 and asserts pamfile reports a "3 by 3" sub-image, exercising netpbm sub-region selection through a libpng round trip.
netpbm pamflip -leftright preserves dimensions through a libpng round trip Original / libpng / usage-netpbm-r18-pamflip-leftright-keeps-dims Passed
Builds a 5x3 PPM, encodes to PNG via pnmtopng, decodes and flips left-right with pamflip, and asserts pamfile reports "5 by 3" — exercising libpng-mediated geometry preservation under flip.
netpbm pamscale 0.5 halves both dimensions of a PNG-derived PPM Original / libpng / usage-netpbm-r18-pamscale-half-width-height Passed
Builds an 8x8 PPM, encodes to PNG via pnmtopng, decodes via pngtopnm, scales by pamscale 0.5, and asserts pamfile reports "4 by 4" — exercising netpbm scaling through a libpng round trip.
netpbm pngtopam on a PngSuite 32x32 fixture reports "32 by 32" via pamfile Original / libpng / usage-netpbm-r18-pngtopam-fixture-pamfile-dims Passed
Decodes the basn2c08.png PngSuite fixture with pngtopam and asserts pamfile reports "32 by 32" — pinning libpng-mediated dimension fidelity on a real PngSuite sample.
netpbm pnmcat -tb of two PNG-derived images sums their heights Original / libpng / usage-netpbm-r18-pnmcat-tb-stacks-height Passed
Concatenates two 3x2 PNG-decoded PGMs vertically with pnmcat -tb and asserts pamfile reports a "3 by 4" output, pinning height additivity through the libpng round trip.
netpbm pamarith -subtract on two PNG-derived PPMs preserves dimensions Original / libpng / usage-netpbm-r19-pamarith-subtract-png-roundtrip-dims Passed
Encodes two 7x5 PPMs to PNG via pnmtopng, decodes back to PPM with pngtopnm, runs pamarith -subtract on the pair, and asserts pamfile reports "7 by 5", pinning libpng-mediated pixel-arithmetic dimensions.
netpbm pamflip top-bottom twice round-trips a PNG-derived PPM to identical bytes Original / libpng / usage-netpbm-r19-pamflip-tb-roundtrip-restores-png Passed
Encodes a 6x6 PPM to PNG via pnmtopng, decodes back to PPM via pngtopnm, applies pamflip -tb twice and asserts the SHA-256 of the doubly-flipped PPM matches the original decoded PPM, pinning the flip-involutivity round trip across libpng.
netpbm pamtopng on an RGB_ALPHA PAM emits IHDR color type 6 Original / libpng / usage-netpbm-r19-pamtopng-rgba-color-type-six Passed
Builds a 12x12 PAM with TUPLTYPE RGB_ALPHA, encodes via pamtopng, and asserts the IHDR color type byte is 6 (RGBA), pinning that the libpng encoder selects the correct color type for alpha-bearing PAM input.
netpbm pngtopnm decodes an 8-bit grayscale PNG into a P5 PGM of matching dimensions Original / libpng / usage-netpbm-r19-pngtopnm-grayscale-shape Passed
Builds an 8x4 PGM, encodes to PNG via pnmtopng, decodes via pngtopnm, and asserts pamfile reports "PGM raw" and "8 by 4", pinning the libpng-backed grayscale-channel decode shape.
netpbm pnmtopng output terminates with a proper IEND chunk Original / libpng / usage-netpbm-r19-pnmtopng-emits-iend-chunk Passed
Encodes a 5x5 PPM to PNG via pnmtopng and asserts the final 12 bytes match the canonical IEND chunk (length 0, type "IEND", CRC 0xae426082), pinning the libpng end-of-stream marker exactly.
netpbm pnmtopng -interlace marks the IHDR interlace byte non-zero Original / libpng / usage-netpbm-r19-pnmtopng-interlace-byte-set Passed
Encodes a 10x10 PPM with pnmtopng -interlace and inspects byte 28 (interlace method) of the IHDR chunk, asserting it is non-zero, pinning the Adam7 interlace flag in the libpng-emitted output.
netpbm pngtopnm on a paletted PNG decodes into a P6 PPM of matching dimensions Original / libpng / usage-netpbm-r20-pngtopnm-paletted-decodes-rgb-ppm Passed
Generates a 16x10 RGB PPM, encodes via pnmtopng with -palette to force paletted output, validates the IHDR color type is 3 (paletted), then decodes the PNG with pngtopnm and asserts the output PPM begins with P6 magic and the dimensions match the source 16x10, exercising libpng's paletted-decode-to-RGB expansion through netpbm.
netpbm pngtopnm on an RGB PNG emits a P6 PPM of matching dimensions Original / libpng / usage-netpbm-r20-pngtopnm-rgb-png-yields-ppm Passed
Encodes a 14x9 RGB PPM via pnmtopng, decodes the result back through pngtopnm, and asserts the decoded output begins with the P6 magic and reports the same WxH dimensions, exercising libpng's decode path through netpbm's pngtopnm tool.
netpbm pnmtopng -compression 0 emits a valid PNG that decodes back to the source Original / libpng / usage-netpbm-r20-pnmtopng-compression-zero-roundtrip Passed
Encodes a 12x12 RGB PPM via pnmtopng -compression 0 (no zlib compression), validates the PNG magic and IEND, then decodes via pngtopnm and asserts dimensions match the source, exercising libpng's encoder with the stored-deflate path and round-tripping through the decoder.
netpbm pnmtopng on a P5 PGM emits IHDR color type 0 (grayscale) Original / libpng / usage-netpbm-r20-pnmtopng-grayscale-ihdr-color-type-zero Passed
Builds a 12x12 P5 grayscale PGM, encodes via pnmtopng, and asserts the IHDR color type byte is 0 (grayscale, no alpha) and the bit depth is 8, exercising libpng's encoder color-type selection for plain grayscale inputs.
netpbm pnmtopng -libversion mentions libpng in the banner output Original / libpng / usage-netpbm-r20-pnmtopng-libversion-banner Passed
Runs pnmtopng -libversion and asserts the printed banner contains the substring "libpng", pinning that the netpbm encoder reports its underlying libpng dependency on Ubuntu 24.04.
netpbm pnmtopng on a P6 PPM emits IHDR color type 2 (truecolor) Original / libpng / usage-netpbm-r20-pnmtopng-rgb-color-type-two Passed
Builds a 16x10 P6 RGB PPM, encodes via pnmtopng, and asserts the IHDR color type byte is 2 (truecolor RGB, no alpha) and the bit depth is 8, exercising libpng's encoder color-type selection for plain RGB inputs.
netpbm pngtopam on RGBA PNG yields a 4-channel PAM (depth 4) Original / libpng / usage-netpbm-r21-pngtopam-alpha-channel-bands-four Passed
Builds an RGBA PNG, decodes via pngtopam, and asserts pamfile reports the PAM tuple depth as 4 (R,G,B,A), pinning libpng's alpha channel preservation as the fourth band in the netpbm PAM stream.
netpbm pngtopam on an RGBA PNG emits a PAM with tuple type RGB_ALPHA Original / libpng / usage-netpbm-r21-pngtopam-fixture-yields-rgba-tuple-type Passed
Generates an 8x8 RGBA PNG via pnmtopng -alpha, decodes back with pngtopam, and asserts pamfile reports tuple type "RGB_ALPHA", pinning libpng's RGBA color-type round-trip through netpbm's PAM tuple-type labelling.
netpbm pngtopnm -mix -background flattens RGBA to fully-opaque RGB pixels Original / libpng / usage-netpbm-r21-pngtopnm-mix-applies-background Passed
Builds an RGBA PNG with a fully-transparent pixel at (0,0), decodes via pngtopnm -mix -background=rgb:ff/00/00, and asserts the resulting P6 PPM has that pixel set to (255,0,0), pinning libpng's alpha compositing path under netpbm's mix/background semantics.
netpbm pnmtopng -comp_strategy filtered emits a valid PNG with magic header Original / libpng / usage-netpbm-r21-pnmtopng-comp-strategy-rle-valid-png Passed
Encodes a P6 PPM via pnmtopng -comp_strategy filtered and asserts the output begins with the PNG 8-byte signature and contains an IHDR chunk, pinning that libpng accepts the "filtered" zlib strategy via netpbm's -comp_strategy option.
netpbm pnmtopng -text writes a tEXt chunk with the Comment keyword Original / libpng / usage-netpbm-r21-pnmtopng-text-keyword-comment-chunk Passed
Writes a tEXt directive file via pnmtopng -text and asserts the produced PNG byte stream literally contains the tEXt chunk type and the Comment keyword string, pinning libpng's tEXt chunk emission through the netpbm encoder.
netpbm roundtrip png Original / libpng / usage-netpbm-roundtrip-png Passed
pngquant missing input exit 2 Original / libpng / usage-pngquant-cant-open-input-png Passed
Confirms pngquant returns exit code 2 when the input PNG path cannot be opened, and writes no output file.
pngquant --colors 128 quantises PNG fixture Original / libpng / usage-pngquant-colors-128-png Passed
Quantises basn2c08.png with pngquant --colors 128 and verifies the output is a valid PNG whose decoded palette has at most 128 unique colours.
pngquant --colors 256 (max palette) Original / libpng / usage-pngquant-colors-256-png Passed
Quantises a PNG fixture with the maximum palette size of 256 and confirms PNG output is still produced.
pngquant colors eight PNG generated Original / libpng / usage-pngquant-colors-eight-png-generated Passed
Quantizes a generated PNG to eight colors with pngquant and verifies the resulting RGB palette size does not exceed eight colors.
pngquant eight colors Original / libpng / usage-pngquant-colors-eight-png Passed
pngquant colors four PNG generated Original / libpng / usage-pngquant-colors-four-png-generated Passed
Quantizes a generated RGB PNG to four colors with pngquant and verifies the resulting palette stays within four unique colors.
pngquant four colors Original / libpng / usage-pngquant-colors-four-png Passed
pngquant sixteen colors PNG Original / libpng / usage-pngquant-colors-sixteen-png Passed
pngquant --colors 64 palette cap Original / libpng / usage-pngquant-colors-sixtyfour-png Passed
Quantises the basn2c08 PNG fixture to 64 colours and verifies the resulting palette stays at or below the cap.
pngquant three color PNG Original / libpng / usage-pngquant-colors-three-png Passed
pngquant two colors PNG Original / libpng / usage-pngquant-colors-two-png Passed
pngquant compress png Original / libpng / usage-pngquant-compress-png Passed
pngquant default output filename uses -fs8.png suffix Original / libpng / usage-pngquant-default-fs8-suffix-png Passed
Copies basn2c08.png into a temp directory as input.png, runs pngquant with --force but no --output / --ext (default behaviour), and confirms pngquant produced an output named input-fs8.png in the same directory while the original input.png is still present and the input-or8.png variant (used only with --nofs) is absent.
pngquant extension output Original / libpng / usage-pngquant-ext-png Passed
pngquant --floyd 0.5 vs 1.0 dithering strength Original / libpng / usage-pngquant-floyd-half-strength-png Passed
Quantizes basn2c08.png at --floyd 0.5 and --floyd 1.0 and confirms both produce valid 32x32 indexed PNGs whose decoded byte streams differ from each other and from a --nofs (no dither) baseline, exercising fractional Floyd-Steinberg strength not covered by existing zero/default cases.
pngquant floyd dithering Original / libpng / usage-pngquant-floyd-png Passed
pngquant zero Floyd dithering Original / libpng / usage-pngquant-floyd-zero-png Passed
pngquant iebug workaround PNG Original / libpng / usage-pngquant-iebug-png Passed
pngquant map external palette PNG Original / libpng / usage-pngquant-map-palette-png Passed
pngquant nofs PNG generated Original / libpng / usage-pngquant-nofs-png-generated Passed
Quantizes a generated RGB PNG with pngquant nofs dithering disabled and verifies the resulting palette stays within eight unique colors.
pngquant no dithering Original / libpng / usage-pngquant-nofs-png Passed
pngquant --posterize 4 caps per-channel range Original / libpng / usage-pngquant-posterize-four-bits-png Passed
Posterizes basn2c08.png with --posterize 4 (4 bits per channel) and confirms the decoded output has at most 16 distinct values per RGB channel while still containing more than 1 value, exercising a posterization bit-depth not used by the existing 1/2/3 cases.
pngquant posterize one PNG Original / libpng / usage-pngquant-posterize-one-png Passed
pngquant posterize PNG Original / libpng / usage-pngquant-posterize-png Passed
pngquant --posterize 3 Original / libpng / usage-pngquant-posterize-three-png Passed
Posterizes basn2c08.png at --posterize 3 (3 bits per channel) and verifies the resulting PNG decodes at 32x32 and that every channel value is constrained to the 8-level posterization grid.
pngquant posterize two Original / libpng / usage-pngquant-posterize-two-png Passed
Quantizes a PNG fixture with a two-bit posterization setting in pngquant and verifies PNG output is produced.
pngquant --quality 50-100 with 32 colors Original / libpng / usage-pngquant-quality-50-100-thirtytwo-png Passed
Quantizes basn2c08.png with --quality=50-100 and a 32 color palette and verifies the output is a valid PNG that decodes at the original 32x32 dimensions with at most 32 unique colors.
pngquant high quality PNG Original / libpng / usage-pngquant-quality-high-png Passed
pngquant quality low PNG generated Original / libpng / usage-pngquant-quality-low-png-generated Passed
Quantizes a generated PNG with a low-quality window in pngquant and verifies the resulting RGB palette size remains bounded.
pngquant low quality range Original / libpng / usage-pngquant-quality-low-png Passed
Quantizes a PNG fixture with a low quality range in pngquant and verifies PNG output is produced.
pngquant --quality mid range on PNGSuite fixture Original / libpng / usage-pngquant-quality-mid-fixture-png Passed
Runs pngquant with a mid-range quality window (40-80) over the basn2c08 PNGSuite fixture and asserts the output is a 32x32 PNG with at most 16 colours.
pngquant mid quality PNG Original / libpng / usage-pngquant-quality-mid-png Passed
pngquant --quality min lower bound PNG Original / libpng / usage-pngquant-quality-min-low-bound-png Passed
Runs pngquant with a low minimum quality (--quality=10-100) on basn2c08.png and verifies a valid PNG is produced with the same dimensions; also covers the low-bound discard semantics by accepting exit code 99 if pngquant declines the low quality result.
pngquant single-value quality cap PNG Original / libpng / usage-pngquant-quality-min-only-png Passed
pngquant quality png Original / libpng / usage-pngquant-quality-png Passed
pngquant quality range Original / libpng / usage-pngquant-quality-range-png Passed
pngquant --quality=70-90 with low palette Original / libpng / usage-pngquant-quality-seventy-ninety-png Passed
Combines a low palette target (48 colours) with a 70-90 quality range and verifies the output PNG stays within the palette cap and meets the quality minimum.
pngquant --quality 0 minimum-only floor Original / libpng / usage-pngquant-quality-zero-only-png Passed
Quantizes basn2c08.png with --quality 0 (minimum-only floor of 0 with implicit max 100) and confirms pngquant emits a valid indexed PNG that still decodes at 32x32 -- this exercises the rarely-tested zero-floor branch of the min-max parser separate from the existing min-low-bound case.
pngquant processes multiple input PNGs in one invocation Original / libpng / usage-pngquant-r10-multiple-files Passed
Runs pngquant against two distinct synthetic PNGs in a single command and verifies both default -fs8.png outputs are emitted as valid PNG files.
pngquant --ordered selects the deterministic dither mode Original / libpng / usage-pngquant-r10-ordered-dither Passed
Quantizes a synthetic PNG with --ordered (the alternative to Floyd-Steinberg) and verifies the optimized PNG is produced and remains structurally valid.
pngquant --quality=45-55 narrow mid band yields a valid PNG Original / libpng / usage-pngquant-r10-quality-mid-band Passed
Quantizes a synthetic PNG with the unusual narrow mid-quality band 45-55 and verifies the optimized output is still a well-formed PNG file.
pngquant --quiet still emits the optimized PNG Original / libpng / usage-pngquant-r10-quiet-flag Passed
Quantizes a synthetic PNG with --quiet to confirm the option suppresses status chatter while still producing a valid PNG file at the requested output path.
pngquant --version reports a 2.x build Original / libpng / usage-pngquant-r10-version-flag Passed
Invokes pngquant --version and verifies the banner advertises a 2.x release with parenthesised release date.
pngquant --ext .png --force converts in place Original / libpng / usage-pngquant-r11-ext-dot-q-suffix Passed
Uses the documented "--ext .png --force" combination to overwrite the input file with its quantised version, verifying the file remains a valid PNG and now decodes as a paletted colormap (proving the in-place conversion happened, not just a no-op).
pngquant -h short flag prints the options banner Original / libpng / usage-pngquant-r11-h-short-help Passed
Runs pngquant with the short -h flag and confirms the printed banner contains both the "usage:" line and an "options:" section header, distinguishing it from the bare invocation banner.
pngquant --nofs --posterize 2 combined produces 4-bit colormap PNG Original / libpng / usage-pngquant-r11-nofs-posterize-combined Passed
Combines --nofs (Floyd-Steinberg disabled) with --posterize 2 (truncate two least-significant bits per channel) at 16 colors and verifies the output is a valid PNG with a paletted color type, exercising the no-dither + posterize composition path.
pngquant --output - writes the quantised PNG to stdout Original / libpng / usage-pngquant-r11-output-dash-stdout Passed
Uses --output - with a single named input file (not stdin) to redirect the quantised PNG to stdout, distinguishing this output path from the existing stdin/stdout pair.
pngquant --quality=99-100 exits 99 on noisy input Original / libpng / usage-pngquant-r11-quality-99-100-exit-99 Passed
Quantises a 64x64 random-noise PNG with --quality=99-100 limited to 4 colors. The minimum quality cannot be met at that palette size, so pngquant must exit with status 99 and not write the output file.
pngquant --floyd=0.5 produces a different output than --nofs Original / libpng / usage-pngquant-r12-floyd-half-strength-distinct Passed
Quantises a synthetic gradient PNG twice — once with --floyd=0.5 (half-strength Floyd-Steinberg) and once with --nofs (no dithering) — at the same color count, and asserts the two output files have different byte contents while both being valid paletted PNGs of the same dimensions.
pngquant --skip-if-larger does not write output when result would grow Original / libpng / usage-pngquant-r12-skip-if-larger-keeps-original Passed
Quantises a tiny 4x4 PNG with --skip-if-larger at a larger color count than necessary; the quantised output cannot be smaller than the trivially-paletted source, so pngquant must skip writing the output file with a non-zero exit status while leaving any pre-existing target untouched.
pngquant --speed=1 differs from --speed=11 on the same input Original / libpng / usage-pngquant-r12-speed-default-vs-eleven-distinct Passed
Quantises the same noisy PNG with the slowest (--speed=1) and the fastest (--speed=11) quality settings at the same color count, and verifies the two output files are valid PNGs of identical dimensions but byte-distinct, confirming the speed knob influences the output bytes.
pngquant --strip removes a tEXt chunk that was present in the source Original / libpng / usage-pngquant-r12-strip-removes-text-chunk Passed
Builds a PNG with a tEXt "Author Alice" chunk via pnmtopng -text, then quantises with --strip and verifies the output PNG no longer contains the "Author\x00Alice" tEXt payload, locking in that --strip drops ancillary chunks.
pngquant -f short flag overwrites an existing target file Original / libpng / usage-pngquant-r13-short-f-force-overwrite Passed
Pre-creates a sentinel file at the chosen output path with a known SHA-256, then runs pngquant -f -o <path> against a synthetic input and verifies the target file's hash changed (proving -f acted as a synonym of --force) and the file is still a valid PNG.
pngquant -o short flag writes the quantised PNG to the supplied path Original / libpng / usage-pngquant-r13-short-o-output-flag Passed
Quantises a synthetic PNG using the documented short -o alias of --output and verifies the named target file exists, is recognised as a PNG, and matches the source dimensions, locking in the short-flag form of the output-path option as a working synonym of --output.
pngquant -Q short flag accepts a min-max quality range and writes a valid PNG Original / libpng / usage-pngquant-r13-short-q-quality-range Passed
Quantises a synthetic PNG with pngquant -Q 0-100 (the documented short alias of --quality with a min-max range covering the full bound) and verifies the resulting file is a valid paletted PNG of the original dimensions with at most the requested colour count, locking in the short -Q alias as functional on Ubuntu 24.04 — distinguishing it from the existing --quality long-form tests.
pngquant -s short flag accepts a speed value and produces a valid PNG Original / libpng / usage-pngquant-r13-short-s-speed-flag Passed
Quantises a synthetic PNG with pngquant -s 4 (the documented default speed/quality knob) and verifies the resulting output is a valid PNG of the original dimensions, locking in the short -s alias of --speed as functional on Ubuntu 24.04 — distinguishing it from the existing --speed long-form tests.
pngquant -V short flag prints the version banner Original / libpng / usage-pngquant-r13-short-v-version-flag Passed
Runs pngquant with the short -V flag and verifies the printed banner matches a "MAJOR.MINOR.PATCH (Month YYYY)" form on stdout, locking in that the short -V alias of --version returns a structured version string and exits successfully — distinguishing -V from the existing --version long-form test.
pngquant --floyd=0.5 long-form fractional strength produces a valid paletted PNG Original / libpng / usage-pngquant-r14-floyd-fractional-strength Passed
Quantises a synthetic 32x32 PNG with pngquant --floyd=0.5 (the documented long-form fractional dithering strength) and verifies the output is a valid 32x32 paletted PNG (color type 3) — locking in the long-form --floyd=N argument syntax with a fractional value as functional on Ubuntu 24.04.
pngquant --quiet suppresses progress messages on stderr while still writing a valid PNG Original / libpng / usage-pngquant-r14-quiet-suppresses-stderr Passed
Quantises a synthetic 24x24 PNG with pngquant --quiet (the documented opposite of --verbose) and verifies that no progress lines are written to stderr while the requested output PNG is still produced — locking in the quiet-mode contract that callers rely on for scripted pipelines.
pngquant -V short flag prints the version banner and exits successfully Original / libpng / usage-pngquant-r14-short-cap-version-flag Passed
Invokes pngquant -V (the documented short alias of --version) and verifies the program prints a recognisable version banner on stdout and exits 0 — locking in that the uppercase short version flag is functional on Ubuntu 24.04 pngquant 2.18.0, distinct from the lowercase -v which controls verbosity.
pngquant --transbug accepts the workaround flag and writes a valid paletted PNG Original / libpng / usage-pngquant-r14-transbug-flag-paletted Passed
Quantises a synthetic 24x24 PNG with pngquant --transbug (the documented workaround flag for readers that expect the fully-transparent palette entry to be last) and verifies the output is a valid 24x24 paletted PNG — locking in that the --transbug flag is a recognised option on Ubuntu 24.04 pngquant 2.18.0.
pngquant --posterize 1 produces a valid paletted PNG of the original dimensions Original / libpng / usage-pngquant-r15-posterize-1bit-paletted Passed
Quantises a synthetic 32x32 PNG with pngquant --posterize 1 (the documented option that lowers per-channel precision; "1" is the smallest precision that pngquant accepts) and verifies the output is a valid 32x32 paletted PNG (color type 3) — locking in the posterize entry-point with a small precision argument on Ubuntu 24.04 pngquant 2.18.0. Distinct from --nofs and --speed flags.
pngquant --quality=0-100 accepts an arbitrary-quality output (no min threshold) Original / libpng / usage-pngquant-r15-quality-zero-min-accepts-any Passed
Quantises a synthetic 24x24 PNG with pngquant --quality=0-100 (a full-range quality window where the lower bound of 0 means "accept any quantisation result") and verifies a valid 24x24 paletted PNG is produced — locking in that 0 is a legal lower bound on Ubuntu 24.04 pngquant 2.18.0 and that the program does not skip output when the lower bound is 0. Distinct from the existing --quality 99-100 high-bound test.
pngquant --ext=.tinyq.png emits the explicit ext suffix Original / libpng / usage-pngquant-r16-ext-tinyq-suffix Passed
Quantises an input PNG with pngquant --ext=.tinyq.png --force and asserts the output file "in.tinyq.png" exists, pinning the documented --ext suffix override — distinct from existing fs8/or8/dot-q ext coverage.
pngquant --speed=1 and --speed=10 both produce valid paletted PNG output Original / libpng / usage-pngquant-r16-speed-extremes-both-succeed Passed
Quantises one synthetic 16x16 PNG twice with pngquant --speed=1 (slowest, best) and --speed=10 (fastest), and asserts both outputs are valid 16x16 paletted PNGs — pinning the speed-extremes encoder paths together, distinct from prior single-speed checks.
pngquant --skip-if-larger exits non-zero on an already-tiny input Original / libpng / usage-pngquant-r17-skip-if-larger-tiny-paletted-exits-nonzero Passed
Quantises an 8x8 noisy PNG with --skip-if-larger at 256 colours; since the source is too small to shrink further, pngquant must skip writing and exit non-zero (98 historically).
pngquant --strip removes an ancillary tEXt chunk from the output PNG Original / libpng / usage-pngquant-r17-strip-removes-ancillary-text-chunk Passed
Builds a 32x32 gradient PNG with a tEXt chunk via pnmtopng -text, runs pngquant --strip, and asserts the output PNG no longer contains the tEXt chunk type, pinning the metadata-strip behavior on Ubuntu 24.04 pngquant 2.18.
pngquant --transbug on an RGBA gradient PNG produces a paletted PNG Original / libpng / usage-pngquant-r17-transbug-rgba-input-produces-paletted Passed
Generates a 32x32 PAM with alpha, encodes to PNG via pamtopng, runs pngquant --transbug, and asserts the output PNG has color type 3 (paletted), exercising the --transbug code path on RGBA input.
pngquant --ext custom suffix writes a sibling PNG with the requested name Original / libpng / usage-pngquant-r18-ext-suffix-writes-named-output Passed
Runs pngquant --ext '-r18.png' against an input named in.png and asserts a sibling in-r18.png is produced, pinning the custom-extension naming behavior end-to-end through the libpng encoder.
pngquant --nofs (no Floyd-Steinberg) still emits a paletted PNG Original / libpng / usage-pngquant-r18-nofs-disables-dither-paletted Passed
Quantises a 24x24 RGB PNG with pngquant --nofs at 32 colors and asserts the output is a color-type-3 paletted PNG, pinning that disabling dithering does not change the libpng-emitted output color type.
pngquant --posterize 2 produces a paletted PNG output Original / libpng / usage-pngquant-r18-posterize-2-paletted-output Passed
Quantises a 20x20 RGB PNG with pngquant --posterize 2 at 16 colors and asserts the output PNG color type byte is 3 (paletted), exercising the posterize-bits reduction path through the libpng-backed encoder.
pngquant --speed 1 produces a color-type-3 paletted PNG output Original / libpng / usage-pngquant-r18-speed-1-produces-paletted Passed
Generates a 24x24 RGB PNG, runs pngquant --speed 1 at 64 colors, and asserts the output PNG color type byte is 3 (paletted) — pinning the highest-quality speed setting through the libpng-backed encoder.
pngquant --speed 11 produces a paletted PNG on a small RGB input Original / libpng / usage-pngquant-r18-speed-11-fast-rough-paletted Passed
Quantises a 16x16 RGB PNG with pngquant --speed 11 (fast & rough) at 32 colors and asserts the output is a color-type-3 paletted PNG, pinning the fastest setting's libpng-mediated output mode.
pngquant with a 5-color target produces a paletted PNG Original / libpng / usage-pngquant-r19-colors-five-paletted-output Passed
Quantises a synthetic gradient PNG to 5 colors via pngquant and asserts the output is a color-type-3 paletted PNG, pinning the odd, non-power-of-two palette-size path through the libpng encoder.
pngquant --floyd=0.25 yields a paletted PNG output Original / libpng / usage-pngquant-r19-floyd-strength-quarter-paletted Passed
Quantises a 20x20 RGB PNG with pngquant --floyd=0.25 at 32 colors and asserts the output PNG color type byte is 3 (paletted), pinning that a fractional Floyd-Steinberg strength still produces an indexed image.
pngquant refuses to overwrite an existing output file without --force Original / libpng / usage-pngquant-r19-output-equals-input-without-force-fails Passed
Quantises a PNG once to a known output path, then re-runs pngquant targeting the same output without --force and asserts pngquant exits non-zero, pinning the safety check that prevents accidental overwrite.
pngquant reads PNG bytes from stdin and emits a paletted PNG on stdout Original / libpng / usage-pngquant-r19-stdin-stdout-pipe-paletted Passed
Pipes a generated PNG into pngquant - - 64 and reads the resulting PNG from stdout, asserting the IHDR color type byte is 3 (paletted), pinning the stdin/stdout streaming path through the libpng encoder.
pngquant 32 emits a PNG with an explicit PLTE chunk in the byte stream Original / libpng / usage-pngquant-r20-32-colors-plte-chunk-present Passed
Generates a PNG, runs pngquant 32 --output <path> <input>, and asserts the resulting paletted PNG byte stream contains the literal four-byte chunk type "PLTE", pinning libpng's palette chunk emission via pngquant's 32-color quantization path.
pngquant --output explicit-path writes the paletted PNG to that named file Original / libpng / usage-pngquant-r20-output-flag-writes-named-file Passed
Generates a PNG, runs pngquant --output <explicit-path> 32 <input>, and asserts the explicit-path file exists with PNG magic and IHDR color type 3 (paletted), while no -fs8.png sibling is created next to the input, pinning the --output flag's destination behavior.
pngquant --verbose emits a non-empty stderr summary while still writing a paletted PNG Original / libpng / usage-pngquant-r20-verbose-stderr-non-empty Passed
Generates a PNG, runs pngquant --verbose --output <path> 32 <input> capturing stderr, asserts the stderr capture is non-empty (the verbose-mode status summary), and asserts the produced output PNG has IHDR color type 3 (paletted), pinning the verbose flag's diagnostic-emission contract.
pngquant --help banner reports libpng as the linked decode library Original / libpng / usage-pngquant-r20-version-mentions-libpng Passed
Runs pngquant --help and asserts the first lines of output contain the literal substring "libpng", pinning that the pngquant CLI advertises libpng as its linked PNG codec dependency on Ubuntu 24.04.
pngquant --help banner reports the libpng version it was compiled against Original / libpng / usage-pngquant-r21-help-mentions-libpng-build Passed
Runs pngquant --help and asserts the first banner line mentions "libpng" alongside a numeric version, pinning the libpng build-time dependency advertised in the pngquant CLI banner.
pngquant 16 produces an output PNG strictly smaller than a 128x128 truecolor input Original / libpng / usage-pngquant-r21-output-smaller-than-input Passed
Encodes a 128x128 truecolor PNG (no palette) then runs pngquant 16 and asserts the resulting paletted PNG byte size is strictly less than the original, pinning libpng's palette-based size reduction through pngquant's 16-color quantization.
pngquant 64 emits a PNG with IHDR color type 3 (palette) Original / libpng / usage-pngquant-r21-paletted-output-color-type-three Passed
Generates a small RGB PNG, runs pngquant 64, and asserts the resulting paletted PNG's IHDR color type byte is exactly 3 (PNG palette mode), pinning libpng's palette color-type emission via pngquant's 64-color quantization.
pngquant --quality 30-70 produces a paletted PNG with a PLTE chunk Original / libpng / usage-pngquant-r21-quality-band-30-70-paletted-output Passed
Encodes a 24x16 truecolor PNG then runs pngquant --quality 30-70, asserting the resulting output contains a PLTE chunk (libpng palette emission) and decodes back to an 8-bit IHDR via the gAMA-free standard pipeline.
pngquant --skip-if-larger on a 2x2 paletted input exits nonzero (skipped) Original / libpng / usage-pngquant-r21-skip-if-larger-keeps-bigger-original Passed
Generates a tiny 2x2 paletted PNG (already small) and runs pngquant 256 --skip-if-larger; asserts the command exits with a nonzero status indicating pngquant skipped writing the new file because it would not be smaller, pinning libpng's size-comparison gating in pngquant.
pngquant --ext custom suffix output naming Original / libpng / usage-pngquant-r9-ext-suffix-output Passed
Runs pngquant with a custom --ext suffix and verifies the resulting file is created at the suffixed path while the input remains.
pngquant rejects non-PNG input Original / libpng / usage-pngquant-r9-non-png-input-fails Passed
Feeds a small text file to pngquant and verifies the binary exits non-zero, treating non-PNG input as an error.
pngquant quality 0-100 emits valid PNG Original / libpng / usage-pngquant-r9-quality-bounds-zero Passed
Quantizes a synthetic PNG at the maximally permissive quality range 0-100 and verifies the output is a valid PNG file.
pngquant --skip-if-larger on a compressible 4x4 PNG Original / libpng / usage-pngquant-skip-if-larger-noop-png Passed
Builds a 4x4 high-entropy PNG that pngquant is unlikely to shrink and runs --skip-if-larger; either the quantised output is a smaller PNG (rc=0) or pngquant declines via rc=98/99 without writing the file.
pngquant skip-if-larger Original / libpng / usage-pngquant-skip-if-larger-png Passed
pngquant skip-if-larger triggers exit 98 Original / libpng / usage-pngquant-skip-if-larger-trigger-png Passed
Quantises an already-tiny 1x1 PNG with --skip-if-larger and accepts pngquant's larger-output exit status (98) without writing a file.
pngquant --skip-if-larger on small uncompressible PNG Original / libpng / usage-pngquant-skip-if-larger-uncompressible-png Passed
Runs pngquant --skip-if-larger against a small near-uncompressible 2x2 random-pixel PNG and accepts either a successful smaller result (rc=0) or pngquant's larger-output discard exit (rc=98 / rc=99) without writing a file.
pngquant --speed 8 PNG Original / libpng / usage-pngquant-speed-eight-png Passed
Runs pngquant with --speed 8 on basn2c08.png and verifies a valid PNG output preserving dimensions, sanity-checking the fast quantisation path.
pngquant speed eleven Original / libpng / usage-pngquant-speed-eleven-png Passed
Quantizes a PNG fixture at the fastest pngquant speed setting and verifies PNG output is produced.
pngquant speed extremes produce valid PNGs Original / libpng / usage-pngquant-speed-extremes-png Passed
Runs pngquant at --speed 1 and --speed 11 against the same input and checks both outputs are valid PNG files with non-zero size.
pngquant speed five PNG Original / libpng / usage-pngquant-speed-five-png Passed
pngquant --speed 4 PNG Original / libpng / usage-pngquant-speed-four-png Passed
Runs pngquant with the mid-default --speed 4 on a synthetic 4x4 RGB PPM and asserts the result is a 4x4 PNG bounded to 8 colours.
pngquant --speed 9 mid-fast preset Original / libpng / usage-pngquant-speed-nine-png Passed
Quantizes basn2c08.png with pngquant --speed 9 (uncovered intermediate level between the existing speed 8 and speed 10 cases), confirms the output decodes at 32x32, and verifies the result PNG has color type 3 (indexed) with no more than 256 PLTE entries.
pngquant speed one PNG generated Original / libpng / usage-pngquant-speed-one-png-generated Passed
Quantizes a generated PNG with pngquant speed one and verifies the resulting RGB palette size does not exceed eight colors.
pngquant speed one Original / libpng / usage-pngquant-speed-one-png Passed
pngquant speed png Original / libpng / usage-pngquant-speed-png Passed
pngquant --speed 6 mid setting Original / libpng / usage-pngquant-speed-six-png Passed
Quantises the basn2c08 PNG fixture using the mid speed setting (6) and confirms output dimensions and palette cap.
pngquant --speed 10 Original / libpng / usage-pngquant-speed-ten-png Passed
Quantizes a synthesised gradient PNG with --speed 10 (near the fastest setting) to 8 colors and verifies the output is a valid PNG with at most 8 unique colors.
pngquant speed three PNG Original / libpng / usage-pngquant-speed-three-png Passed
pngquant --speed 2 Original / libpng / usage-pngquant-speed-two-png Passed
Quantizes basn2c08.png with --speed 2 (slow, high quality side of the trade-off) to 16 colors and verifies the result is a valid 32x32 PNG with at most 16 unique colors.
pngquant reads PNG from stdin Original / libpng / usage-pngquant-stdin-input-png Passed
Streams the basn2c08 fixture into pngquant via the `-` input argument and writes the quantised PNG to a file with --output.
pngquant writes PNG to stdout Original / libpng / usage-pngquant-stdout-png Passed
Runs pngquant with --output - so the optimized PNG is emitted on stdout, then validates the captured bytes.
pngquant --strip removes ancillary metadata Original / libpng / usage-pngquant-strip-metadata-verify-png Passed
Adds a tEXt chunk with a known marker to basn2c08.png via pnmtopng -text, runs pngquant --strip, and verifies the resulting PNG no longer contains the tEXt marker while remaining a valid PNG.
pngquant strip png Original / libpng / usage-pngquant-strip-png Passed
pngquant --strip removes tEXt chunk Original / libpng / usage-pngquant-strip-text-chunk-verify-png Passed
Re-encodes basn2c08.png with an injected tEXt chunk via pnmtopng -text, runs pngquant --strip, and uses Python to walk the PNG chunk structure of the output and confirm no tEXt/zTXt/iTXt chunks remain while IHDR and IDAT do.
pngquant strip removes ancillary chunks Original / libpng / usage-pngquant-strip-verify-png Passed
Runs pngquant with --strip and verifies that auxiliary text/time chunks are absent compared to a non-stripped run.
pngquant on a 1x1 PNG edge case Original / libpng / usage-pngquant-tiny-1x1-png Passed
Generates a minimal 1x1 RGB PNG via netpbm and confirms pngquant produces a 1x1 single-colour PNG output.
pngquant transbug workaround PNG Original / libpng / usage-pngquant-transbug-png Passed
pngquant verbose output Original / libpng / usage-pngquant-verbose-png Passed
pngquant --verbose stderr capture Original / libpng / usage-pngquant-verbose-stderr-png Passed
Runs pngquant with --verbose on the basn2c08 PNGSuite fixture, captures stderr separately from stdout, and confirms verbose progress is on stderr while a valid PNG is still written.
CVE-2004-0598 libpng regression Original / libpng / cve-2004-0598 Passed
Asserts that libpng rejects a malformed iCCP chunk whose payload is shorter than the documented profile-name+method+stream layout without dereferencing a NULL profile pointer.
CVE-2004-0599 libpng regression Original / libpng / cve-2004-0599 Passed
Asserts that libpng rejects an IHDR with extreme width and height values that historically caused unchecked size arithmetic to overflow during row-buffer setup.
CVE-2007-2445 libpng regression Original / libpng / cve-2007-2445 Passed
Asserts that libpng rejects a tRNS chunk whose CRC is corrupt without leaving partially-applied num_trans state in the decoder.
CVE-2010-0205 libpng regression Original / libpng / cve-2010-0205 Passed
Asserts that libpng caps decompressed size of an oversized iCCP chunk and surfaces a documented error in bounded time instead of inflating attacker-controlled compressed metadata without limit.
CVE-2011-3328 libpng regression Original / libpng / cve-2011-3328 Passed
Asserts that libpng rejects a cHRM chunk whose chromaticity coordinates would drive rgb_to_gray arithmetic to a divide-by-zero condition without crashing the decoder.
CVE-2013-6954 libpng regression Original / libpng / cve-2013-6954 Passed
Asserts that libpng rejects a palette-image PNG with no PLTE chunk without dereferencing the missing palette pointer during read.
CVE-2014-0333 libpng regression Original / libpng / cve-2014-0333 Passed
Asserts that libpng's progressive reader makes forward progress and rejects in bounded time a PNG whose IDAT chunk is zero length, instead of looping in the historical PNG_READ_CHUNK_MODE state.
CVE-2017-12652 libpng regression Original / libpng / cve-2017-12652 Passed
Asserts that libpng rejects a chunk whose declared length exceeds the documented maximum without crashing or running unbounded length-validation work.
CVE-2018-13785 libpng regression Original / libpng / cve-2018-13785 Passed
Asserts that libpng's chunk-length validator computes row_factor from extreme image dimensions without overflowing into a divide-by-zero path inside png_check_chunk_length.
PNG chunk metadata inspection Port / libpng / chunk-metadata-inspection Passed
Malformed PNG rejection Port / libpng / malformed-png-rejection Passed
Palette PNG fixture handling Port / libpng / palette-fixture-handling Passed
pngfix fixture handling Port / libpng / pngfix-fixture-handling Passed
libpng read write C API smoke Port / libpng / read-write-c-api-smoke Passed
netpbm pamdeinterlace height Port / libpng / usage-netpbm-batch11-pamdeinterlace-height Passed
netpbm pamdice tiles Port / libpng / usage-netpbm-batch11-pamdice-tiles Passed
netpbm pamstretch double Port / libpng / usage-netpbm-batch11-pamstretch-double Passed
netpbm pamthreshold black white Port / libpng / usage-netpbm-batch11-pamthreshold-bw Passed
netpbm pngtopam pamfile Port / libpng / usage-netpbm-batch11-pngtopam-pamfile Passed
netpbm pnmarith add Port / libpng / usage-netpbm-batch11-pnmarith-add Passed
netpbm pnmgamma shape Port / libpng / usage-netpbm-batch11-pnmgamma-shape Passed
netpbm pnmnorm shape Port / libpng / usage-netpbm-batch11-pnmnorm-shape Passed
netpbm pnmrotate right angle Port / libpng / usage-netpbm-batch11-pnmrotate-right-angle Passed
netpbm pnmshear width Port / libpng / usage-netpbm-batch11-pnmshear-width Passed
netpbm pamarith add PNG inputs Port / libpng / usage-netpbm-pamarith-add-png Passed
netpbm pamarith mean PNG inputs Port / libpng / usage-netpbm-pamarith-mean-png Passed
netpbm pamarith multiply PNG inputs Port / libpng / usage-netpbm-pamarith-multiply-png Passed
Multiplies two PNG-derived PGM images with pamarith -multiply and validates the per-pixel result against the expected normalized product.
netpbm pamcat -lr on PNG-derived inputs Port / libpng / usage-netpbm-pamcat-lr-png-fixture Passed
Decodes the basn2c08 fixture twice into PAM, concatenates them left-to-right with pamcat -lr, re-encodes to PNG, and asserts the result is a 64x32 PNG.
netpbm pamcat -tb on PNG-derived inputs Port / libpng / usage-netpbm-pamcat-tb-png-fixture Passed
Decodes the basn2c08 fixture twice into PAM, concatenates them top-to-bottom with pamcat -tb, re-encodes to PNG, and asserts the result is a 32x64 PNG that round-trips through libpng.
netpbm generated PNG blue channel Port / libpng / usage-netpbm-pamchannel-blue-generated-png Passed
netpbm blue channel PNG Port / libpng / usage-netpbm-pamchannel-blue-png Passed
netpbm pamchannel green PNG generated Port / libpng / usage-netpbm-pamchannel-green-png-generated Passed
Extracts the green channel from a generated RGB PNG with pamchannel and verifies the resulting grayscale values.
netpbm green channel PNG Port / libpng / usage-netpbm-pamchannel-green-png Passed
Extracts the green channel from a PNG fixture with PAM tools and verifies the single-channel output metadata.
netpbm generated PNG red channel Port / libpng / usage-netpbm-pamchannel-red-generated-png Passed
netpbm pamchannel red PNG generated Port / libpng / usage-netpbm-pamchannel-red-png-generated Passed
Extracts the red channel from a generated RGB PNG with netpbm and verifies the grayscale channel values.
netpbm red channel PNG Port / libpng / usage-netpbm-pamchannel-red-png Passed
netpbm pamcomp -align center on PNG fixture Port / libpng / usage-netpbm-pamcomp-align-center-png Passed
Crops a 16x16 patch out of basn2c08.png and composites it back onto the original via pamcomp -align center -valign middle, then re-encodes the result to PNG and verifies the geometry matches the underlying image.
netpbm pamcut crops PNG-derived PAM to exact dims Port / libpng / usage-netpbm-pamcut-specific-dims-png Passed
Decodes basn2c08.png to PAM, crops a 12x9 region anchored at offset (5,7) with pamcut, and verifies the result has exactly those dimensions and that a sample pixel matches the original at the corresponding source coordinate.
netpbm pamdepth 65535 + pamtopng yields 16-bit PNG Port / libpng / usage-netpbm-pamdepth-16bit-pamtopng-png Passed
Decodes basn2c08.png to a maxval-255 PPM, promotes it to maxval 65535 via pamdepth, encodes through pamtopng, and confirms the resulting PNG IHDR reports bit depth 16 (rather than 8) -- exercising libpng's 16-bit RGB write path through the netpbm toolchain.
netpbm pamenlarge by 4 on PNG-derived PGM Port / libpng / usage-netpbm-pamenlarge-by-four-png Passed
Decodes a synthesised 2x2 PNG to PGM, enlarges it 4x with pamenlarge, and verifies the output is exactly 8x8 with each source pixel replicated into the expected 4x4 block.
netpbm pamfile PNG Port / libpng / usage-netpbm-pamfile-png Passed
netpbm pamflip ccw grayscale PNG Port / libpng / usage-netpbm-pamflip-ccw-grayscale-png Passed
Rotates a generated grayscale PNG counter-clockwise with pamflip and verifies the rotated pixel order.
netpbm pamflip cw PNG generated Port / libpng / usage-netpbm-pamflip-cw-png-generated Passed
netpbm pamflip leftright on PNG-derived image Port / libpng / usage-netpbm-pamflip-lr-png Passed
Round-trips a small image through PNG, flips it left-right with pamflip, and checks horizontal mirroring of pixel values.
netpbm rotate PNG Port / libpng / usage-netpbm-pamflip-png Passed
netpbm pamflip topbottom on PNG-derived image Port / libpng / usage-netpbm-pamflip-tb-png Passed
Round-trips a small image through PNG, flips it top-bottom with pamflip, and checks vertical row reversal.
netpbm pamflip -transpose on PNG-derived PGM Port / libpng / usage-netpbm-pamflip-transpose-png Passed
Decodes a synthesised 3x2 PNG, applies pamflip -transpose, and verifies the resulting 2x3 PGM payload equals the matrix transpose of the original pixel grid.
netpbm pamfunc -multiplier 0.5 on PNG fixture Port / libpng / usage-netpbm-pamfunc-multiplier-half-png Passed
Converts basn2c08.png to PAM, applies pamfunc -multiplier 0.5, re-encodes to PNG, and verifies every output sample is at most half (rounded) the corresponding input sample.
netpbm pamlevels brightening factor Port / libpng / usage-netpbm-pamlevels-brighten-png Passed
Maps midtone grey (0x40) to bright (0x80) via pamlevels on a PNG-derived ppm and verifies the brightened pixel value.
netpbm pammixinterlace blends rows of PNG-derived PGM Port / libpng / usage-netpbm-pammixinterlace-png Passed
Decodes a synthesised 2x4 PNG to a PGM, runs pammixinterlace -filter=linear, and verifies the output dimensions are preserved and that interior rows are a (1/4, 1/2, 1/4) blend of their neighbors per the linear filter.
netpbm pampaintspill spreads paint sources on PNG-derived input Port / libpng / usage-netpbm-pampaintspill-png Passed
Builds a sparse PPM with two off-corner red and blue pixels on a black background, encodes through PNG and back, runs pampaintspill --bgcolor=black, and verifies the result is a 4x4 PPM where every pixel has at least some red or blue contribution (the background has been painted over).
netpbm pampick selects image from multi-image stream Port / libpng / usage-netpbm-pampick-image-png Passed
Concatenates two PNG-derived PAM images into a multi-image stream and uses pampick to extract the second image, verifying its content.
netpbm pamscale 0.5 halves PNG-derived dimensions Port / libpng / usage-netpbm-pamscale-half-roundtrip-png Passed
Decodes basn2c08.png to PPM, scales it by 0.5 with pamscale, re-encodes via pnmtopng, and confirms the resulting PNG is exactly 16x16 (half of the source 32x32) and parses as a valid PNG with the expected IHDR width/height.
netpbm pamsharpmap on PNG fixture Port / libpng / usage-netpbm-pamsharpmap-png Passed
Decodes basn2c08.png to PAM, runs pamsharpmap to apply local-contrast sharpening, and verifies the output preserves dimensions and channel depth and survives a pnmtopng round-trip.
netpbm pamslice column from PNG fixture Port / libpng / usage-netpbm-pamslice-column-png Passed
Converts the basn2c08 fixture to PAM via pngtopam and uses pamslice -column 0 to extract the first column of pixel values; asserts pamslice produced 32 rows of tabular output.
netpbm pamstack combines RGB + alpha bands into RGBA PNG Port / libpng / usage-netpbm-pamstack-combine-bands-png Passed
Builds three single-band PGM planes derived from a PNG round-trip plus a synthesised alpha band, stacks them with pamstack into an RGB_ALPHA PAM, encodes the result with pamtopng, and verifies pngtopam -alpha extracts the original alpha mask byte-for-byte.
netpbm pamthreshold -threshold=0.5 on PNG-derived PGM Port / libpng / usage-netpbm-pamthreshold-threshold-half-png Passed
Decodes a 4x1 PNG-derived grayscale ramp and runs pamthreshold -threshold=0.5, verifying that values strictly below 0.5 (mid-gray) become black and values at or above become white in a BLACKANDWHITE PAM.
netpbm pamtopng -background emits bKGD chunk Port / libpng / usage-netpbm-pamtopng-background-chunk-png Passed
Re-encodes basn2c08.png with pamtopng -background=red, walks the resulting PNG chunk stream to confirm a 6-byte bKGD chunk is present (RGB color type stores three big-endian uint16 components), and confirms the encoded background's red channel is non-zero while green and blue are zero. pamtopng emits the channel values at the source bit-depth scale (here 8-bit, i.e. R=255), not the spec's nominal 16-bit max, so we just check for an unmistakably-red triple.
netpbm pamtopng -gamma emits gAMA chunk Port / libpng / usage-netpbm-pamtopng-gamma-chunk-png Passed
Re-encodes basn2c08.png with pamtopng -gamma=0.45 and confirms the resulting PNG carries a 4-byte gAMA chunk whose big-endian value is 45000 (gamma * 100000), distinguishing the gAMA-bearing output from a default pamtopng encoding which omits gAMA.
netpbm pamtopng -itxt injects iTXt chunk Port / libpng / usage-netpbm-pamtopng-itxt-chunk-png Passed
Encodes basn2c08.png with pamtopng -itxt pointing at an international-text descriptor file, walks the output PNG chunk stream to confirm at least one iTXt chunk is present alongside structural IHDR/IDAT, and confirms the marker payload survives unmodified in the raw bytes.
pamtopng RGB_ALPHA PAM color type 6 Port / libpng / usage-netpbm-pamtopng-r9-rgb-alpha-png Passed
Builds an RGB_ALPHA 4-channel PAM and converts via pamtopng, verifying the output PNG IHDR carries color type 6 (truecolor with alpha).
pamtopng RGB 8-bit PAM Port / libpng / usage-netpbm-pamtopng-r9-rgb8-png Passed
Builds an RGB 8-bit PAM and converts it via pamtopng, verifying the output IHDR reports color type 2 (truecolor) and bit depth 8.
netpbm pamtopng -srgbintent emits sRGB chunk Port / libpng / usage-netpbm-pamtopng-srgbintent-png Passed
Decodes basn2c08.png to PPM, re-encodes with pamtopng -srgbintent=perceptual, and parses the resulting PNG to confirm an sRGB chunk is present with a 1-byte payload equal to 0 (perceptual rendering intent).
netpbm pamtopng -text injects tEXt chunks Port / libpng / usage-netpbm-pamtopng-text-chunk-png Passed
Builds a pamtopng text-keywords file with two entries, encodes basn2c08.png using pamtopng -text, walks the output to confirm at least two tEXt chunks were emitted, and greps the raw PNG bytes to confirm the keyword payload marker is preserved verbatim.
netpbm pamtopng -transparent emits tRNS chunk Port / libpng / usage-netpbm-pamtopng-transparent-trns-png Passed
Synthesises a 4x4 PPM containing known cyan pixels, encodes via pamtopng -transparent=rgb:00/ff/ff, walks the resulting PNG to confirm a 6-byte tRNS chunk is present (RGB color type stores three uint16 components naming the transparent color), and confirms the chunk's encoded color matches cyan (R=0, G=255, B=255 at 8-bit scale, packed into the uint16 fields).
netpbm PAM to PNM round trip Port / libpng / usage-netpbm-pamtopnm-roundtrip-png Passed
netpbm pamundice rebuilds diced PNG Port / libpng / usage-netpbm-pamundice-png Passed
Slices a PNG-derived image into tiles with pamdice and reassembles it with pamundice, verifying byte-exact recovery.
netpbm pbmtoxbm bilevel via threshold Port / libpng / usage-netpbm-pbmtoxbm-bilevel-png Passed
Thresholds a PNG-derived grayscale image to bilevel PBM and converts it to an X bitmap, verifying the XBM C header.
netpbm pgmnoise seeded determinism into PNG Port / libpng / usage-netpbm-pgmnoise-seeded-png Passed
Generates a deterministic noise PGM with pgmnoise -randomseed twice, encodes one to PNG, decodes it back and verifies the round-tripped bytes match the second seeded run.
netpbm pngtopam -alpha extracts the alpha plane only Port / libpng / usage-netpbm-pngtopam-alpha-only-png Passed
Synthesises an RGBA PNG by pamstack-ing RGB and alpha planes and pamtopng-encoding the result, then runs pngtopam -alpha on it and verifies the extracted alpha PGM matches the original alpha plane byte-for-byte.
netpbm pngtopam Port / libpng / usage-netpbm-pngtopam Passed
pngtopnm decodes solid blue PNG Port / libpng / usage-netpbm-pngtopnm-r9-color-decode Passed
Encodes a solid blue 4x4 RGB PNG via pnmtopng then decodes it back with pngtopnm and verifies the resulting PPM payload contains the expected (0,0,255) pixel triplets.
netpbm pngtopnm Port / libpng / usage-netpbm-pngtopnm Passed
netpbm pnmcat leftright PNG generated Port / libpng / usage-netpbm-pnmcat-leftright-png-generated Passed
Concatenates two generated grayscale PNGs side-by-side with pnmcat and verifies the combined pixel row.
netpbm pnmcat left-right PNG Port / libpng / usage-netpbm-pnmcat-leftright-png Passed
netpbm pnmcat -lr concatenates multiple PNG-derived PGMs Port / libpng / usage-netpbm-pnmcat-lr-multi-png Passed
Decodes three single-pixel PGMs (re-encoded through PNG via pnmtopng/pngtopnm) and concatenates them with pnmcat -lr; verifies the result is a 3x1 grayscale image with the expected pixel triple.
netpbm pnmcat topbottom PNG generated Port / libpng / usage-netpbm-pnmcat-topbottom-png-generated Passed
Stacks two generated grayscale PNGs vertically with pnmcat and verifies the combined pixel column.
netpbm pnmcat top-bottom PNG Port / libpng / usage-netpbm-pnmcat-topbottom-png Passed
netpbm crop generated PNG border Port / libpng / usage-netpbm-pnmcrop-border-png Passed
Converts a generated PNG through Netpbm and verifies pnmcrop removes a zero border down to the populated center pixels.
netpbm bottom row PNG cut Port / libpng / usage-netpbm-pnmcut-bottom-row-png Passed
netpbm corner cut PNG Port / libpng / usage-netpbm-pnmcut-corner-png Passed
Cuts a corner region from a PNG fixture through PNM tools and verifies the reconstructed PNG output.
netpbm pnmcut middle column PNG Port / libpng / usage-netpbm-pnmcut-middle-column-png Passed
netpbm pnmcut middle row PNG Port / libpng / usage-netpbm-pnmcut-middle-row-png Passed
netpbm crops PNG Port / libpng / usage-netpbm-pnmcut-png Passed
netpbm pnmdepth 15 PNG generated Port / libpng / usage-netpbm-pnmdepth-15-png-generated Passed
netpbm pnmdepth 63 PNG generated Port / libpng / usage-netpbm-pnmdepth-63-png-generated Passed
Reduces a generated grayscale PNG depth to 63 with pnmdepth and verifies the resulting maxval header.
netpbm depth PNG Port / libpng / usage-netpbm-pnmdepth-png Passed
netpbm pnmenlarge integer factor Port / libpng / usage-netpbm-pnmenlarge-png Passed
Enlarges a PNG-derived 2x2 image by an integer factor of 3 with pnmenlarge and verifies the replicated 6x6 pixel pattern.
netpbm pnmfile PNG Port / libpng / usage-netpbm-pnmfile-png Passed
netpbm pnmfile round trip PNG Port / libpng / usage-netpbm-pnmfile-roundtrip-png Passed
Round-trips a PNG fixture through PNM conversion tools and verifies pnmfile reports valid image dimensions afterward.
netpbm left right generated PNG flip Port / libpng / usage-netpbm-pnmflip-leftright-generated-png Passed
netpbm pnmflip leftright PNG generated Port / libpng / usage-netpbm-pnmflip-leftright-png-generated Passed
Flips a generated grayscale PNG left-to-right with netpbm and verifies the pixel order in the output image.
netpbm flips PNG Port / libpng / usage-netpbm-pnmflip-png Passed
netpbm pnmflip r180 PNG Port / libpng / usage-netpbm-pnmflip-r180-png Passed
netpbm pnmflip rotate180 RGB PNG Port / libpng / usage-netpbm-pnmflip-rotate180-rgb-png Passed
netpbm pnmflip topbottom PNG generated Port / libpng / usage-netpbm-pnmflip-topbottom-png-generated Passed
Flips a generated grayscale PNG top-to-bottom with netpbm and verifies the pixel order in the output image.
netpbm top-bottom flip PNG Port / libpng / usage-netpbm-pnmflip-topbottom-png Passed
Converts a PNG fixture to PNM, flips it top-to-bottom, and verifies the reconstructed PNG output.
netpbm transpose PNG flip Port / libpng / usage-netpbm-pnmflip-transpose-png Passed
netpbm gamma PNG Port / libpng / usage-netpbm-pnmgamma-png Passed
netpbm pnminvert PNG generated Port / libpng / usage-netpbm-pnminvert-png-generated Passed
netpbm inverts PNG grayscale Port / libpng / usage-netpbm-pnminvert-png Passed
Converts a tiny grayscale PNG through Netpbm inversion and verifies the inverted sample values survive a PNG round trip.
netpbm pnminvert RGB PNG roundtrip Port / libpng / usage-netpbm-pnminvert-rgb-png-roundtrip Passed
Inverts a generated RGB PNG with pnminvert and verifies the inverted per-channel pixel values after a PNG roundtrip.
netpbm pnmpaste onto PNG-derived canvas Port / libpng / usage-netpbm-pnmpaste-png Passed
netpbm pnmpsnr PNG comparison Port / libpng / usage-netpbm-pnmpsnr-png Passed
netpbm pnmscale double PNG generated Port / libpng / usage-netpbm-pnmscale-double-png-generated Passed
Doubles a generated grayscale PNG with netpbm and verifies the scaled output dimensions and pixel values.
netpbm double scale PNG Port / libpng / usage-netpbm-pnmscale-double-png Passed
netpbm pnmscale half PNG generated Port / libpng / usage-netpbm-pnmscale-half-png-generated Passed
Scales a generated grayscale PNG to half size with pnmscale and verifies the resulting one-by-one shape.
netpbm pnmscale half PNG Port / libpng / usage-netpbm-pnmscale-half-png Passed
netpbm scales PNG Port / libpng / usage-netpbm-pnmscale-png Passed
netpbm triple PNG scale Port / libpng / usage-netpbm-pnmscale-triple-png Passed
netpbm pnmsmooth PNG Port / libpng / usage-netpbm-pnmsmooth-png Passed
netpbm pnmtile from PNG fixture Port / libpng / usage-netpbm-pnmtile-png Passed
netpbm pnmtopng -compression 0 vs 9 Port / libpng / usage-netpbm-pnmtopng-compression-zero-png Passed
Encodes basn2c08.png with pnmtopng -compression 0 (store) and -compression 9 (best) and verifies the compression-0 PNG IDAT stream is materially larger than the compression-9 stream while both decode to identical pixels.
netpbm pnmtopng -filter 0 (none) Port / libpng / usage-netpbm-pnmtopng-filter-none-png Passed
Re-encodes basn2c08.png through pnmtopng with -filter 0 (force PNG filter type "None") and confirms every IDAT-decoded scanline begins with filter byte 0x00 while pixel content round-trips identically to the unfiltered re-encode.
netpbm pnmtopng -sub restricts row filter Port / libpng / usage-netpbm-pnmtopng-filter-sub-png Passed
Re-encodes basn2c08.png with pnmtopng -sub (only Sub filter permitted), decompresses the resulting IDAT stream and confirms every scanline filter byte is either 0 (None) or 1 (Sub) -- pnmtopng documents -sub as "permits the Sub filter" and the encoder must not emit Up/Average/Paeth filter bytes when only Sub is allowed. Pixel content must round-trip identically.
netpbm pnmtopng -interlace Adam7 Port / libpng / usage-netpbm-pnmtopng-interlace-adam7-png Passed
Re-encodes basn2c08.png with pnmtopng -interlace, parses the IHDR chunk to confirm the interlace method byte equals 1 (Adam7), and verifies the interlaced output decodes to pixels identical to the non-interlaced re-encode.
netpbm pnmtopng -palette derived from fixture Port / libpng / usage-netpbm-pnmtopng-palette-from-fixture-png Passed
Quantizes basn2c08.png to a small palette via pnmquant 16, encodes the result with pnmtopng -palette using a derived 16-color palette PPM, and verifies the resulting PNG IHDR reports color type 3 (indexed) and contains a PLTE chunk with the expected 48-byte (16-entry) length.
pnmtopng 16-bit PGM input Port / libpng / usage-netpbm-pnmtopng-r9-bitdepth16-pgm-png Passed
Encodes a 16-bit PGM through pnmtopng and verifies the resulting PNG IHDR carries bit depth 16 and color type 0.
pnmtopng -compression 9 emits PNG Port / libpng / usage-netpbm-pnmtopng-r9-compression-level-png Passed
Encodes a PPM with pnmtopng -compression 9 and verifies that the output is a PNG file and is generally smaller than -compression 0 output.
pnmtopng -filter up emits valid PNG Port / libpng / usage-netpbm-pnmtopng-r9-filter-up-png Passed
Encodes a PPM through pnmtopng -filter up and verifies the output is recognized as PNG image data and reopens with the expected dimensions.
pnmtopng grayscale PGM stays non-truecolor Port / libpng / usage-netpbm-pnmtopng-r9-grayscale-png Passed
Encodes a PGM grayscale ramp and verifies the resulting PNG IHDR carries a non-truecolor color type (0 grayscale or 3 palette), proving pnmtopng didn't expand to RGB.
netpbm pnmtopng -modtime adds tIME chunk Port / libpng / usage-netpbm-pnmtopng-time-now-png Passed
Encodes basn2c08.png with pnmtopng -modtime set to the current UTC timestamp (the formatted form pnmtopng requires) and parses the resulting PNG to confirm a tIME chunk is present with a canonical 7-byte payload and the encoded year matches the requested year.
netpbm pnmtopng -transparent specific color Port / libpng / usage-netpbm-pnmtopng-transparent-color-png Passed
Builds a 4x4 PPM containing a known magenta pixel, encodes it with pnmtopng -transparent =rgb:ff/00/ff, and confirms the resulting PNG carries a tRNS chunk and that pngtopam exposes a four-channel image whose alpha channel is 0 exactly at the magenta pixels.
netpbm pnmtopng Port / libpng / usage-netpbm-pnmtopng Passed
netpbm ppmtoyuv from PNG-derived ppm Port / libpng / usage-netpbm-ppmtoyuv-png Passed
Decodes the basn2c08 PNG fixture to a ppm and converts it to YUV via ppmtoyuv, then verifies the YUV byte count matches the 4:2:2 Abekas layout for 32x32.
netpbm pamditherbw produces a 1-bit raster from a PNG-derived grayscale image Port / libpng / usage-netpbm-r10-pamditherbw-png Passed
Decodes a PNG with a 4-step grayscale ramp through pngtopnm, runs pamditherbw, and verifies the output declares 1 BLACKANDWHITE channel via pamfile.
netpbm pamfind locates a known color in a PNG-derived PAM Port / libpng / usage-netpbm-r10-pamfind-color-png Passed
Builds a PNG with a single red pixel in a known position, decodes it through pngtopam, and confirms pamfind reports the matching coordinate.
netpbm pamhue 120-degree rotation maps red to green Port / libpng / usage-netpbm-r10-pamhue-shift-png Passed
Decodes a pure-red PNG, rotates the hue by 120 degrees with pamhue, and verifies the result is dominated by the green channel.
netpbm pamrgbatopng emits an RGBA PNG from a synthetic PAM Port / libpng / usage-netpbm-r10-pamrgbatopng-rgba Passed
Builds a 2x1 PAM with the RGB_ALPHA tuple type and converts it with pamrgbatopng, asserting the resulting PNG announces 8-bit RGBA via the file(1) classifier.
netpbm pamtable dumps PNG-derived PAM as a numeric table Port / libpng / usage-netpbm-r10-pamtable-png Passed
Decodes a synthetic PNG with pngtopam and pipes it through pamtable, then verifies the resulting text grid contains the expected RGB sample values.
netpbm pamcrater elevation pipes through pnmgamma into PNG Port / libpng / usage-netpbm-r11-pamcrater-pnmgamma-png Passed
Generates a synthetic crater field with pamcrater, normalises the elevation tuple type via pnmgamma, and writes the result as a 16-bit grayscale PNG, exercising the elevation-to-pnm bridge.
netpbm pamoil oil-paint preserves geometry through PNG encode Port / libpng / usage-netpbm-r11-pamoil-png-roundtrip Passed
Decodes a synthetic PNG to PAM, applies pamoil's oil-paint stylisation, and re-encodes via pnmtopng, confirming the output PNG retains the original 32x24 dimensions and color type.
netpbm pnmscalefixed 2 doubles PNG-derived dimensions Port / libpng / usage-netpbm-r11-pnmscalefixed-double-png Passed
Decodes a synthetic PNG to PAM, scales it 2x with pnmscalefixed (fixed-point integer scaling), and re-encodes via pnmtopng, verifying the output PNG geometry is exactly twice the input.
netpbm pnmtopng -interlace sets IHDR Adam7 flag Port / libpng / usage-netpbm-r11-pnmtopng-interlace-flag Passed
Encodes a synthetic PPM with pnmtopng -interlace and confirms the resulting PNG IHDR interlace byte is 1 (Adam7) while the default encoding uses byte 0.
netpbm pnmtopng -filter=4 produces a valid PNG Port / libpng / usage-netpbm-r11-pnmtopng-paeth-filter Passed
Encodes a synthetic gradient PPM with pnmtopng -filter=4 (Paeth filter strategy) and verifies the output is a well-formed PNG, exercising the explicit filter selection path through libpng.
netpbm pngtopnm -alpha extracts the alpha channel as a PGM Port / libpng / usage-netpbm-r12-pngtopnm-alpha-extracts-mask Passed
Encodes an RGBA PNG via pamrgbatopng, decodes it back with pngtopnm -alpha, and verifies the result is a PGM grayscale image with the same width and height as the source — the -alpha flag must produce a single-channel mask.
netpbm pngtopnm -mix flattens an RGBA PNG into a 3-channel PPM Port / libpng / usage-netpbm-r12-pngtopnm-mix-flattens-alpha Passed
Encodes an RGBA PNG, decodes it with pngtopnm -mix which composites the alpha channel against a background to produce a 3-channel PPM, and verifies the output identifies as PPM with the original width and height.
netpbm pnmtopng -compression=9 produces a valid PNG Port / libpng / usage-netpbm-r12-pnmtopng-compression-9-png Passed
Encodes a synthetic 32x32 PPM with pnmtopng -compression=9 (maximum zlib level) and verifies the output is a well-formed PNG with the expected geometry, exercising the high-compression code path through libpng.
netpbm pnmtopng -filter=3 produces a valid PNG Port / libpng / usage-netpbm-r12-pnmtopng-filter-average-png Passed
Encodes a synthetic gradient PPM with pnmtopng -filter=3 (Average filter strategy) and verifies the output is a well-formed PNG, exercising the explicit Average filter selection path through libpng — distinct from the existing -filter=4 (Paeth) test.
netpbm pnmtopng -force keeps explicit truecolor encoding Port / libpng / usage-netpbm-r12-pnmtopng-force-flag-png Passed
Encodes a 16x16 PPM with pnmtopng -force which suppresses the optimization that would convert to a paletted PNG when colors are few, and verifies the output IHDR records color type 2 (truecolor RGB) rather than 3 (palette).
netpbm pnmtopng -text inserts a tEXt chunk with the supplied keyword Port / libpng / usage-netpbm-r12-pnmtopng-text-chunk-keyword-png Passed
Encodes a synthetic PPM with pnmtopng -text pointing at a small file that declares "Author Alice" and verifies the resulting PNG contains a tEXt chunk whose keyword "Author" and value "Alice" are present in the binary stream.
netpbm pngtopam -alphapam decodes an RGBA PNG into a 4-channel RGB_ALPHA PAM Port / libpng / usage-netpbm-r13-pngtopam-rgba-from-rgba-png Passed
Encodes an RGBA PAM into a PNG via pamtopng, decodes it back with pngtopam -alphapam, and verifies the result is a P7-magic PAM with DEPTH 4, MAXVAL 255, and TUPLTYPE RGB_ALPHA, locking in pngtopam's alpha-preserving decode path distinct from the existing -alpha extract-mask test which yields a single-channel PGM.
netpbm pnmtopng -rgb writes a cHRM chunk with eight 4-byte fields Port / libpng / usage-netpbm-r13-pnmtopng-chroma-emits-chrm-chunk Passed
Encodes a synthetic PPM with pnmtopng -rgb supplying explicit white-point and primary chromaticity coordinates as a single quoted string of eight floats, and walks the resulting PNG to confirm a cHRM chunk is present whose payload is exactly 32 bytes (eight 4-byte big-endian integers for white-point and RGB primaries), locking in the cHRM emission path through libpng.
netpbm pnmtopng -gamma=0.45455 emits a gAMA chunk Port / libpng / usage-netpbm-r13-pnmtopng-gamma-emits-gama-chunk Passed
Encodes a synthetic PPM with pnmtopng -gamma=0.45455 (the canonical sRGB gamma) and walks the chunk stream of the resulting PNG to confirm exactly one gAMA chunk is present whose 4-byte big-endian payload equals 45455 — pnmtopng stores the supplied gamma scaled by 100000 in the gAMA payload.
netpbm pnmtopng -size emits a pHYs chunk recording the requested pixels-per-unit Port / libpng / usage-netpbm-r13-pnmtopng-phys-aspect-2-1 Passed
Encodes a synthetic PPM with pnmtopng -size declaring 200 pixels-per-unit on the x axis and 100 on the y axis with unit specifier 0 (aspect-only), and walks the resulting PNG to confirm a pHYs chunk is present whose 9-byte payload encodes those exact integers — locking in pnmtopng's physical-pixel-size emission path through libpng.
netpbm pnmtopng -srgbintent=perceptual emits an sRGB chunk with rendering-intent byte 0 Port / libpng / usage-netpbm-r13-pnmtopng-srgbintent-perceptual Passed
Encodes a synthetic PPM with pnmtopng -srgbintent=perceptual (the named token Ubuntu 24.04 pnmtopng requires) and walks the chunk stream of the resulting PNG to confirm exactly one sRGB chunk is present whose 1-byte payload equals 0, locking in the perceptual rendering-intent emission path.
netpbm pngtopnm -byrow decodes a non-interlaced RGB PNG row-at-a-time path Port / libpng / usage-netpbm-r14-pngtopnm-byrow-decodes-rgb Passed
Encodes a synthetic 16x16 RGB PPM via pnmtopng (non-interlaced), then decodes it back with pngtopnm -byrow and verifies the result is a P6 PPM of the original dimensions — locking in pngtopnm/pngtopam's row-by-row decode path through libpng's png_read_row() on Ubuntu 24.04.
netpbm pngtopnm -text dumps tEXt keyword and value into a side file Port / libpng / usage-netpbm-r14-pngtopnm-text-extracts-text-chunk Passed
Builds a PNG containing a tEXt "Author Alice" chunk with pnmtopng -text and decodes it back with pngtopnm -text=<file>, asserting the side-file pngtopnm writes contains both the keyword "Author" and the value "Alice" — locking in pngtopnm's tEXt-extraction path which is distinct from -alpha and -mix.
netpbm pnmtopng -alpha=mask.pgm encodes per-pixel transparency into the PNG Port / libpng / usage-netpbm-r14-pnmtopng-alpha-emits-trns-or-rgba Passed
Encodes a 16x16 RGB PPM with pnmtopng -alpha pointing at a 16x16 PGM transparency mask, and walks the chunk stream of the resulting PNG to confirm transparency was preserved either as an RGBA color type (6) or via a tRNS chunk paired with a paletted color type — locking in that the pnmtopng alpha-mask path through libpng produces a structurally valid transparent PNG.
netpbm pnmtopng -comp_strategy=huffman_only writes a valid PNG of the original dimensions Port / libpng / usage-netpbm-r14-pnmtopng-comp-strategy-huffman-only Passed
Encodes a synthetic 24x24 PPM with pnmtopng -comp_strategy=huffman_only (one of the documented zlib strategies) and verifies the output is a valid 24x24 RGB PNG, locking in that the Huffman-only zlib strategy path is reachable on Ubuntu 24.04 and produces a well-formed PNG.
netpbm pnmtopng -modtime emits a tIME chunk encoding the requested instant Port / libpng / usage-netpbm-r14-pnmtopng-modtime-emits-time-chunk Passed
Encodes a synthetic PPM with pnmtopng -modtime="2024-01-15 12:00:00" and walks the resulting PNG to confirm exactly one tIME chunk is present whose 7-byte payload encodes the precise calendar date 2024-01-15 with all time fields in valid PNG ranges — locking in the tIME emission path through libpng on Ubuntu 24.04. The hour field is allowed to be shifted from the supplied local time because pnmtopng stores tIME in UTC.
netpbm pnmtopng -ztxt emits a zTXt chunk instead of a tEXt chunk Port / libpng / usage-netpbm-r14-pnmtopng-ztxt-compresses-text Passed
Encodes a synthetic PPM with pnmtopng -ztxt pointing at a "Comment Hello" descriptor file and walks the resulting PNG to confirm a zTXt chunk is present and that no tEXt chunk was emitted for the same payload — locking in that -ztxt selects the compressed-text path through libpng, distinct from the tEXt path covered elsewhere.
netpbm pnmtopng -background=red emits a bKGD chunk Port / libpng / usage-netpbm-r15-pnmtopng-background-bkgd-chunk Passed
Encodes a synthetic 16x16 PPM with pnmtopng -background=red (the documented option that records a suggested background color) and walks the resulting PNG to confirm at least one bKGD chunk is present — locking in libpng's background-color emission path on Ubuntu 24.04 netpbm. Distinct from -transparent, -alpha, and -srgbintent.
netpbm pnmtopng -comp_mem_level=9 writes a valid PNG with max zlib mem-level Port / libpng / usage-netpbm-r15-pnmtopng-comp-mem-level-9 Passed
Encodes a synthetic 24x24 PPM with pnmtopng -comp_mem_level=9 (the documented maximum-memory zlib setting) and verifies the output is a valid 24x24 RGB PNG — locking in that the zlib memory-level override path is reachable on Ubuntu 24.04 netpbm.
netpbm pnmtopng -comp_window_bits=15 writes a valid PNG with max-window zlib Port / libpng / usage-netpbm-r15-pnmtopng-comp-window-bits-15 Passed
Encodes a synthetic 24x24 PPM with pnmtopng -comp_window_bits=15 (the documented maximum, log2(32 KiB)) and verifies the output is a valid 24x24 RGB PNG — locking in that the zlib window-size override path is reachable on Ubuntu 24.04 netpbm. Distinct from -compression and -comp_strategy.
netpbm pnmtopng -hist on a small palette image emits a hIST chunk Port / libpng / usage-netpbm-r15-pnmtopng-hist-emits-hist-chunk Passed
Encodes a tiny 4x4 PPM with only 4 distinct colors using pnmtopng -hist (the documented option that records color frequencies) and walks the resulting PNG to confirm at least one hIST chunk is present — locking in libpng's color-histogram emission path on Ubuntu 24.04 netpbm. The image is designed to be paletted so the hIST chunk is well-defined.
netpbm pnmtopng -nofilter writes a valid PNG of the original dimensions Port / libpng / usage-netpbm-r15-pnmtopng-nofilter-writes-valid-png Passed
Encodes a synthetic 24x24 PPM with pnmtopng -nofilter (one of the documented per-row filter selectors) and verifies the output is a valid 24x24 RGB PNG — locking in that the row-filter selection path through libpng accepts -nofilter on Ubuntu 24.04 netpbm. Distinct from -avg, -up, -sub, -paeth covered/coverable elsewhere.
netpbm pnmtopng -srgbintent=relativecolorimetric emits an sRGB chunk with byte 1 Port / libpng / usage-netpbm-r15-pnmtopng-srgbintent-relativecolorimetric Passed
Encodes a synthetic PPM with pnmtopng -srgbintent=relativecolorimetric (one of the four documented named tokens) and walks the chunk stream to confirm exactly one sRGB chunk is present whose 1-byte payload equals 1 — locking in the relative-colorimetric rendering-intent emission path. Distinct from perceptual (0) and saturation (2) intent tests.
netpbm pnmtopng -srgbintent=saturation emits an sRGB chunk with rendering-intent byte 2 Port / libpng / usage-netpbm-r15-pnmtopng-srgbintent-saturation Passed
Encodes a synthetic PPM with pnmtopng -srgbintent=saturation (one of the four documented named tokens) and walks the chunk stream to confirm exactly one sRGB chunk is present whose 1-byte payload equals 2 — locking in the saturation rendering-intent emission path. Distinct from the perceptual (0) intent test in r13.
netpbm pnmtopng -up writes a valid PNG using the up row-filter selector Port / libpng / usage-netpbm-r15-pnmtopng-up-filter-writes-valid-png Passed
Encodes a synthetic 24x24 PPM with pnmtopng -up (one of the documented per-row filter selectors that allows the Up filter) and verifies the output is a valid 24x24 RGB PNG — locking in the up-filter path on Ubuntu 24.04 netpbm. Distinct from -sub, -avg, -nofilter, -paeth.
netpbm pnmpsnr on a PNG-derived self-comparison reports no difference Port / libpng / usage-netpbm-r16-pnmpsnr-identical-no-difference Passed
Builds a synthetic 8x8 PNG, decodes to PPM twice via pngtopnm, runs pnmpsnr on the two byte-identical PNMs, and asserts the captured diagnostic contains "no difference" — pinning Ubuntu 24.04 netpbm's identical-image report.
netpbm pamcomp composites a 2x2 overlay onto a 4x4 base via PNG-derived inputs Port / libpng / usage-netpbm-r17-pamcomp-opaque-overlay-produces-output Passed
Builds a 4x4 base PPM and a 2x2 overlay PPM, runs pamcomp through pnm2png/png2pnm round trips, and asserts the result has dimensions "4 by 4" — exercising libpng-mediated alpha-free overlay composition.
netpbm pamfile reports "PPM raw" on a libpng-derived color PPM Port / libpng / usage-netpbm-r17-pamfile-reports-ppm-raw-string Passed
Decodes a PNG to PPM with pngtopnm and asserts pamfile output contains the literal "PPM raw" magic-type descriptor, pinning the Ubuntu 24.04 netpbm pamfile schema string.
netpbm pamstretch -xscale 2 -yscale 1 doubles width and preserves height Port / libpng / usage-netpbm-r17-pamstretch-xscale-2-doubles-width Passed
Stretches a 4x3 PNG-derived PGM with pamstretch -xscale 2 -yscale 1 and asserts pamfile reports an 8x3 output via "8 by 3", pinning Ubuntu netpbm's directional scaling factor behavior.
netpbm pamtopng then pngtopam round-trip preserves dimensions Port / libpng / usage-netpbm-r17-pamtopng-then-pngtopam-roundtrip-dims Passed
Converts a 6x5 PPM to PNG with pamtopng and back to PAM with pngtopam, then asserts pamfile reports "6 by 5" — verifying libpng-mediated dimension fidelity end-to-end.
netpbm pnmcat -lr concatenation of three images yields width equal to sum Port / libpng / usage-netpbm-r17-pnmcat-lr-three-images-width-is-sum Passed
Joins three PNG-derived 2x2 grayscale images horizontally via pnmcat -lr and asserts the resulting pamfile listing shows "6 by 2", verifying width additivity across three inputs through the libpng round trip.
netpbm pamcut -left -top -width -height carves a 3x3 window from a PNG-decoded PPM Port / libpng / usage-netpbm-r18-pamcut-window-dims Passed
Encodes an 8x8 PPM to PNG with pnmtopng, decodes with pngtopnm, then runs pamcut -left 2 -top 1 -width 3 -height 3 and asserts pamfile reports a "3 by 3" sub-image, exercising netpbm sub-region selection through a libpng round trip.
netpbm pamflip -leftright preserves dimensions through a libpng round trip Port / libpng / usage-netpbm-r18-pamflip-leftright-keeps-dims Passed
Builds a 5x3 PPM, encodes to PNG via pnmtopng, decodes and flips left-right with pamflip, and asserts pamfile reports "5 by 3" — exercising libpng-mediated geometry preservation under flip.
netpbm pamscale 0.5 halves both dimensions of a PNG-derived PPM Port / libpng / usage-netpbm-r18-pamscale-half-width-height Passed
Builds an 8x8 PPM, encodes to PNG via pnmtopng, decodes via pngtopnm, scales by pamscale 0.5, and asserts pamfile reports "4 by 4" — exercising netpbm scaling through a libpng round trip.
netpbm pngtopam on a PngSuite 32x32 fixture reports "32 by 32" via pamfile Port / libpng / usage-netpbm-r18-pngtopam-fixture-pamfile-dims Passed
Decodes the basn2c08.png PngSuite fixture with pngtopam and asserts pamfile reports "32 by 32" — pinning libpng-mediated dimension fidelity on a real PngSuite sample.
netpbm pnmcat -tb of two PNG-derived images sums their heights Port / libpng / usage-netpbm-r18-pnmcat-tb-stacks-height Passed
Concatenates two 3x2 PNG-decoded PGMs vertically with pnmcat -tb and asserts pamfile reports a "3 by 4" output, pinning height additivity through the libpng round trip.
netpbm pamarith -subtract on two PNG-derived PPMs preserves dimensions Port / libpng / usage-netpbm-r19-pamarith-subtract-png-roundtrip-dims Passed
Encodes two 7x5 PPMs to PNG via pnmtopng, decodes back to PPM with pngtopnm, runs pamarith -subtract on the pair, and asserts pamfile reports "7 by 5", pinning libpng-mediated pixel-arithmetic dimensions.
netpbm pamflip top-bottom twice round-trips a PNG-derived PPM to identical bytes Port / libpng / usage-netpbm-r19-pamflip-tb-roundtrip-restores-png Passed
Encodes a 6x6 PPM to PNG via pnmtopng, decodes back to PPM via pngtopnm, applies pamflip -tb twice and asserts the SHA-256 of the doubly-flipped PPM matches the original decoded PPM, pinning the flip-involutivity round trip across libpng.
netpbm pamtopng on an RGB_ALPHA PAM emits IHDR color type 6 Port / libpng / usage-netpbm-r19-pamtopng-rgba-color-type-six Passed
Builds a 12x12 PAM with TUPLTYPE RGB_ALPHA, encodes via pamtopng, and asserts the IHDR color type byte is 6 (RGBA), pinning that the libpng encoder selects the correct color type for alpha-bearing PAM input.
netpbm pngtopnm decodes an 8-bit grayscale PNG into a P5 PGM of matching dimensions Port / libpng / usage-netpbm-r19-pngtopnm-grayscale-shape Passed
Builds an 8x4 PGM, encodes to PNG via pnmtopng, decodes via pngtopnm, and asserts pamfile reports "PGM raw" and "8 by 4", pinning the libpng-backed grayscale-channel decode shape.
netpbm pnmtopng output terminates with a proper IEND chunk Port / libpng / usage-netpbm-r19-pnmtopng-emits-iend-chunk Passed
Encodes a 5x5 PPM to PNG via pnmtopng and asserts the final 12 bytes match the canonical IEND chunk (length 0, type "IEND", CRC 0xae426082), pinning the libpng end-of-stream marker exactly.
netpbm pnmtopng -interlace marks the IHDR interlace byte non-zero Port / libpng / usage-netpbm-r19-pnmtopng-interlace-byte-set Passed
Encodes a 10x10 PPM with pnmtopng -interlace and inspects byte 28 (interlace method) of the IHDR chunk, asserting it is non-zero, pinning the Adam7 interlace flag in the libpng-emitted output.
netpbm pngtopnm on a paletted PNG decodes into a P6 PPM of matching dimensions Port / libpng / usage-netpbm-r20-pngtopnm-paletted-decodes-rgb-ppm Passed
Generates a 16x10 RGB PPM, encodes via pnmtopng with -palette to force paletted output, validates the IHDR color type is 3 (paletted), then decodes the PNG with pngtopnm and asserts the output PPM begins with P6 magic and the dimensions match the source 16x10, exercising libpng's paletted-decode-to-RGB expansion through netpbm.
netpbm pngtopnm on an RGB PNG emits a P6 PPM of matching dimensions Port / libpng / usage-netpbm-r20-pngtopnm-rgb-png-yields-ppm Passed
Encodes a 14x9 RGB PPM via pnmtopng, decodes the result back through pngtopnm, and asserts the decoded output begins with the P6 magic and reports the same WxH dimensions, exercising libpng's decode path through netpbm's pngtopnm tool.
netpbm pnmtopng -compression 0 emits a valid PNG that decodes back to the source Port / libpng / usage-netpbm-r20-pnmtopng-compression-zero-roundtrip Passed
Encodes a 12x12 RGB PPM via pnmtopng -compression 0 (no zlib compression), validates the PNG magic and IEND, then decodes via pngtopnm and asserts dimensions match the source, exercising libpng's encoder with the stored-deflate path and round-tripping through the decoder.
netpbm pnmtopng on a P5 PGM emits IHDR color type 0 (grayscale) Port / libpng / usage-netpbm-r20-pnmtopng-grayscale-ihdr-color-type-zero Passed
Builds a 12x12 P5 grayscale PGM, encodes via pnmtopng, and asserts the IHDR color type byte is 0 (grayscale, no alpha) and the bit depth is 8, exercising libpng's encoder color-type selection for plain grayscale inputs.
netpbm pnmtopng -libversion mentions libpng in the banner output Port / libpng / usage-netpbm-r20-pnmtopng-libversion-banner Passed
Runs pnmtopng -libversion and asserts the printed banner contains the substring "libpng", pinning that the netpbm encoder reports its underlying libpng dependency on Ubuntu 24.04.
netpbm pnmtopng on a P6 PPM emits IHDR color type 2 (truecolor) Port / libpng / usage-netpbm-r20-pnmtopng-rgb-color-type-two Passed
Builds a 16x10 P6 RGB PPM, encodes via pnmtopng, and asserts the IHDR color type byte is 2 (truecolor RGB, no alpha) and the bit depth is 8, exercising libpng's encoder color-type selection for plain RGB inputs.
netpbm pngtopam on RGBA PNG yields a 4-channel PAM (depth 4) Port / libpng / usage-netpbm-r21-pngtopam-alpha-channel-bands-four Passed
Builds an RGBA PNG, decodes via pngtopam, and asserts pamfile reports the PAM tuple depth as 4 (R,G,B,A), pinning libpng's alpha channel preservation as the fourth band in the netpbm PAM stream.
netpbm pngtopam on an RGBA PNG emits a PAM with tuple type RGB_ALPHA Port / libpng / usage-netpbm-r21-pngtopam-fixture-yields-rgba-tuple-type Passed
Generates an 8x8 RGBA PNG via pnmtopng -alpha, decodes back with pngtopam, and asserts pamfile reports tuple type "RGB_ALPHA", pinning libpng's RGBA color-type round-trip through netpbm's PAM tuple-type labelling.
netpbm pngtopnm -mix -background flattens RGBA to fully-opaque RGB pixels Port / libpng / usage-netpbm-r21-pngtopnm-mix-applies-background Passed
Builds an RGBA PNG with a fully-transparent pixel at (0,0), decodes via pngtopnm -mix -background=rgb:ff/00/00, and asserts the resulting P6 PPM has that pixel set to (255,0,0), pinning libpng's alpha compositing path under netpbm's mix/background semantics.
netpbm pnmtopng -comp_strategy filtered emits a valid PNG with magic header Port / libpng / usage-netpbm-r21-pnmtopng-comp-strategy-rle-valid-png Passed
Encodes a P6 PPM via pnmtopng -comp_strategy filtered and asserts the output begins with the PNG 8-byte signature and contains an IHDR chunk, pinning that libpng accepts the "filtered" zlib strategy via netpbm's -comp_strategy option.
netpbm pnmtopng -text writes a tEXt chunk with the Comment keyword Port / libpng / usage-netpbm-r21-pnmtopng-text-keyword-comment-chunk Passed
Writes a tEXt directive file via pnmtopng -text and asserts the produced PNG byte stream literally contains the tEXt chunk type and the Comment keyword string, pinning libpng's tEXt chunk emission through the netpbm encoder.
netpbm roundtrip png Port / libpng / usage-netpbm-roundtrip-png Passed
pngquant missing input exit 2 Port / libpng / usage-pngquant-cant-open-input-png Passed
Confirms pngquant returns exit code 2 when the input PNG path cannot be opened, and writes no output file.
pngquant --colors 128 quantises PNG fixture Port / libpng / usage-pngquant-colors-128-png Passed
Quantises basn2c08.png with pngquant --colors 128 and verifies the output is a valid PNG whose decoded palette has at most 128 unique colours.
pngquant --colors 256 (max palette) Port / libpng / usage-pngquant-colors-256-png Passed
Quantises a PNG fixture with the maximum palette size of 256 and confirms PNG output is still produced.
pngquant colors eight PNG generated Port / libpng / usage-pngquant-colors-eight-png-generated Passed
Quantizes a generated PNG to eight colors with pngquant and verifies the resulting RGB palette size does not exceed eight colors.
pngquant eight colors Port / libpng / usage-pngquant-colors-eight-png Passed
pngquant colors four PNG generated Port / libpng / usage-pngquant-colors-four-png-generated Passed
Quantizes a generated RGB PNG to four colors with pngquant and verifies the resulting palette stays within four unique colors.
pngquant four colors Port / libpng / usage-pngquant-colors-four-png Passed
pngquant sixteen colors PNG Port / libpng / usage-pngquant-colors-sixteen-png Passed
pngquant --colors 64 palette cap Port / libpng / usage-pngquant-colors-sixtyfour-png Passed
Quantises the basn2c08 PNG fixture to 64 colours and verifies the resulting palette stays at or below the cap.
pngquant three color PNG Port / libpng / usage-pngquant-colors-three-png Passed
pngquant two colors PNG Port / libpng / usage-pngquant-colors-two-png Passed
pngquant compress png Port / libpng / usage-pngquant-compress-png Passed
pngquant default output filename uses -fs8.png suffix Port / libpng / usage-pngquant-default-fs8-suffix-png Passed
Copies basn2c08.png into a temp directory as input.png, runs pngquant with --force but no --output / --ext (default behaviour), and confirms pngquant produced an output named input-fs8.png in the same directory while the original input.png is still present and the input-or8.png variant (used only with --nofs) is absent.
pngquant extension output Port / libpng / usage-pngquant-ext-png Passed
pngquant --floyd 0.5 vs 1.0 dithering strength Port / libpng / usage-pngquant-floyd-half-strength-png Passed
Quantizes basn2c08.png at --floyd 0.5 and --floyd 1.0 and confirms both produce valid 32x32 indexed PNGs whose decoded byte streams differ from each other and from a --nofs (no dither) baseline, exercising fractional Floyd-Steinberg strength not covered by existing zero/default cases.
pngquant floyd dithering Port / libpng / usage-pngquant-floyd-png Passed
pngquant zero Floyd dithering Port / libpng / usage-pngquant-floyd-zero-png Passed
pngquant iebug workaround PNG Port / libpng / usage-pngquant-iebug-png Passed
pngquant map external palette PNG Port / libpng / usage-pngquant-map-palette-png Passed
pngquant nofs PNG generated Port / libpng / usage-pngquant-nofs-png-generated Passed
Quantizes a generated RGB PNG with pngquant nofs dithering disabled and verifies the resulting palette stays within eight unique colors.
pngquant no dithering Port / libpng / usage-pngquant-nofs-png Passed
pngquant --posterize 4 caps per-channel range Port / libpng / usage-pngquant-posterize-four-bits-png Passed
Posterizes basn2c08.png with --posterize 4 (4 bits per channel) and confirms the decoded output has at most 16 distinct values per RGB channel while still containing more than 1 value, exercising a posterization bit-depth not used by the existing 1/2/3 cases.
pngquant posterize one PNG Port / libpng / usage-pngquant-posterize-one-png Passed
pngquant posterize PNG Port / libpng / usage-pngquant-posterize-png Passed
pngquant --posterize 3 Port / libpng / usage-pngquant-posterize-three-png Passed
Posterizes basn2c08.png at --posterize 3 (3 bits per channel) and verifies the resulting PNG decodes at 32x32 and that every channel value is constrained to the 8-level posterization grid.
pngquant posterize two Port / libpng / usage-pngquant-posterize-two-png Passed
Quantizes a PNG fixture with a two-bit posterization setting in pngquant and verifies PNG output is produced.
pngquant --quality 50-100 with 32 colors Port / libpng / usage-pngquant-quality-50-100-thirtytwo-png Passed
Quantizes basn2c08.png with --quality=50-100 and a 32 color palette and verifies the output is a valid PNG that decodes at the original 32x32 dimensions with at most 32 unique colors.
pngquant high quality PNG Port / libpng / usage-pngquant-quality-high-png Passed
pngquant quality low PNG generated Port / libpng / usage-pngquant-quality-low-png-generated Passed
Quantizes a generated PNG with a low-quality window in pngquant and verifies the resulting RGB palette size remains bounded.
pngquant low quality range Port / libpng / usage-pngquant-quality-low-png Passed
Quantizes a PNG fixture with a low quality range in pngquant and verifies PNG output is produced.
pngquant --quality mid range on PNGSuite fixture Port / libpng / usage-pngquant-quality-mid-fixture-png Passed
Runs pngquant with a mid-range quality window (40-80) over the basn2c08 PNGSuite fixture and asserts the output is a 32x32 PNG with at most 16 colours.
pngquant mid quality PNG Port / libpng / usage-pngquant-quality-mid-png Passed
pngquant --quality min lower bound PNG Port / libpng / usage-pngquant-quality-min-low-bound-png Passed
Runs pngquant with a low minimum quality (--quality=10-100) on basn2c08.png and verifies a valid PNG is produced with the same dimensions; also covers the low-bound discard semantics by accepting exit code 99 if pngquant declines the low quality result.
pngquant single-value quality cap PNG Port / libpng / usage-pngquant-quality-min-only-png Passed
pngquant quality png Port / libpng / usage-pngquant-quality-png Passed
pngquant quality range Port / libpng / usage-pngquant-quality-range-png Passed
pngquant --quality=70-90 with low palette Port / libpng / usage-pngquant-quality-seventy-ninety-png Passed
Combines a low palette target (48 colours) with a 70-90 quality range and verifies the output PNG stays within the palette cap and meets the quality minimum.
pngquant --quality 0 minimum-only floor Port / libpng / usage-pngquant-quality-zero-only-png Passed
Quantizes basn2c08.png with --quality 0 (minimum-only floor of 0 with implicit max 100) and confirms pngquant emits a valid indexed PNG that still decodes at 32x32 -- this exercises the rarely-tested zero-floor branch of the min-max parser separate from the existing min-low-bound case.
pngquant processes multiple input PNGs in one invocation Port / libpng / usage-pngquant-r10-multiple-files Passed
Runs pngquant against two distinct synthetic PNGs in a single command and verifies both default -fs8.png outputs are emitted as valid PNG files.
pngquant --ordered selects the deterministic dither mode Port / libpng / usage-pngquant-r10-ordered-dither Passed
Quantizes a synthetic PNG with --ordered (the alternative to Floyd-Steinberg) and verifies the optimized PNG is produced and remains structurally valid.
pngquant --quality=45-55 narrow mid band yields a valid PNG Port / libpng / usage-pngquant-r10-quality-mid-band Passed
Quantizes a synthetic PNG with the unusual narrow mid-quality band 45-55 and verifies the optimized output is still a well-formed PNG file.
pngquant --quiet still emits the optimized PNG Port / libpng / usage-pngquant-r10-quiet-flag Passed
Quantizes a synthetic PNG with --quiet to confirm the option suppresses status chatter while still producing a valid PNG file at the requested output path.
pngquant --version reports a 2.x build Port / libpng / usage-pngquant-r10-version-flag Passed
Invokes pngquant --version and verifies the banner advertises a 2.x release with parenthesised release date.
pngquant --ext .png --force converts in place Port / libpng / usage-pngquant-r11-ext-dot-q-suffix Passed
Uses the documented "--ext .png --force" combination to overwrite the input file with its quantised version, verifying the file remains a valid PNG and now decodes as a paletted colormap (proving the in-place conversion happened, not just a no-op).
pngquant -h short flag prints the options banner Port / libpng / usage-pngquant-r11-h-short-help Passed
Runs pngquant with the short -h flag and confirms the printed banner contains both the "usage:" line and an "options:" section header, distinguishing it from the bare invocation banner.
pngquant --nofs --posterize 2 combined produces 4-bit colormap PNG Port / libpng / usage-pngquant-r11-nofs-posterize-combined Passed
Combines --nofs (Floyd-Steinberg disabled) with --posterize 2 (truncate two least-significant bits per channel) at 16 colors and verifies the output is a valid PNG with a paletted color type, exercising the no-dither + posterize composition path.
pngquant --output - writes the quantised PNG to stdout Port / libpng / usage-pngquant-r11-output-dash-stdout Passed
Uses --output - with a single named input file (not stdin) to redirect the quantised PNG to stdout, distinguishing this output path from the existing stdin/stdout pair.
pngquant --quality=99-100 exits 99 on noisy input Port / libpng / usage-pngquant-r11-quality-99-100-exit-99 Passed
Quantises a 64x64 random-noise PNG with --quality=99-100 limited to 4 colors. The minimum quality cannot be met at that palette size, so pngquant must exit with status 99 and not write the output file.
pngquant --floyd=0.5 produces a different output than --nofs Port / libpng / usage-pngquant-r12-floyd-half-strength-distinct Passed
Quantises a synthetic gradient PNG twice — once with --floyd=0.5 (half-strength Floyd-Steinberg) and once with --nofs (no dithering) — at the same color count, and asserts the two output files have different byte contents while both being valid paletted PNGs of the same dimensions.
pngquant --skip-if-larger does not write output when result would grow Port / libpng / usage-pngquant-r12-skip-if-larger-keeps-original Passed
Quantises a tiny 4x4 PNG with --skip-if-larger at a larger color count than necessary; the quantised output cannot be smaller than the trivially-paletted source, so pngquant must skip writing the output file with a non-zero exit status while leaving any pre-existing target untouched.
pngquant --speed=1 differs from --speed=11 on the same input Port / libpng / usage-pngquant-r12-speed-default-vs-eleven-distinct Passed
Quantises the same noisy PNG with the slowest (--speed=1) and the fastest (--speed=11) quality settings at the same color count, and verifies the two output files are valid PNGs of identical dimensions but byte-distinct, confirming the speed knob influences the output bytes.
pngquant --strip removes a tEXt chunk that was present in the source Port / libpng / usage-pngquant-r12-strip-removes-text-chunk Passed
Builds a PNG with a tEXt "Author Alice" chunk via pnmtopng -text, then quantises with --strip and verifies the output PNG no longer contains the "Author\x00Alice" tEXt payload, locking in that --strip drops ancillary chunks.
pngquant -f short flag overwrites an existing target file Port / libpng / usage-pngquant-r13-short-f-force-overwrite Passed
Pre-creates a sentinel file at the chosen output path with a known SHA-256, then runs pngquant -f -o <path> against a synthetic input and verifies the target file's hash changed (proving -f acted as a synonym of --force) and the file is still a valid PNG.
pngquant -o short flag writes the quantised PNG to the supplied path Port / libpng / usage-pngquant-r13-short-o-output-flag Passed
Quantises a synthetic PNG using the documented short -o alias of --output and verifies the named target file exists, is recognised as a PNG, and matches the source dimensions, locking in the short-flag form of the output-path option as a working synonym of --output.
pngquant -Q short flag accepts a min-max quality range and writes a valid PNG Port / libpng / usage-pngquant-r13-short-q-quality-range Passed
Quantises a synthetic PNG with pngquant -Q 0-100 (the documented short alias of --quality with a min-max range covering the full bound) and verifies the resulting file is a valid paletted PNG of the original dimensions with at most the requested colour count, locking in the short -Q alias as functional on Ubuntu 24.04 — distinguishing it from the existing --quality long-form tests.
pngquant -s short flag accepts a speed value and produces a valid PNG Port / libpng / usage-pngquant-r13-short-s-speed-flag Passed
Quantises a synthetic PNG with pngquant -s 4 (the documented default speed/quality knob) and verifies the resulting output is a valid PNG of the original dimensions, locking in the short -s alias of --speed as functional on Ubuntu 24.04 — distinguishing it from the existing --speed long-form tests.
pngquant -V short flag prints the version banner Port / libpng / usage-pngquant-r13-short-v-version-flag Passed
Runs pngquant with the short -V flag and verifies the printed banner matches a "MAJOR.MINOR.PATCH (Month YYYY)" form on stdout, locking in that the short -V alias of --version returns a structured version string and exits successfully — distinguishing -V from the existing --version long-form test.
pngquant --floyd=0.5 long-form fractional strength produces a valid paletted PNG Port / libpng / usage-pngquant-r14-floyd-fractional-strength Passed
Quantises a synthetic 32x32 PNG with pngquant --floyd=0.5 (the documented long-form fractional dithering strength) and verifies the output is a valid 32x32 paletted PNG (color type 3) — locking in the long-form --floyd=N argument syntax with a fractional value as functional on Ubuntu 24.04.
pngquant --quiet suppresses progress messages on stderr while still writing a valid PNG Port / libpng / usage-pngquant-r14-quiet-suppresses-stderr Passed
Quantises a synthetic 24x24 PNG with pngquant --quiet (the documented opposite of --verbose) and verifies that no progress lines are written to stderr while the requested output PNG is still produced — locking in the quiet-mode contract that callers rely on for scripted pipelines.
pngquant -V short flag prints the version banner and exits successfully Port / libpng / usage-pngquant-r14-short-cap-version-flag Passed
Invokes pngquant -V (the documented short alias of --version) and verifies the program prints a recognisable version banner on stdout and exits 0 — locking in that the uppercase short version flag is functional on Ubuntu 24.04 pngquant 2.18.0, distinct from the lowercase -v which controls verbosity.
pngquant --transbug accepts the workaround flag and writes a valid paletted PNG Port / libpng / usage-pngquant-r14-transbug-flag-paletted Passed
Quantises a synthetic 24x24 PNG with pngquant --transbug (the documented workaround flag for readers that expect the fully-transparent palette entry to be last) and verifies the output is a valid 24x24 paletted PNG — locking in that the --transbug flag is a recognised option on Ubuntu 24.04 pngquant 2.18.0.
pngquant --posterize 1 produces a valid paletted PNG of the original dimensions Port / libpng / usage-pngquant-r15-posterize-1bit-paletted Passed
Quantises a synthetic 32x32 PNG with pngquant --posterize 1 (the documented option that lowers per-channel precision; "1" is the smallest precision that pngquant accepts) and verifies the output is a valid 32x32 paletted PNG (color type 3) — locking in the posterize entry-point with a small precision argument on Ubuntu 24.04 pngquant 2.18.0. Distinct from --nofs and --speed flags.
pngquant --quality=0-100 accepts an arbitrary-quality output (no min threshold) Port / libpng / usage-pngquant-r15-quality-zero-min-accepts-any Passed
Quantises a synthetic 24x24 PNG with pngquant --quality=0-100 (a full-range quality window where the lower bound of 0 means "accept any quantisation result") and verifies a valid 24x24 paletted PNG is produced — locking in that 0 is a legal lower bound on Ubuntu 24.04 pngquant 2.18.0 and that the program does not skip output when the lower bound is 0. Distinct from the existing --quality 99-100 high-bound test.
pngquant --ext=.tinyq.png emits the explicit ext suffix Port / libpng / usage-pngquant-r16-ext-tinyq-suffix Passed
Quantises an input PNG with pngquant --ext=.tinyq.png --force and asserts the output file "in.tinyq.png" exists, pinning the documented --ext suffix override — distinct from existing fs8/or8/dot-q ext coverage.
pngquant --speed=1 and --speed=10 both produce valid paletted PNG output Port / libpng / usage-pngquant-r16-speed-extremes-both-succeed Passed
Quantises one synthetic 16x16 PNG twice with pngquant --speed=1 (slowest, best) and --speed=10 (fastest), and asserts both outputs are valid 16x16 paletted PNGs — pinning the speed-extremes encoder paths together, distinct from prior single-speed checks.
pngquant --skip-if-larger exits non-zero on an already-tiny input Port / libpng / usage-pngquant-r17-skip-if-larger-tiny-paletted-exits-nonzero Passed
Quantises an 8x8 noisy PNG with --skip-if-larger at 256 colours; since the source is too small to shrink further, pngquant must skip writing and exit non-zero (98 historically).
pngquant --strip removes an ancillary tEXt chunk from the output PNG Port / libpng / usage-pngquant-r17-strip-removes-ancillary-text-chunk Passed
Builds a 32x32 gradient PNG with a tEXt chunk via pnmtopng -text, runs pngquant --strip, and asserts the output PNG no longer contains the tEXt chunk type, pinning the metadata-strip behavior on Ubuntu 24.04 pngquant 2.18.
pngquant --transbug on an RGBA gradient PNG produces a paletted PNG Port / libpng / usage-pngquant-r17-transbug-rgba-input-produces-paletted Passed
Generates a 32x32 PAM with alpha, encodes to PNG via pamtopng, runs pngquant --transbug, and asserts the output PNG has color type 3 (paletted), exercising the --transbug code path on RGBA input.
pngquant --ext custom suffix writes a sibling PNG with the requested name Port / libpng / usage-pngquant-r18-ext-suffix-writes-named-output Passed
Runs pngquant --ext '-r18.png' against an input named in.png and asserts a sibling in-r18.png is produced, pinning the custom-extension naming behavior end-to-end through the libpng encoder.
pngquant --nofs (no Floyd-Steinberg) still emits a paletted PNG Port / libpng / usage-pngquant-r18-nofs-disables-dither-paletted Passed
Quantises a 24x24 RGB PNG with pngquant --nofs at 32 colors and asserts the output is a color-type-3 paletted PNG, pinning that disabling dithering does not change the libpng-emitted output color type.
pngquant --posterize 2 produces a paletted PNG output Port / libpng / usage-pngquant-r18-posterize-2-paletted-output Passed
Quantises a 20x20 RGB PNG with pngquant --posterize 2 at 16 colors and asserts the output PNG color type byte is 3 (paletted), exercising the posterize-bits reduction path through the libpng-backed encoder.
pngquant --speed 1 produces a color-type-3 paletted PNG output Port / libpng / usage-pngquant-r18-speed-1-produces-paletted Passed
Generates a 24x24 RGB PNG, runs pngquant --speed 1 at 64 colors, and asserts the output PNG color type byte is 3 (paletted) — pinning the highest-quality speed setting through the libpng-backed encoder.
pngquant --speed 11 produces a paletted PNG on a small RGB input Port / libpng / usage-pngquant-r18-speed-11-fast-rough-paletted Passed
Quantises a 16x16 RGB PNG with pngquant --speed 11 (fast & rough) at 32 colors and asserts the output is a color-type-3 paletted PNG, pinning the fastest setting's libpng-mediated output mode.
pngquant with a 5-color target produces a paletted PNG Port / libpng / usage-pngquant-r19-colors-five-paletted-output Passed
Quantises a synthetic gradient PNG to 5 colors via pngquant and asserts the output is a color-type-3 paletted PNG, pinning the odd, non-power-of-two palette-size path through the libpng encoder.
pngquant --floyd=0.25 yields a paletted PNG output Port / libpng / usage-pngquant-r19-floyd-strength-quarter-paletted Passed
Quantises a 20x20 RGB PNG with pngquant --floyd=0.25 at 32 colors and asserts the output PNG color type byte is 3 (paletted), pinning that a fractional Floyd-Steinberg strength still produces an indexed image.
pngquant refuses to overwrite an existing output file without --force Port / libpng / usage-pngquant-r19-output-equals-input-without-force-fails Passed
Quantises a PNG once to a known output path, then re-runs pngquant targeting the same output without --force and asserts pngquant exits non-zero, pinning the safety check that prevents accidental overwrite.
pngquant reads PNG bytes from stdin and emits a paletted PNG on stdout Port / libpng / usage-pngquant-r19-stdin-stdout-pipe-paletted Passed
Pipes a generated PNG into pngquant - - 64 and reads the resulting PNG from stdout, asserting the IHDR color type byte is 3 (paletted), pinning the stdin/stdout streaming path through the libpng encoder.
pngquant 32 emits a PNG with an explicit PLTE chunk in the byte stream Port / libpng / usage-pngquant-r20-32-colors-plte-chunk-present Passed
Generates a PNG, runs pngquant 32 --output <path> <input>, and asserts the resulting paletted PNG byte stream contains the literal four-byte chunk type "PLTE", pinning libpng's palette chunk emission via pngquant's 32-color quantization path.
pngquant --output explicit-path writes the paletted PNG to that named file Port / libpng / usage-pngquant-r20-output-flag-writes-named-file Passed
Generates a PNG, runs pngquant --output <explicit-path> 32 <input>, and asserts the explicit-path file exists with PNG magic and IHDR color type 3 (paletted), while no -fs8.png sibling is created next to the input, pinning the --output flag's destination behavior.
pngquant --verbose emits a non-empty stderr summary while still writing a paletted PNG Port / libpng / usage-pngquant-r20-verbose-stderr-non-empty Passed
Generates a PNG, runs pngquant --verbose --output <path> 32 <input> capturing stderr, asserts the stderr capture is non-empty (the verbose-mode status summary), and asserts the produced output PNG has IHDR color type 3 (paletted), pinning the verbose flag's diagnostic-emission contract.
pngquant --help banner reports libpng as the linked decode library Port / libpng / usage-pngquant-r20-version-mentions-libpng Passed
Runs pngquant --help and asserts the first lines of output contain the literal substring "libpng", pinning that the pngquant CLI advertises libpng as its linked PNG codec dependency on Ubuntu 24.04.
pngquant --help banner reports the libpng version it was compiled against Port / libpng / usage-pngquant-r21-help-mentions-libpng-build Passed
Runs pngquant --help and asserts the first banner line mentions "libpng" alongside a numeric version, pinning the libpng build-time dependency advertised in the pngquant CLI banner.
pngquant 16 produces an output PNG strictly smaller than a 128x128 truecolor input Port / libpng / usage-pngquant-r21-output-smaller-than-input Passed
Encodes a 128x128 truecolor PNG (no palette) then runs pngquant 16 and asserts the resulting paletted PNG byte size is strictly less than the original, pinning libpng's palette-based size reduction through pngquant's 16-color quantization.
pngquant 64 emits a PNG with IHDR color type 3 (palette) Port / libpng / usage-pngquant-r21-paletted-output-color-type-three Passed
Generates a small RGB PNG, runs pngquant 64, and asserts the resulting paletted PNG's IHDR color type byte is exactly 3 (PNG palette mode), pinning libpng's palette color-type emission via pngquant's 64-color quantization.
pngquant --quality 30-70 produces a paletted PNG with a PLTE chunk Port / libpng / usage-pngquant-r21-quality-band-30-70-paletted-output Passed
Encodes a 24x16 truecolor PNG then runs pngquant --quality 30-70, asserting the resulting output contains a PLTE chunk (libpng palette emission) and decodes back to an 8-bit IHDR via the gAMA-free standard pipeline.
pngquant --skip-if-larger on a 2x2 paletted input exits nonzero (skipped) Port / libpng / usage-pngquant-r21-skip-if-larger-keeps-bigger-original Passed
Generates a tiny 2x2 paletted PNG (already small) and runs pngquant 256 --skip-if-larger; asserts the command exits with a nonzero status indicating pngquant skipped writing the new file because it would not be smaller, pinning libpng's size-comparison gating in pngquant.
pngquant --ext custom suffix output naming Port / libpng / usage-pngquant-r9-ext-suffix-output Passed
Runs pngquant with a custom --ext suffix and verifies the resulting file is created at the suffixed path while the input remains.
pngquant rejects non-PNG input Port / libpng / usage-pngquant-r9-non-png-input-fails Passed
Feeds a small text file to pngquant and verifies the binary exits non-zero, treating non-PNG input as an error.
pngquant quality 0-100 emits valid PNG Port / libpng / usage-pngquant-r9-quality-bounds-zero Passed
Quantizes a synthetic PNG at the maximally permissive quality range 0-100 and verifies the output is a valid PNG file.
pngquant --skip-if-larger on a compressible 4x4 PNG Port / libpng / usage-pngquant-skip-if-larger-noop-png Passed
Builds a 4x4 high-entropy PNG that pngquant is unlikely to shrink and runs --skip-if-larger; either the quantised output is a smaller PNG (rc=0) or pngquant declines via rc=98/99 without writing the file.
pngquant skip-if-larger Port / libpng / usage-pngquant-skip-if-larger-png Passed
pngquant skip-if-larger triggers exit 98 Port / libpng / usage-pngquant-skip-if-larger-trigger-png Passed
Quantises an already-tiny 1x1 PNG with --skip-if-larger and accepts pngquant's larger-output exit status (98) without writing a file.
pngquant --skip-if-larger on small uncompressible PNG Port / libpng / usage-pngquant-skip-if-larger-uncompressible-png Passed
Runs pngquant --skip-if-larger against a small near-uncompressible 2x2 random-pixel PNG and accepts either a successful smaller result (rc=0) or pngquant's larger-output discard exit (rc=98 / rc=99) without writing a file.
pngquant --speed 8 PNG Port / libpng / usage-pngquant-speed-eight-png Passed
Runs pngquant with --speed 8 on basn2c08.png and verifies a valid PNG output preserving dimensions, sanity-checking the fast quantisation path.
pngquant speed eleven Port / libpng / usage-pngquant-speed-eleven-png Passed
Quantizes a PNG fixture at the fastest pngquant speed setting and verifies PNG output is produced.
pngquant speed extremes produce valid PNGs Port / libpng / usage-pngquant-speed-extremes-png Passed
Runs pngquant at --speed 1 and --speed 11 against the same input and checks both outputs are valid PNG files with non-zero size.
pngquant speed five PNG Port / libpng / usage-pngquant-speed-five-png Passed
pngquant --speed 4 PNG Port / libpng / usage-pngquant-speed-four-png Passed
Runs pngquant with the mid-default --speed 4 on a synthetic 4x4 RGB PPM and asserts the result is a 4x4 PNG bounded to 8 colours.
pngquant --speed 9 mid-fast preset Port / libpng / usage-pngquant-speed-nine-png Passed
Quantizes basn2c08.png with pngquant --speed 9 (uncovered intermediate level between the existing speed 8 and speed 10 cases), confirms the output decodes at 32x32, and verifies the result PNG has color type 3 (indexed) with no more than 256 PLTE entries.
pngquant speed one PNG generated Port / libpng / usage-pngquant-speed-one-png-generated Passed
Quantizes a generated PNG with pngquant speed one and verifies the resulting RGB palette size does not exceed eight colors.
pngquant speed one Port / libpng / usage-pngquant-speed-one-png Passed
pngquant speed png Port / libpng / usage-pngquant-speed-png Passed
pngquant --speed 6 mid setting Port / libpng / usage-pngquant-speed-six-png Passed
Quantises the basn2c08 PNG fixture using the mid speed setting (6) and confirms output dimensions and palette cap.
pngquant --speed 10 Port / libpng / usage-pngquant-speed-ten-png Passed
Quantizes a synthesised gradient PNG with --speed 10 (near the fastest setting) to 8 colors and verifies the output is a valid PNG with at most 8 unique colors.
pngquant speed three PNG Port / libpng / usage-pngquant-speed-three-png Passed
pngquant --speed 2 Port / libpng / usage-pngquant-speed-two-png Passed
Quantizes basn2c08.png with --speed 2 (slow, high quality side of the trade-off) to 16 colors and verifies the result is a valid 32x32 PNG with at most 16 unique colors.
pngquant reads PNG from stdin Port / libpng / usage-pngquant-stdin-input-png Passed
Streams the basn2c08 fixture into pngquant via the `-` input argument and writes the quantised PNG to a file with --output.
pngquant writes PNG to stdout Port / libpng / usage-pngquant-stdout-png Passed
Runs pngquant with --output - so the optimized PNG is emitted on stdout, then validates the captured bytes.
pngquant --strip removes ancillary metadata Port / libpng / usage-pngquant-strip-metadata-verify-png Passed
Adds a tEXt chunk with a known marker to basn2c08.png via pnmtopng -text, runs pngquant --strip, and verifies the resulting PNG no longer contains the tEXt marker while remaining a valid PNG.
pngquant strip png Port / libpng / usage-pngquant-strip-png Passed
pngquant --strip removes tEXt chunk Port / libpng / usage-pngquant-strip-text-chunk-verify-png Passed
Re-encodes basn2c08.png with an injected tEXt chunk via pnmtopng -text, runs pngquant --strip, and uses Python to walk the PNG chunk structure of the output and confirm no tEXt/zTXt/iTXt chunks remain while IHDR and IDAT do.
pngquant strip removes ancillary chunks Port / libpng / usage-pngquant-strip-verify-png Passed
Runs pngquant with --strip and verifies that auxiliary text/time chunks are absent compared to a non-stripped run.
pngquant on a 1x1 PNG edge case Port / libpng / usage-pngquant-tiny-1x1-png Passed
Generates a minimal 1x1 RGB PNG via netpbm and confirms pngquant produces a 1x1 single-colour PNG output.
pngquant transbug workaround PNG Port / libpng / usage-pngquant-transbug-png Passed
pngquant verbose output Port / libpng / usage-pngquant-verbose-png Passed
pngquant --verbose stderr capture Port / libpng / usage-pngquant-verbose-stderr-png Passed
Runs pngquant with --verbose on the basn2c08 PNGSuite fixture, captures stderr separately from stdout, and confirms verbose progress is on stderr while a valid PNG is still written.
CVE-2004-0598 libpng regression Port / libpng / cve-2004-0598 Passed
Asserts that libpng rejects a malformed iCCP chunk whose payload is shorter than the documented profile-name+method+stream layout without dereferencing a NULL profile pointer.
CVE-2004-0599 libpng regression Port / libpng / cve-2004-0599 Passed
Asserts that libpng rejects an IHDR with extreme width and height values that historically caused unchecked size arithmetic to overflow during row-buffer setup.
CVE-2007-2445 libpng regression Port / libpng / cve-2007-2445 Passed
Asserts that libpng rejects a tRNS chunk whose CRC is corrupt without leaving partially-applied num_trans state in the decoder.
CVE-2010-0205 libpng regression Port / libpng / cve-2010-0205 Passed
Asserts that libpng caps decompressed size of an oversized iCCP chunk and surfaces a documented error in bounded time instead of inflating attacker-controlled compressed metadata without limit.
CVE-2011-3328 libpng regression Port / libpng / cve-2011-3328 Passed
Asserts that libpng rejects a cHRM chunk whose chromaticity coordinates would drive rgb_to_gray arithmetic to a divide-by-zero condition without crashing the decoder.
CVE-2013-6954 libpng regression Port / libpng / cve-2013-6954 Passed
Asserts that libpng rejects a palette-image PNG with no PLTE chunk without dereferencing the missing palette pointer during read.
CVE-2014-0333 libpng regression Port / libpng / cve-2014-0333 Passed
Asserts that libpng's progressive reader makes forward progress and rejects in bounded time a PNG whose IDAT chunk is zero length, instead of looping in the historical PNG_READ_CHUNK_MODE state.
CVE-2017-12652 libpng regression Port / libpng / cve-2017-12652 Passed
Asserts that libpng rejects a chunk whose declared length exceeds the documented maximum without crashing or running unbounded length-validation work.
CVE-2018-13785 libpng regression Port / libpng / cve-2018-13785 Passed
Asserts that libpng's chunk-length validator computes row_factor from extreme image dimensions without overflowing into a divide-by-zero path inside png_check_chunk_length.