Commit Graph
3278 Commits
Author SHA1 Message Date
Nigel Tao d53f37997f Have std/png decode truncated images
Fixes #71
2022-01-23 22:59:06 +11:00
Nigel Tao 985a756a48 Add test/data/hippopotamus.*.truncated.png 2022-01-23 22:17:59 +11:00
Nigel Tao fa1bf3415e Add std/tga benchmarks
Updates #67
2022-01-21 16:13:07 +11:00
Nigel Tao 48e457204f Add "./build-{example,fuzz}.sh" instructions 2022-01-19 14:58:40 +11:00
Nigel Tao 418847fe94 wuffs gen -version=0.3.0-beta.14 v0.3.0-beta.14 2022-01-19 11:04:21 +11:00
Nigel Tao adfd2965cc Merge pull request #70 from MichaelMcDonnell/fix-rust-png-bench
Fix Rust PNG benchmark
2022-01-18 12:31:29 +11:00
Michael Mc Donnell 3fa3928c68 Fix Rust PNG benchmark
The Rust PNG benchmark no longer compiles. This is similar to the issue
that was fixed in pull request #68 for the Rust GIF benchmark. A new
version of the png crate was published that broke clean builds. I've
pinned the version to 0.17, which is the newest, and changed the code to
use the new API.

NOTE: Parts of the png crate documentation hasn't been updated to
correctly list the new transformation defaults. The documentation for
the `normalize_to_color8` method does say that the defaults changed from
version 0.16 to 0.17.
2022-01-17 13:36:18 -08:00
Nigel Tao 03e6188bea Add Michael Mc Donnell to A+C 2022-01-16 08:34:57 +11:00
Nigel Tao 2f61d7dbd4 Merge pull request #68 from MichaelMcDonnell/fix-rust-gif-bench
Fix Rust GIF benchmark
2022-01-16 08:32:14 +11:00
Nigel Tao c203818556 Have std/tga ignore X-Origin and Y-Origin fields
Updates #67
2022-01-15 15:10:03 +11:00
Nigel Tao 6d35660651 Add fuzz/c/std/tga_fuzzer.c
Updates #67
2022-01-15 14:53:41 +11:00
Nigel Tao c82793a984 Tighten magic_number_guess_fourcc TGA heuristic
Prior to this commit, test/data/cbor-rfc-7049-examples.cbor was
incorrectly sniffed as TGA. /usr/bin/file did this too.

$ file test/data/cbor-rfc-7049-examples.cbor
test/data/cbor-rfc-7049-examples.cbor: Targa image data - Map 59395 x 26
x 15 +6169 +6500 - 2-bit alpha - interleave "@\033"

Updates #67
2022-01-15 14:32:51 +11:00
Nigel Tao ed4d556721 Re-create test/data/bricks-gray.tga
We now convert it from the BMP file, not the PNG file:
$ convert bricks-gray.bmp -auto-orient bricks-gray.tga

The bricks-gray.png file has some gamma correction metadata that meant
that the previous TGA file (when converted to NIA) didn't match the
other bricks-gray.* files. After this commit, they all match:

$ grep bricks-gray test/nia-checksums-of-data.txt
c2bce675 test/data/bricks-gray.bmp
c2bce675 test/data/bricks-gray.gif
c2bce675 test/data/bricks-gray.no-ancillary.png
c2bce675 test/data/bricks-gray.png
c2bce675 test/data/bricks-gray.tga

Updates #67
2022-01-15 14:18:36 +11:00
Nigel Tao fd69133c5d Fix std/tga opaque-ness
Updates #67
2022-01-15 14:11:56 +11:00
Nigel Tao f4002c5b21 Have std/tga decode RLE images
Updates #67
2022-01-15 14:10:05 +11:00
Nigel Tao fc77dc35ff Have std/tga decode BGRX5551 images
Updates #67
2022-01-15 12:53:24 +11:00
Nigel Tao c997066a2a Have std/tga decode color-mapped images
Updates #67
2022-01-15 12:38:21 +11:00
Nigel Tao 2c10bc32b0 Have std/tga decode non-color-mapped images
Updates #67
2022-01-15 11:37:45 +11:00
Nigel Tao 5aa7a9339f Have std/tga decode width and height
Updates #67
2022-01-15 08:28:53 +11:00
Michael Mc Donnell d17fc6e6eb Fix Rust GIF benchmark
The Rust GIF benchmark no longer compiles. The Cargo.toml file uses a
star to specify the gif crate version. That means a clean compile will
use the latest version even if it has breaking changes. Version 0.11 has
breaking changes which means the benchmark can no longer be compiled
from a clean start.

I fixed the benchmark by pinning the version to 0.11 and updating the
code to use the new API.
2022-01-14 11:01:11 -08:00
Nigel Tao 4c09c77bb9 Add std/tga package
This is just a placeholder decoder implementation  (and all of the
required plumbing) that produces a 1x1 reddish-purple image. Follow-up
commits will add flesh to the metaphorical bones.

TGA has no magic identifier, so MIME sniffers have to use heuristics.
The test/data/cbor-rfc-7049-examples.cbor file (which is CBOR binary
data, not a TGA image) is mistakenly sniffed as TGA. The /usr/bin/file
program makes the same classification (a false positive).

$ file test/data/cbor-rfc-7049-examples.cbor
test/data/cbor-rfc-7049-examples.cbor: Targa image data - Map 59395 x 26
x 15 +6169 +6500 - 2-bit alpha - interleave "@\033"

Some test/3pdata/tgasuite/*.tga test files, which are invalid TGA
images, are also false positives for now.

Updates #67
2022-01-14 22:53:20 +11:00
Nigel Tao db0a5a4f3a Tweak NIE/NII/NIA recommended MIME types 2022-01-14 16:41:51 +11:00
Nigel Tao 15c174634e Fix test/data/*.tga orientation
This re-ran imagemagick's convert program, but this time with an
"-auto-orient" option. See
https://issueexplorer.com/issue/ImageMagick/ImageMagick/3844

for i in {color,gray,nodither}; do \
  convert bricks-$i.png -auto-orient bricks-$i.tga; \
  done

The test/data/*.tga files only change in their 18th bytes, from 0x00
(bottom-to-top) to 0x20 (top-to-bottom).

Updates #67
2022-01-14 16:40:05 +11:00
Nigel Tao 510f4581c6 Add test/3pdata/tgasuite
Updates #67
2022-01-14 15:43:28 +11:00
Nigel Tao 792d05bd9c Have magic_number_guess_fourcc use prefix_closed 2022-01-14 15:26:21 +11:00
Nigel Tao e5ead0218e Rename the magic-submodule "prefix" arguments 2022-01-14 15:16:20 +11:00
Nigel Tao f0412122be Add magic_number_guess_fourcc prefix_closed arg 2022-01-14 15:12:14 +11:00
Nigel Tao 546af5a7c3 Let magic_number_guess_fourcc sniff TGA
Updates #67
2022-01-14 14:40:58 +11:00
Nigel Tao b64b2ff09a Tighten magic_number_guess_fourcc ICO heuristic 2022-01-14 10:54:55 +11:00
Nigel Tao c104ae296c Sort degenerate-huffman test Literal/Length table 2022-01-09 10:53:33 +11:00
Nigel Tao 42de49a938 Have make-artificial.go mark incomplete Huffman 2022-01-09 10:49:38 +11:00
Nigel Tao 92ea631055 Have make-artificial.go check canonical Huffman 2022-01-09 10:41:31 +11:00
Nigel Tao 58608c4ee5 wuffs gen -version=0.3.0-beta.13 v0.3.0-beta.13 2022-01-08 14:07:40 +11:00
Nigel Tao 4aa672af48 Drop "unused" in degenerate-huffman-unused tests 2022-01-08 13:59:53 +11:00
Nigel Tao f86c80e425 Fix std/deflate degenerate H-D Huffman table
RFC 1951 section 3.2.7. "Compression with dynamic Huffman codes
(BTYPE=10)" says, "If only one distance code is used, it is encoded
using one bit, not zero bits; in this case there is a single code length
of one, with one unused code."

I had previously mis-read that excerpt to also require that the sole
distance code was the shortest distance (code 0, a distance of 1).

Fixes #66
2022-01-08 13:57:34 +11:00
Nigel Tao dda01f1a77 Add WUFFS_BASE__FOURCC__QOI definition 2022-01-02 09:10:51 +11:00
Nigel Tao f3a7288357 Add more hello-wuffs-c commentary 2022-01-01 16:36:33 +11:00
Nigel Tao 0a8bded7f3 Add Magnus Anderson to A+C 2022-01-01 15:49:40 +11:00
Nigel Tao 918b4e4535 Merge pull request #65 from magnus-ISU/improve-hello
Improve hello-wuffs-c example
2022-01-01 15:47:24 +11:00
magnus 92f74e91a7 Add documentation about when and why wuffs_base__status might not be ok 2021-12-31 12:56:59 -06:00
magnus bcecdef66b Update README to accurately reflect new code 2021-12-31 12:33:50 -06:00
magnus 2f1b1a5311 Remove #ifdefs for readability 2021-12-31 12:27:43 -06:00
Nigel Tao 425eefeb35 Replace "go get" advice with "go install"
Fixes #62
2021-12-30 22:58:12 +11:00
Nigel Tao e1a6a7cd8c Add "wuffs help foo" for the command line tool
Updates #62
2021-12-30 22:34:27 +11:00
Nigel Tao 4e85543d9c Change default -ccompilers to "clang,gcc"
Updates #62
2021-12-30 19:29:44 +11:00
Nigel Tao 4c04ac1127 Replace FOURCC__{WP8,WP8L} with FOURCC__WEBP
Fixes #61
2021-12-15 15:53:14 +11:00
Nigel Tao 8ef4c062d9 Add zlib QUIRK_JUST_RAW_DEFLATE 2021-11-26 23:13:57 +11:00
Nigel Tao 38b101d170 Push std/png decoder.tell_me_more goto_done later 2021-11-26 19:46:36 +11:00
Nigel Tao 5d1473a2ca Refactor std/png decoder.tell_me_more 2021-11-26 19:45:42 +11:00
Nigel Tao 72d4a9e769 Have std/png pass through EXIF data
Fixes #59
2021-11-26 19:14:30 +11:00