bench9000 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +7 -0
- data/benchmarks/chunky_png/chunky-canvas-resampling-bilinear.rb +69 -0
- data/benchmarks/chunky_png/chunky-canvas-resampling-nearest-neighbor.rb +68 -0
- data/benchmarks/chunky_png/chunky-canvas-resampling-steps-residues.rb +37 -0
- data/benchmarks/chunky_png/chunky-canvas-resampling-steps.rb +37 -0
- data/benchmarks/chunky_png/chunky-color-a.rb +39 -0
- data/benchmarks/chunky_png/chunky-color-b.rb +39 -0
- data/benchmarks/chunky_png/chunky-color-compose-quick.rb +39 -0
- data/benchmarks/chunky_png/chunky-color-g.rb +39 -0
- data/benchmarks/chunky_png/chunky-color-r.rb +39 -0
- data/benchmarks/chunky_png/chunky-decode-png-image-pass.rb +74 -0
- data/benchmarks/chunky_png/chunky-encode-png-image-pass-to-stream.rb +84 -0
- data/benchmarks/chunky_png/chunky-operations-compose.rb +70 -0
- data/benchmarks/chunky_png/chunky-operations-replace.rb +69 -0
- data/benchmarks/chunky_png/chunky_png.patch +22 -0
- data/benchmarks/chunky_png/version.txt +2 -0
- data/benchmarks/classic/binary-trees.rb +100 -0
- data/benchmarks/classic/deltablue.rb +732 -0
- data/benchmarks/classic/fannkuch-redux.rb +111 -0
- data/benchmarks/classic/fasta-string.rb +71 -0
- data/benchmarks/classic/mandelbrot.rb +112 -0
- data/benchmarks/classic/matrix-multiply.rb +78 -0
- data/benchmarks/classic/n-body.rb +188 -0
- data/benchmarks/classic/pidigits.rb +88 -0
- data/benchmarks/classic/red-black.rb +363 -0
- data/benchmarks/classic/richards-kwargs.rb +403 -0
- data/benchmarks/classic/richards.rb +403 -0
- data/benchmarks/classic/spectral-norm.rb +95 -0
- data/benchmarks/default.config.rb +206 -0
- data/benchmarks/graph/connected.rb +62 -0
- data/benchmarks/literature/acid.rb +46 -0
- data/benchmarks/micro/pack-big-U-loop.rb +24 -0
- data/benchmarks/micro/pack-big-xLX-repeat.rb +22 -0
- data/benchmarks/micro/pack-small-mixture.rb +17 -0
- data/benchmarks/micro/string-equal.rb +28 -0
- data/benchmarks/octane/deltablue.rb +981 -0
- data/benchmarks/psd.rb/mock-logger.rb +23 -0
- data/benchmarks/psd.rb/psd-color-cmyk-to-rgb.rb +46 -0
- data/benchmarks/psd.rb/psd-compose-color-burn.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-color-dodge.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-darken.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-difference.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-exclusion.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-hard-light.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-hard-mix.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-lighten.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-linear-burn.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-linear-dodge.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-linear-light.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-multiply.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-normal.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-overlay.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-pin-light.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-screen.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-soft-light.rb +43 -0
- data/benchmarks/psd.rb/psd-compose-vivid-light.rb +43 -0
- data/benchmarks/psd.rb/psd-imageformat-layerraw-parse-raw.rb +70 -0
- data/benchmarks/psd.rb/psd-imageformat-rle-decode-rle-channel.rb +87 -0
- data/benchmarks/psd.rb/psd-imagemode-cmyk-combine-cmyk-channel.rb +65 -0
- data/benchmarks/psd.rb/psd-imagemode-greyscale-combine-greyscale-channel.rb +68 -0
- data/benchmarks/psd.rb/psd-imagemode-rgb-combine-rgb-channel.rb +65 -0
- data/benchmarks/psd.rb/psd-renderer-blender-compose.rb +113 -0
- data/benchmarks/psd.rb/psd-renderer-clippingmask-apply.rb +129 -0
- data/benchmarks/psd.rb/psd-renderer-mask-apply.rb +137 -0
- data/benchmarks/psd.rb/psd-util-clamp.rb +42 -0
- data/benchmarks/psd.rb/psd-util-pad2.rb +42 -0
- data/benchmarks/psd.rb/psd-util-pad4.rb +42 -0
- data/benchmarks/psd.rb/psd_native.patch +99 -0
- data/benchmarks/psd.rb/version.txt +2 -0
- data/benchmarks/topaz/neural-net.rb +208 -0
- data/benchmarks/vm/codeload.rb +35 -0
- data/benchmarks/vm/fixtures/codeload/LICENSE.txt +25 -0
- data/benchmarks/vm/fixtures/codeload/lexer.rb +21493 -0
- data/bin/bench9000 +13 -0
- data/example/report.data +945 -0
- data/example/report.html +59178 -0
- data/lib/bench9000.rb +27 -0
- data/lib/bench9000/benchmark.rb +29 -0
- data/lib/bench9000/commands/command.rb +30 -0
- data/lib/bench9000/commands/compare-reference.rb +70 -0
- data/lib/bench9000/commands/compare.rb +43 -0
- data/lib/bench9000/commands/detail.rb +51 -0
- data/lib/bench9000/commands/list-benchmarks.rb +29 -0
- data/lib/bench9000/commands/list-implementations.rb +29 -0
- data/lib/bench9000/commands/reference.rb +46 -0
- data/lib/bench9000/commands/remove.rb +41 -0
- data/lib/bench9000/commands/report.rb +71 -0
- data/lib/bench9000/commands/score.rb +27 -0
- data/lib/bench9000/config.rb +88 -0
- data/lib/bench9000/group.rb +23 -0
- data/lib/bench9000/harness.rb +68 -0
- data/lib/bench9000/implementation.rb +134 -0
- data/lib/bench9000/json-formatter.rb +50 -0
- data/lib/bench9000/main.rb +268 -0
- data/lib/bench9000/measurement.rb +75 -0
- data/lib/bench9000/micro-harness.rb +39 -0
- data/lib/bench9000/options.rb +31 -0
- data/lib/bench9000/report/bootstrap-theme.css +5 -0
- data/lib/bench9000/report/bootstrap.css +5 -0
- data/lib/bench9000/report/bootstrap.js +6 -0
- data/lib/bench9000/report/chart.js +3432 -0
- data/lib/bench9000/report/chartjs.patch +91 -0
- data/lib/bench9000/report/jquery.js +4 -0
- data/lib/bench9000/report/report.html +177 -0
- data/lib/bench9000/report/report.js +547 -0
- data/lib/bench9000/stats.rb +41 -0
- data/readme.md +205 -0
- data/vendor/chunky_png/BENCHMARKS.rdoc +31 -0
- data/vendor/chunky_png/Gemfile +10 -0
- data/vendor/chunky_png/LICENSE +20 -0
- data/vendor/chunky_png/README.rdoc +84 -0
- data/vendor/chunky_png/Rakefile +11 -0
- data/vendor/chunky_png/benchmarks/decoding_benchmark.rb +36 -0
- data/vendor/chunky_png/benchmarks/encoding_benchmark.rb +40 -0
- data/vendor/chunky_png/benchmarks/filesize_benchmark.rb +28 -0
- data/vendor/chunky_png/chunky_png.gemspec +47 -0
- data/vendor/chunky_png/lib/chunky_png.rb +160 -0
- data/vendor/chunky_png/lib/chunky_png/canvas.rb +372 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/adam7_interlacing.rb +72 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/data_url_exporting.rb +15 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/data_url_importing.rb +21 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/drawing.rb +338 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/masking.rb +91 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/operations.rb +395 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/png_decoding.rb +492 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/png_encoding.rb +442 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/resampling.rb +147 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/stream_exporting.rb +58 -0
- data/vendor/chunky_png/lib/chunky_png/canvas/stream_importing.rb +77 -0
- data/vendor/chunky_png/lib/chunky_png/chunk.rb +328 -0
- data/vendor/chunky_png/lib/chunky_png/color.rb +780 -0
- data/vendor/chunky_png/lib/chunky_png/compatibility.rb +15 -0
- data/vendor/chunky_png/lib/chunky_png/datastream.rb +185 -0
- data/vendor/chunky_png/lib/chunky_png/dimension.rb +113 -0
- data/vendor/chunky_png/lib/chunky_png/image.rb +79 -0
- data/vendor/chunky_png/lib/chunky_png/palette.rb +209 -0
- data/vendor/chunky_png/lib/chunky_png/point.rb +115 -0
- data/vendor/chunky_png/lib/chunky_png/rmagick.rb +43 -0
- data/vendor/chunky_png/lib/chunky_png/vector.rb +186 -0
- data/vendor/chunky_png/lib/chunky_png/version.rb +5 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/adam7_interlacing_spec.rb +106 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/data_url_exporting_spec.rb +13 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/data_url_importing_spec.rb +15 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/drawing_spec.rb +170 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/masking_spec.rb +51 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/operations_spec.rb +388 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/png_decoding_spec.rb +97 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/png_encoding_spec.rb +235 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/resampling_spec.rb +121 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/stream_exporting_spec.rb +59 -0
- data/vendor/chunky_png/spec/chunky_png/canvas/stream_importing_spec.rb +31 -0
- data/vendor/chunky_png/spec/chunky_png/canvas_spec.rb +226 -0
- data/vendor/chunky_png/spec/chunky_png/color_spec.rb +251 -0
- data/vendor/chunky_png/spec/chunky_png/datastream_spec.rb +32 -0
- data/vendor/chunky_png/spec/chunky_png/dimension_spec.rb +48 -0
- data/vendor/chunky_png/spec/chunky_png/image_spec.rb +25 -0
- data/vendor/chunky_png/spec/chunky_png/point_spec.rb +76 -0
- data/vendor/chunky_png/spec/chunky_png/rmagick_spec.rb +23 -0
- data/vendor/chunky_png/spec/chunky_png/vector_spec.rb +104 -0
- data/vendor/chunky_png/spec/chunky_png_spec.rb +8 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgai4a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgai4a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgan6a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgan6a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgbn4a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bggn4a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgwn6a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/background_chunks/bgyn6a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g01.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g02.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g04.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi0g16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi2c16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p01.rgba +1 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p02.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p04.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi3p08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi4a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi4a08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi4a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi4a16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi6a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi6a08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi6a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basi6a16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g01.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g02.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g04.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn0g16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn2c16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p01.rgba +1 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p02.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p04.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn3p08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn4a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn4a08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn4a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn4a16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn6a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn6a08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn6a16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/basic/basn6a16.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/broken/x00n0g01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/broken/xcrn0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/broken/xlfn0g04.png +13 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi1n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi1n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi2n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi2n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi4n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi4n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi9n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/chunk_ordering/oi9n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/compression_levels/z00n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/compression_levels/z03n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/compression_levels/z06n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/compression_levels/z09n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n0g08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n0g08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n2c08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f00n2c08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n0g08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n0g08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n2c08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f01n2c08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n0g08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n0g08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n2c08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f02n2c08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n0g08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n0g08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n2c08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f03n2c08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n0g08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n0g08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n0g08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n2c08.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n2c08_reference.png +0 -0
- data/vendor/chunky_png/spec/png_suite/filtering/f04n2c08_reference.rgba +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g03n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g03n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g03n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g04n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g04n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g04n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g05n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g05n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g05n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g07n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g07n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g07n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g10n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g10n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g10n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g25n0g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g25n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/gamma/g25n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/metadata/cm0n0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/metadata/cm7n0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/metadata/cm9n0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ccwn2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ccwn3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cdfn2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cdhn2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cdsn2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cdun2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ch1n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ch2n3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cs3n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cs3n3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cs5n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cs5n3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cs8n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/cs8n3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ct0n0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ct1n0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ctzn0g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/pp0n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/pp0n6a08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ps1n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ps1n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ps2n0g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/other/ps2n2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s01i3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s01n3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s02i3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s02n3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s03i3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s03n3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s04i3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s04n3p01.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s05i3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s05n3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s06i3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s06n3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s07i3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s07n3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s08i3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s08n3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s09i3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s09n3p02.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s32i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s32n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s33i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s33n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s34i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s34n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s35i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s35n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s36i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s36n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s37i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s37n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s38i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s38n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s39i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s39n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s40i3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/sizes/s40n3p04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbbn1g04.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbbn2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbbn3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbgn2c16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbgn3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbrn2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbwn1g16.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbwn3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tbyn3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tp0n1g08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tp0n2c08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tp0n3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite/transparency/tp1n3p08.png +0 -0
- data/vendor/chunky_png/spec/png_suite_spec.rb +121 -0
- data/vendor/chunky_png/spec/resources/adam7.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_five_point.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_four_point.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_four_point_flipped.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_four_point_s.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_six_point.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_three_point.png +0 -0
- data/vendor/chunky_png/spec/resources/bezier_three_point_flipped.png +0 -0
- data/vendor/chunky_png/spec/resources/circles.png +0 -0
- data/vendor/chunky_png/spec/resources/clock.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_base.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_bl_xdown_ydown.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_bl_xdown_yup.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_bl_xup_yup.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_mask.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_mask_updated.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_nn_xdown_ydown.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_nn_xdown_yup.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_nn_xup_yup.png +0 -0
- data/vendor/chunky_png/spec/resources/clock_updated.png +0 -0
- data/vendor/chunky_png/spec/resources/composited.png +0 -0
- data/vendor/chunky_png/spec/resources/cropped.png +0 -0
- data/vendor/chunky_png/spec/resources/damaged_chunk.png +0 -0
- data/vendor/chunky_png/spec/resources/damaged_signature.png +13 -0
- data/vendor/chunky_png/spec/resources/lines.png +0 -0
- data/vendor/chunky_png/spec/resources/operations.png +0 -0
- data/vendor/chunky_png/spec/resources/operations_border.png +0 -0
- data/vendor/chunky_png/spec/resources/operations_grayscale.png +0 -0
- data/vendor/chunky_png/spec/resources/partial_circles.png +0 -0
- data/vendor/chunky_png/spec/resources/pixelstream.bgr +67 -0
- data/vendor/chunky_png/spec/resources/pixelstream.rgb +67 -1
- data/vendor/chunky_png/spec/resources/pixelstream.rgba +67 -0
- data/vendor/chunky_png/spec/resources/pixelstream_best_compression.png +0 -0
- data/vendor/chunky_png/spec/resources/pixelstream_fast_rgba.png +0 -0
- data/vendor/chunky_png/spec/resources/pixelstream_reference.png +0 -0
- data/vendor/chunky_png/spec/resources/polygon_filled_horizontal.png +0 -0
- data/vendor/chunky_png/spec/resources/polygon_filled_vertical.png +0 -0
- data/vendor/chunky_png/spec/resources/polygon_triangle_filled.png +0 -0
- data/vendor/chunky_png/spec/resources/polygon_unfilled.png +0 -0
- data/vendor/chunky_png/spec/resources/rect.png +0 -0
- data/vendor/chunky_png/spec/resources/replaced.png +0 -0
- data/vendor/chunky_png/spec/resources/text_chunk.png +0 -0
- data/vendor/chunky_png/spec/resources/ztxt_chunk.png +0 -0
- data/vendor/chunky_png/spec/spec_helper.rb +52 -0
- data/vendor/chunky_png/tasks/benchmarks.rake +26 -0
- data/vendor/oily_png/Gemfile +4 -0
- data/vendor/oily_png/LICENSE +20 -0
- data/vendor/oily_png/README.rdoc +26 -0
- data/vendor/oily_png/Rakefile +19 -0
- data/vendor/oily_png/ext/oily_png/color.c +58 -0
- data/vendor/oily_png/ext/oily_png/color.h +29 -0
- data/vendor/oily_png/ext/oily_png/extconf.rb +3 -0
- data/vendor/oily_png/ext/oily_png/oily_png_ext.c +59 -0
- data/vendor/oily_png/ext/oily_png/oily_png_ext.h +72 -0
- data/vendor/oily_png/ext/oily_png/operations.c +122 -0
- data/vendor/oily_png/ext/oily_png/operations.h +36 -0
- data/vendor/oily_png/ext/oily_png/png_decoding.c +374 -0
- data/vendor/oily_png/ext/oily_png/png_decoding.h +27 -0
- data/vendor/oily_png/ext/oily_png/png_encoding.c +302 -0
- data/vendor/oily_png/ext/oily_png/png_encoding.h +19 -0
- data/vendor/oily_png/ext/oily_png/resampling.c +213 -0
- data/vendor/oily_png/ext/oily_png/resampling.h +25 -0
- data/vendor/oily_png/lib/oily_png.rb +21 -0
- data/vendor/oily_png/lib/oily_png/canvas.rb +15 -0
- data/vendor/oily_png/lib/oily_png/version.rb +3 -0
- data/vendor/oily_png/oily_png.gemspec +39 -0
- data/vendor/oily_png/spec/color_spec.rb +38 -0
- data/vendor/oily_png/spec/decoding_spec.rb +51 -0
- data/vendor/oily_png/spec/encoding_spec.rb +135 -0
- data/vendor/oily_png/spec/operations_spec.rb +52 -0
- data/vendor/oily_png/spec/resampling_spec.rb +51 -0
- data/vendor/oily_png/spec/resources/basi0g01.png +0 -0
- data/vendor/oily_png/spec/resources/basi0g02.png +0 -0
- data/vendor/oily_png/spec/resources/basi0g04.png +0 -0
- data/vendor/oily_png/spec/resources/basi0g08.png +0 -0
- data/vendor/oily_png/spec/resources/basi0g16.png +0 -0
- data/vendor/oily_png/spec/resources/basi2c08.png +0 -0
- data/vendor/oily_png/spec/resources/basi2c16.png +0 -0
- data/vendor/oily_png/spec/resources/basi3p01.png +0 -0
- data/vendor/oily_png/spec/resources/basi3p02.png +0 -0
- data/vendor/oily_png/spec/resources/basi3p04.png +0 -0
- data/vendor/oily_png/spec/resources/basi3p08.png +0 -0
- data/vendor/oily_png/spec/resources/basi4a08.png +0 -0
- data/vendor/oily_png/spec/resources/basi4a16.png +0 -0
- data/vendor/oily_png/spec/resources/basi6a08.png +0 -0
- data/vendor/oily_png/spec/resources/basi6a16.png +0 -0
- data/vendor/oily_png/spec/resources/basn0g01.png +0 -0
- data/vendor/oily_png/spec/resources/basn0g02.png +0 -0
- data/vendor/oily_png/spec/resources/basn0g04.png +0 -0
- data/vendor/oily_png/spec/resources/basn0g08.png +0 -0
- data/vendor/oily_png/spec/resources/basn0g16.png +0 -0
- data/vendor/oily_png/spec/resources/basn2c08.png +0 -0
- data/vendor/oily_png/spec/resources/basn2c16.png +0 -0
- data/vendor/oily_png/spec/resources/basn3p01.png +0 -0
- data/vendor/oily_png/spec/resources/basn3p02.png +0 -0
- data/vendor/oily_png/spec/resources/basn3p04.png +0 -0
- data/vendor/oily_png/spec/resources/basn3p08.png +0 -0
- data/vendor/oily_png/spec/resources/basn4a08.png +0 -0
- data/vendor/oily_png/spec/resources/basn4a16.png +0 -0
- data/vendor/oily_png/spec/resources/basn6a08.png +0 -0
- data/vendor/oily_png/spec/resources/basn6a16.png +0 -0
- data/vendor/oily_png/spec/resources/composited.png +0 -0
- data/vendor/oily_png/spec/resources/gray.png +0 -0
- data/vendor/oily_png/spec/resources/interlaced.png +0 -0
- data/vendor/oily_png/spec/resources/nonsquare.png +0 -0
- data/vendor/oily_png/spec/resources/operations.png +0 -0
- data/vendor/oily_png/spec/resources/replaced.png +0 -0
- data/vendor/oily_png/spec/resources/s01i3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s01n3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s02i3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s02n3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s03i3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s03n3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s04i3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s04n3p01.png +0 -0
- data/vendor/oily_png/spec/resources/s05i3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s05n3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s06i3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s06n3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s07i3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s07n3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s08i3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s08n3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s09i3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s09n3p02.png +0 -0
- data/vendor/oily_png/spec/resources/s32i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s32n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s33i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s33n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s34i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s34n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s35i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s35n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s36i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s36n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s37i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s37n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s38i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s38n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s39i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s39n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s40i3p04.png +0 -0
- data/vendor/oily_png/spec/resources/s40n3p04.png +0 -0
- data/vendor/oily_png/spec/resources/square.png +0 -0
- data/vendor/oily_png/spec/resources/tbbn1g04.png +0 -0
- data/vendor/oily_png/spec/resources/tbbn2c16.png +0 -0
- data/vendor/oily_png/spec/resources/tbbn3p08.png +0 -0
- data/vendor/oily_png/spec/resources/tbgn2c16.png +0 -0
- data/vendor/oily_png/spec/resources/tbgn3p08.png +0 -0
- data/vendor/oily_png/spec/resources/tbrn2c08.png +0 -0
- data/vendor/oily_png/spec/resources/tbwn1g16.png +0 -0
- data/vendor/oily_png/spec/resources/tbwn3p08.png +0 -0
- data/vendor/oily_png/spec/resources/tbyn3p08.png +0 -0
- data/vendor/oily_png/spec/resources/tp0n1g08.png +0 -0
- data/vendor/oily_png/spec/resources/tp0n2c08.png +0 -0
- data/vendor/oily_png/spec/resources/tp0n3p08.png +0 -0
- data/vendor/oily_png/spec/resources/tp1n3p08.png +0 -0
- data/vendor/oily_png/spec/spec_helper.rb +40 -0
- data/vendor/oily_png/tasks/testing.rake +49 -0
- data/vendor/psd.rb/CONTRIBUTING.md +7 -0
- data/vendor/psd.rb/Gemfile +2 -0
- data/vendor/psd.rb/Guardfile +8 -0
- data/vendor/psd.rb/LICENSE.txt +22 -0
- data/vendor/psd.rb/README.md +235 -0
- data/vendor/psd.rb/Rakefile +6 -0
- data/vendor/psd.rb/circle.yml +6 -0
- data/vendor/psd.rb/examples/build_image.rb +16 -0
- data/vendor/psd.rb/examples/export_image.rb +12 -0
- data/vendor/psd.rb/examples/export_layer_images.rb +19 -0
- data/vendor/psd.rb/examples/export_node.rb +7 -0
- data/vendor/psd.rb/examples/export_text_data.rb +13 -0
- data/vendor/psd.rb/examples/guides.rb +17 -0
- data/vendor/psd.rb/examples/images/comp-example.psd +0 -0
- data/vendor/psd.rb/examples/images/example-cmyk.psd +0 -0
- data/vendor/psd.rb/examples/images/example-greyscale.psd +0 -0
- data/vendor/psd.rb/examples/images/example-nocompat.psd +0 -0
- data/vendor/psd.rb/examples/images/example.psd +0 -0
- data/vendor/psd.rb/examples/images/example16.psd +0 -0
- data/vendor/psd.rb/examples/images/guides.psd +0 -0
- data/vendor/psd.rb/examples/layer_comps.rb +20 -0
- data/vendor/psd.rb/examples/parse.rb +36 -0
- data/vendor/psd.rb/examples/path.rb +7 -0
- data/vendor/psd.rb/examples/profile.rb +15 -0
- data/vendor/psd.rb/examples/slices.rb +17 -0
- data/vendor/psd.rb/examples/tree.rb +8 -0
- data/vendor/psd.rb/examples/unimplemented_info.rb +9 -0
- data/vendor/psd.rb/lib/psd.rb +173 -0
- data/vendor/psd.rb/lib/psd/blend_mode.rb +80 -0
- data/vendor/psd.rb/lib/psd/channel_image.rb +115 -0
- data/vendor/psd.rb/lib/psd/color.rb +125 -0
- data/vendor/psd.rb/lib/psd/descriptor.rb +200 -0
- data/vendor/psd.rb/lib/psd/file.rb +104 -0
- data/vendor/psd.rb/lib/psd/header.rb +69 -0
- data/vendor/psd.rb/lib/psd/helpers.rb +51 -0
- data/vendor/psd.rb/lib/psd/image.rb +123 -0
- data/vendor/psd.rb/lib/psd/image_exports/png.rb +31 -0
- data/vendor/psd.rb/lib/psd/image_formats/layer_raw.rb +21 -0
- data/vendor/psd.rb/lib/psd/image_formats/layer_rle.rb +24 -0
- data/vendor/psd.rb/lib/psd/image_formats/raw.rb +12 -0
- data/vendor/psd.rb/lib/psd/image_formats/rle.rb +63 -0
- data/vendor/psd.rb/lib/psd/image_modes/cmyk.rb +31 -0
- data/vendor/psd.rb/lib/psd/image_modes/greyscale.rb +22 -0
- data/vendor/psd.rb/lib/psd/image_modes/rgb.rb +32 -0
- data/vendor/psd.rb/lib/psd/layer.rb +77 -0
- data/vendor/psd.rb/lib/psd/layer/blend_modes.rb +30 -0
- data/vendor/psd.rb/lib/psd/layer/blending_ranges.rb +62 -0
- data/vendor/psd.rb/lib/psd/layer/channel_image.rb +15 -0
- data/vendor/psd.rb/lib/psd/layer/exporting.rb +28 -0
- data/vendor/psd.rb/lib/psd/layer/helpers.rb +77 -0
- data/vendor/psd.rb/lib/psd/layer/info.rb +74 -0
- data/vendor/psd.rb/lib/psd/layer/mask.rb +19 -0
- data/vendor/psd.rb/lib/psd/layer/name.rb +33 -0
- data/vendor/psd.rb/lib/psd/layer/path_components.rb +22 -0
- data/vendor/psd.rb/lib/psd/layer/position_and_channels.rb +47 -0
- data/vendor/psd.rb/lib/psd/layer_info.rb +27 -0
- data/vendor/psd.rb/lib/psd/layer_info/blend_clipping_elements.rb +13 -0
- data/vendor/psd.rb/lib/psd/layer_info/blend_interior_elements.rb +13 -0
- data/vendor/psd.rb/lib/psd/layer_info/fill_opacity.rb +13 -0
- data/vendor/psd.rb/lib/psd/layer_info/layer_group.rb +30 -0
- data/vendor/psd.rb/lib/psd/layer_info/layer_id.rb +13 -0
- data/vendor/psd.rb/lib/psd/layer_info/layer_name_source.rb +14 -0
- data/vendor/psd.rb/lib/psd/layer_info/layer_section_divider.rb +48 -0
- data/vendor/psd.rb/lib/psd/layer_info/legacy_typetool.rb +88 -0
- data/vendor/psd.rb/lib/psd/layer_info/locked.rb +19 -0
- data/vendor/psd.rb/lib/psd/layer_info/metadata_setting.rb +35 -0
- data/vendor/psd.rb/lib/psd/layer_info/object_effects.rb +16 -0
- data/vendor/psd.rb/lib/psd/layer_info/placed_layer.rb +13 -0
- data/vendor/psd.rb/lib/psd/layer_info/reference_point.rb +16 -0
- data/vendor/psd.rb/lib/psd/layer_info/typetool.rb +165 -0
- data/vendor/psd.rb/lib/psd/layer_info/unicode_name.rb +17 -0
- data/vendor/psd.rb/lib/psd/layer_info/vector_mask.rb +25 -0
- data/vendor/psd.rb/lib/psd/layer_info/vector_mask_2.rb +10 -0
- data/vendor/psd.rb/lib/psd/layer_info/vector_stroke.rb +12 -0
- data/vendor/psd.rb/lib/psd/layer_info/vector_stroke_content.rb +15 -0
- data/vendor/psd.rb/lib/psd/layer_mask.rb +129 -0
- data/vendor/psd.rb/lib/psd/lazy_execute.rb +60 -0
- data/vendor/psd.rb/lib/psd/logger.rb +40 -0
- data/vendor/psd.rb/lib/psd/mask.rb +74 -0
- data/vendor/psd.rb/lib/psd/node.rb +70 -0
- data/vendor/psd.rb/lib/psd/node_exporting.rb +20 -0
- data/vendor/psd.rb/lib/psd/node_group.rb +86 -0
- data/vendor/psd.rb/lib/psd/node_layer.rb +81 -0
- data/vendor/psd.rb/lib/psd/node_root.rb +93 -0
- data/vendor/psd.rb/lib/psd/nodes/ancestry.rb +98 -0
- data/vendor/psd.rb/lib/psd/nodes/build_preview.rb +17 -0
- data/vendor/psd.rb/lib/psd/nodes/has_children.rb +13 -0
- data/vendor/psd.rb/lib/psd/nodes/lock_to_origin.rb +7 -0
- data/vendor/psd.rb/lib/psd/nodes/parse_layers.rb +18 -0
- data/vendor/psd.rb/lib/psd/nodes/search.rb +91 -0
- data/vendor/psd.rb/lib/psd/path_record.rb +180 -0
- data/vendor/psd.rb/lib/psd/renderer.rb +91 -0
- data/vendor/psd.rb/lib/psd/renderer/blender.rb +53 -0
- data/vendor/psd.rb/lib/psd/renderer/canvas.rb +95 -0
- data/vendor/psd.rb/lib/psd/renderer/canvas_management.rb +26 -0
- data/vendor/psd.rb/lib/psd/renderer/clipping_mask.rb +41 -0
- data/vendor/psd.rb/lib/psd/renderer/compose.rb +361 -0
- data/vendor/psd.rb/lib/psd/renderer/layer_styles.rb +56 -0
- data/vendor/psd.rb/lib/psd/renderer/layer_styles/color_overlay.rb +65 -0
- data/vendor/psd.rb/lib/psd/renderer/layer_styles/drop_shadow.rb +75 -0
- data/vendor/psd.rb/lib/psd/renderer/mask.rb +46 -0
- data/vendor/psd.rb/lib/psd/resource.rb +26 -0
- data/vendor/psd.rb/lib/psd/resource_section.rb +22 -0
- data/vendor/psd.rb/lib/psd/resources.rb +69 -0
- data/vendor/psd.rb/lib/psd/resources/guides.rb +35 -0
- data/vendor/psd.rb/lib/psd/resources/layer_comps.rb +42 -0
- data/vendor/psd.rb/lib/psd/resources/slices.rb +132 -0
- data/vendor/psd.rb/lib/psd/section.rb +26 -0
- data/vendor/psd.rb/lib/psd/util.rb +18 -0
- data/vendor/psd.rb/lib/psd/version.rb +3 -0
- data/vendor/psd.rb/psd.gemspec +32 -0
- data/vendor/psd.rb/spec/files/blendmodes.psd +0 -0
- data/vendor/psd.rb/spec/files/empty-layer-subgroups.psd +0 -0
- data/vendor/psd.rb/spec/files/empty-layer.psd +0 -0
- data/vendor/psd.rb/spec/files/example.psd +0 -0
- data/vendor/psd.rb/spec/files/guides.psd +0 -0
- data/vendor/psd.rb/spec/files/locked.psd +0 -0
- data/vendor/psd.rb/spec/files/one_layer.psd +0 -0
- data/vendor/psd.rb/spec/files/path.psd +0 -0
- data/vendor/psd.rb/spec/files/pixel.psd +0 -0
- data/vendor/psd.rb/spec/files/simplest.psd +0 -0
- data/vendor/psd.rb/spec/files/slices.psd +0 -0
- data/vendor/psd.rb/spec/files/text.psd +0 -0
- data/vendor/psd.rb/spec/guides_spec.rb +34 -0
- data/vendor/psd.rb/spec/hierarchy_spec.rb +152 -0
- data/vendor/psd.rb/spec/image_spec.rb +86 -0
- data/vendor/psd.rb/spec/lazy_execute_spec.rb +20 -0
- data/vendor/psd.rb/spec/locked_spec.rb +78 -0
- data/vendor/psd.rb/spec/parsing_spec.rb +163 -0
- data/vendor/psd.rb/spec/psd_spec.rb +37 -0
- data/vendor/psd.rb/spec/slices_spec.rb +57 -0
- data/vendor/psd.rb/spec/spec_helper.rb +13 -0
- data/vendor/psd.rb/spec/text_spec.rb +27 -0
- data/vendor/psd_native/Gemfile +4 -0
- data/vendor/psd_native/Guardfile +6 -0
- data/vendor/psd_native/LICENSE.txt +22 -0
- data/vendor/psd_native/README.md +48 -0
- data/vendor/psd_native/Rakefile +13 -0
- data/vendor/psd_native/ext/psd_native/blender.c +57 -0
- data/vendor/psd_native/ext/psd_native/blender.h +6 -0
- data/vendor/psd_native/ext/psd_native/canvas.c +9 -0
- data/vendor/psd_native/ext/psd_native/canvas.h +6 -0
- data/vendor/psd_native/ext/psd_native/clipping_mask.c +57 -0
- data/vendor/psd_native/ext/psd_native/clipping_mask.h +6 -0
- data/vendor/psd_native/ext/psd_native/color.c +20 -0
- data/vendor/psd_native/ext/psd_native/color.h +18 -0
- data/vendor/psd_native/ext/psd_native/compose.c +394 -0
- data/vendor/psd_native/ext/psd_native/compose.h +43 -0
- data/vendor/psd_native/ext/psd_native/extconf.rb +3 -0
- data/vendor/psd_native/ext/psd_native/file.c +20 -0
- data/vendor/psd_native/ext/psd_native/file.h +9 -0
- data/vendor/psd_native/ext/psd_native/image_mode_cmyk.c +64 -0
- data/vendor/psd_native/ext/psd_native/image_mode_cmyk.h +6 -0
- data/vendor/psd_native/ext/psd_native/image_mode_greyscale.c +27 -0
- data/vendor/psd_native/ext/psd_native/image_mode_greyscale.h +6 -0
- data/vendor/psd_native/ext/psd_native/image_mode_rgb.c +49 -0
- data/vendor/psd_native/ext/psd_native/image_mode_rgb.h +6 -0
- data/vendor/psd_native/ext/psd_native/layer_raw.c +20 -0
- data/vendor/psd_native/ext/psd_native/layer_raw.h +6 -0
- data/vendor/psd_native/ext/psd_native/mask.c +52 -0
- data/vendor/psd_native/ext/psd_native/mask.h +6 -0
- data/vendor/psd_native/ext/psd_native/psd_native_ext.c +87 -0
- data/vendor/psd_native/ext/psd_native/psd_native_ext.h +31 -0
- data/vendor/psd_native/ext/psd_native/rle_decoding.c +53 -0
- data/vendor/psd_native/ext/psd_native/rle_decoding.h +6 -0
- data/vendor/psd_native/ext/psd_native/util.c +17 -0
- data/vendor/psd_native/ext/psd_native/util.h +8 -0
- data/vendor/psd_native/lib/psd_native.rb +35 -0
- data/vendor/psd_native/lib/psd_native/compose.rb +19 -0
- data/vendor/psd_native/lib/psd_native/version.rb +3 -0
- data/vendor/psd_native/psd_native.gemspec +35 -0
- data/vendor/psd_native/spec/files/example.psd +0 -0
- data/vendor/psd_native/spec/files/one_layer.psd +0 -0
- data/vendor/psd_native/spec/files/path.psd +0 -0
- data/vendor/psd_native/spec/files/pixel.psd +0 -0
- data/vendor/psd_native/spec/files/simplest.psd +0 -0
- data/vendor/psd_native/spec/files/text.psd +0 -0
- data/vendor/psd_native/spec/image_spec.rb +86 -0
- data/vendor/psd_native/spec/psd_spec.rb +37 -0
- data/vendor/psd_native/spec/spec_helper.rb +13 -0
- data/vendor/psd_native/spec/util_spec.rb +15 -0
- metadata +767 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
#ifndef OILY_PNG_RESAMPLING_H
|
2
|
+
#define OILY_PNG_RESAMPLING_H
|
3
|
+
|
4
|
+
/*
|
5
|
+
* Generates the interpolation steps (nearest neighbour) through two values.
|
6
|
+
*/
|
7
|
+
void oily_png_generate_steps_residues(long width, long new_width, long *steps, long *residues);
|
8
|
+
|
9
|
+
/*
|
10
|
+
* Generates the interpolation steps through two values.
|
11
|
+
*
|
12
|
+
* Returns a Ruby Array
|
13
|
+
*/
|
14
|
+
VALUE oily_png_canvas_steps_residues(VALUE self, VALUE width, VALUE new_width);
|
15
|
+
VALUE oily_png_canvas_steps(VALUE self, VALUE width, VALUE new_width);
|
16
|
+
|
17
|
+
|
18
|
+
/*
|
19
|
+
* Performs nearest neighbor interpolation on the Canvas
|
20
|
+
*/
|
21
|
+
VALUE oily_png_canvas_resample_nearest_neighbor_bang(VALUE self, VALUE new_width, VALUE new_height);
|
22
|
+
|
23
|
+
VALUE oily_png_canvas_resample_bilinear_bang(VALUE self, VALUE new_width, VALUE new_height);
|
24
|
+
|
25
|
+
#endif
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'chunky_png'
|
2
|
+
|
3
|
+
module OilyPNG
|
4
|
+
def self.included(base)
|
5
|
+
base::Canvas.send(:extend, OilyPNG::PNGDecoding)
|
6
|
+
base::Canvas.send(:include, OilyPNG::PNGEncoding)
|
7
|
+
|
8
|
+
|
9
|
+
base::Color.send(:include, OilyPNG::Color)
|
10
|
+
|
11
|
+
base::Color.extend OilyPNG::Color
|
12
|
+
base::Canvas.send(:include, OilyPNG::Resampling)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
require 'oily_png/version'
|
17
|
+
require 'oily_png/oily_png'
|
18
|
+
require 'oily_png/canvas'
|
19
|
+
|
20
|
+
# Include mixin into ChunkyPNG
|
21
|
+
ChunkyPNG.send(:include, OilyPNG)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'chunky_png'
|
2
|
+
require 'oily_png/oily_png'
|
3
|
+
|
4
|
+
module OilyPNG
|
5
|
+
class Canvas < ChunkyPNG::Canvas
|
6
|
+
extend OilyPNG::PNGDecoding
|
7
|
+
include OilyPNG::PNGEncoding
|
8
|
+
include OilyPNG::Operations
|
9
|
+
include OilyPNG::Resampling
|
10
|
+
end
|
11
|
+
|
12
|
+
module Color
|
13
|
+
extend self
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'oily_png/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = 'oily_png'
|
9
|
+
s.rubyforge_project = s.name
|
10
|
+
|
11
|
+
# Do not change the version and date fields by hand. This will be done
|
12
|
+
# automatically by the gem release script.
|
13
|
+
s.version = OilyPNG::VERSION
|
14
|
+
|
15
|
+
s.summary = "Native mixin to speed up ChunkyPNG"
|
16
|
+
s.description = <<-EOT
|
17
|
+
This Ruby C extenstion defines a module that can be included into ChunkyPNG to improve its speed.
|
18
|
+
EOT
|
19
|
+
|
20
|
+
s.license = 'MIT'
|
21
|
+
s.authors = ['Willem van Bergen']
|
22
|
+
s.email = ['willem@railsdoctors.com']
|
23
|
+
s.homepage = 'http://wiki.github.com/wvanbergen/oily_png'
|
24
|
+
|
25
|
+
s.extensions = ["ext/oily_png/extconf.rb"]
|
26
|
+
s.require_paths = ["lib", "ext"]
|
27
|
+
|
28
|
+
s.add_runtime_dependency('chunky_png', '~> 1.3.0')
|
29
|
+
|
30
|
+
s.add_development_dependency('rake')
|
31
|
+
s.add_development_dependency('rake-compiler')
|
32
|
+
s.add_development_dependency('rspec', '~> 2')
|
33
|
+
|
34
|
+
s.rdoc_options << '--title' << s.name << '--main' << 'README.rdoc' << '--line-numbers' << '--inline-source'
|
35
|
+
s.extra_rdoc_files = ['README.rdoc']
|
36
|
+
|
37
|
+
s.files = `git ls-files`.split($/)
|
38
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
39
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OilyPNG::Color do
|
4
|
+
|
5
|
+
include OilyPNG::Color
|
6
|
+
|
7
|
+
before(:each) do
|
8
|
+
@white = 0xffffffff
|
9
|
+
@black = 0x000000ff
|
10
|
+
@opaque = 0x0a6496ff
|
11
|
+
@non_opaque = 0x0a649664
|
12
|
+
@fully_transparent = 0x0a649600
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '#compose_quick' do
|
16
|
+
|
17
|
+
it "should use the foregorund color as is when the background color is fully transparent" do
|
18
|
+
compose_quick(@non_opaque, @fully_transparent).should == @non_opaque
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should use the foregorund color as is when an opaque color is given as foreground color" do
|
22
|
+
compose_quick(@opaque, @white).should == @opaque
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should use the background color as is when a fully transparent pixel is given as foreground color" do
|
26
|
+
compose_quick(@fully_transparent, @white).should == @white
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should compose pixels correctly" do
|
30
|
+
compose_quick(@non_opaque, @white).should == 0x9fc2d6ff
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should compose colors exactly the same as ChunkyPNG" do
|
34
|
+
fg, bg = rand(0xffffffff), rand(0xffffffff)
|
35
|
+
compose_quick(fg, bg).should == ChunkyPNG::Color.compose_quick(fg, bg)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OilyPNG::PNGDecoding do
|
4
|
+
|
5
|
+
it "should call ChunkyPNG::Color.pixel_bytesize in the pure ruby version" do
|
6
|
+
ChunkyPNG::Color.should_receive(:pixel_bytesize).and_return(3)
|
7
|
+
ChunkyPNG::Canvas.from_file(resource_file('square.png'))
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should not call ChunkyPNG::Color.pixel_bytesize in the native version" do
|
11
|
+
ChunkyPNG::Color.should_not_receive(:pixel_bytesize)
|
12
|
+
OilyPNG::Canvas.from_file(resource_file('square.png'))
|
13
|
+
end
|
14
|
+
|
15
|
+
context 'decoding different filtering methods' do
|
16
|
+
before(:all) { @reference = ChunkyPNG::Canvas.from_file(resource_file('nonsquare.png'))}
|
17
|
+
|
18
|
+
it "should decode NONE filtering exactly the same as ChunkyPNG" do
|
19
|
+
filtered_data = @reference.to_blob(:filtering => ChunkyPNG::FILTER_NONE)
|
20
|
+
ChunkyPNG::Canvas.from_blob(filtered_data).should == OilyPNG::Canvas.from_blob(filtered_data)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should decode SUB filtering exactly the same as ChunkyPNG" do
|
24
|
+
filtered_data = @reference.to_blob(:filtering => ChunkyPNG::FILTER_SUB)
|
25
|
+
ChunkyPNG::Canvas.from_blob(filtered_data).should == OilyPNG::Canvas.from_blob(filtered_data)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should decode UP filtering exactly the same as ChunkyPNG" do
|
29
|
+
filtered_data = @reference.to_blob(:filtering => ChunkyPNG::FILTER_UP)
|
30
|
+
ChunkyPNG::Canvas.from_blob(filtered_data).should == OilyPNG::Canvas.from_blob(filtered_data)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should decode AVERAGE filtering exactly the same as ChunkyPNG" do
|
34
|
+
filtered_data = @reference.to_blob(:filtering => ChunkyPNG::FILTER_AVERAGE)
|
35
|
+
ChunkyPNG::Canvas.from_blob(filtered_data).should == OilyPNG::Canvas.from_blob(filtered_data)
|
36
|
+
end
|
37
|
+
|
38
|
+
it "should decode PAETH filtering exactly the same as ChunkyPNG" do
|
39
|
+
filtered_data = @reference.to_blob(:filtering => ChunkyPNG::FILTER_PAETH)
|
40
|
+
ChunkyPNG::Canvas.from_blob(filtered_data).should == OilyPNG::Canvas.from_blob(filtered_data)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
context 'decoding compatibility with ChunkyPNG' do
|
45
|
+
resource_files.each do |file|
|
46
|
+
it "should #{File.basename(file)} the same as ChunkyPNG" do
|
47
|
+
OilyPNG::Canvas.from_file(file).pixels.should == ChunkyPNG::Canvas.from_file(file).pixels
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,135 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OilyPNG::PNGEncoding do
|
4
|
+
|
5
|
+
context 'encoding different color settings without palette' do
|
6
|
+
before do
|
7
|
+
@canvas = ChunkyPNG::Canvas.from_file(resource_file('gray.png'))
|
8
|
+
@oily_canvas = OilyPNG::Canvas.from_canvas(@canvas)
|
9
|
+
end
|
10
|
+
|
11
|
+
it "should encode an image using 8-bit grayscale correctly" do
|
12
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_GRAYSCALE, 8, ChunkyPNG::FILTER_NONE)
|
13
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_GRAYSCALE, 8, ChunkyPNG::FILTER_NONE)
|
14
|
+
stream1.should == stream2
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should encode an image using 4-bit grayscale correctly" do
|
18
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_GRAYSCALE, 4, ChunkyPNG::FILTER_NONE)
|
19
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_GRAYSCALE, 4, ChunkyPNG::FILTER_NONE)
|
20
|
+
stream1.should == stream2
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should encode an image using 2-bit grayscale correctly" do
|
24
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_GRAYSCALE, 2, ChunkyPNG::FILTER_NONE)
|
25
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_GRAYSCALE, 2, ChunkyPNG::FILTER_NONE)
|
26
|
+
stream1.should == stream2
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should encode an image using 1-bit grayscale correctly" do
|
30
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_GRAYSCALE, 1, ChunkyPNG::FILTER_NONE)
|
31
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_GRAYSCALE, 1, ChunkyPNG::FILTER_NONE)
|
32
|
+
stream1.should == stream2
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should encode an image using 8-bit grayscale alpha correctly" do
|
36
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_GRAYSCALE_ALPHA, 8, ChunkyPNG::FILTER_NONE)
|
37
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_GRAYSCALE_ALPHA, 8, ChunkyPNG::FILTER_NONE)
|
38
|
+
stream1.should == stream2
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should encode an image using 8-bit truecolor correctly" do
|
42
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR, 8, ChunkyPNG::FILTER_NONE)
|
43
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR, 8, ChunkyPNG::FILTER_NONE)
|
44
|
+
stream1.should == stream2
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should encode an image using 8-bit truecolor alpha correctly" do
|
48
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR_ALPHA, 8, ChunkyPNG::FILTER_NONE)
|
49
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR_ALPHA, 8, ChunkyPNG::FILTER_NONE)
|
50
|
+
stream1.should == stream2
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
context 'encoding with paletted images using different bitrates' do
|
55
|
+
before do
|
56
|
+
@canvas = ChunkyPNG::Canvas.from_file(resource_file('gray.png'))
|
57
|
+
@oily_canvas = OilyPNG::Canvas.from_canvas(@canvas)
|
58
|
+
|
59
|
+
@canvas.encoding_palette = @canvas.palette
|
60
|
+
@canvas.encoding_palette.to_plte_chunk
|
61
|
+
|
62
|
+
@oily_canvas.encoding_palette = @oily_canvas.palette
|
63
|
+
@oily_canvas.encoding_palette.to_plte_chunk
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should encode an image using 8-bit indexed colors correctly" do
|
67
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_INDEXED, 8, ChunkyPNG::FILTER_NONE)
|
68
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_INDEXED, 8, ChunkyPNG::FILTER_NONE)
|
69
|
+
stream1.should == stream2
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should encode an image using 4-bit indexed colors correctly" do
|
73
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_INDEXED, 4, ChunkyPNG::FILTER_NONE)
|
74
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_INDEXED, 4, ChunkyPNG::FILTER_NONE)
|
75
|
+
stream1.should == stream2
|
76
|
+
end
|
77
|
+
|
78
|
+
it "should encode an image using 2-bit indexed colors correctly" do
|
79
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_INDEXED, 2, ChunkyPNG::FILTER_NONE)
|
80
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_INDEXED, 2, ChunkyPNG::FILTER_NONE)
|
81
|
+
stream1.should == stream2
|
82
|
+
end
|
83
|
+
|
84
|
+
it "should encode an image using 1-bit indexed colors correctly" do
|
85
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_INDEXED, 1, ChunkyPNG::FILTER_NONE)
|
86
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_INDEXED, 1, ChunkyPNG::FILTER_NONE)
|
87
|
+
stream1.should == stream2
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
context 'encoding different filters' do
|
92
|
+
before do
|
93
|
+
@canvas = ChunkyPNG::Canvas.from_file(resource_file('nonsquare.png'))
|
94
|
+
@oily_canvas = OilyPNG::Canvas.from_canvas(@canvas)
|
95
|
+
end
|
96
|
+
|
97
|
+
it "should encode correctly with no filtering" do
|
98
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR, 8, ChunkyPNG::FILTER_NONE)
|
99
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR, 8, ChunkyPNG::FILTER_NONE)
|
100
|
+
stream1.should == stream2
|
101
|
+
end
|
102
|
+
|
103
|
+
it "should encode correctly with sub filtering" do
|
104
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR, 8, ChunkyPNG::FILTER_SUB)
|
105
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR, 8, ChunkyPNG::FILTER_SUB)
|
106
|
+
stream1.should == stream2
|
107
|
+
end
|
108
|
+
|
109
|
+
it "should encode correctly with up filtering" do
|
110
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR, 8, ChunkyPNG::FILTER_UP)
|
111
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR, 8, ChunkyPNG::FILTER_UP)
|
112
|
+
stream1.should == stream2
|
113
|
+
end
|
114
|
+
|
115
|
+
it "should encode correctly with average filtering" do
|
116
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR, 8, ChunkyPNG::FILTER_AVERAGE)
|
117
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR, 8, ChunkyPNG::FILTER_AVERAGE)
|
118
|
+
stream1.should == stream2
|
119
|
+
end
|
120
|
+
|
121
|
+
it "should encode correctly with paeth filtering" do
|
122
|
+
@oily_canvas.send(:encode_png_image_pass_to_stream, stream1 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR, 8, ChunkyPNG::FILTER_PAETH)
|
123
|
+
@canvas.send(:encode_png_image_pass_to_stream, stream2 = ChunkyPNG::Datastream.empty_bytearray, ChunkyPNG::COLOR_TRUECOLOR, 8, ChunkyPNG::FILTER_PAETH)
|
124
|
+
stream1.should == stream2
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
it "should encode an interlaced image correctly" do
|
129
|
+
canvas = ChunkyPNG::Canvas.from_file(resource_file('interlaced.png'))
|
130
|
+
data = OilyPNG::Canvas.from_canvas(canvas).to_blob(:interlace => true)
|
131
|
+
ds = ChunkyPNG::Datastream.from_blob(data)
|
132
|
+
ds.header_chunk.interlace.should == ChunkyPNG::INTERLACING_ADAM7
|
133
|
+
ChunkyPNG::Canvas.from_datastream(ds).should == canvas
|
134
|
+
end
|
135
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OilyPNG::Operations do
|
4
|
+
|
5
|
+
describe '#compose!' do
|
6
|
+
subject { oily_reference_canvas('operations') }
|
7
|
+
|
8
|
+
it "should compose two images without offset exactly the same way as ChunkyPNG" do
|
9
|
+
subcanvas = ChunkyPNG::Canvas.new(4, 8, ChunkyPNG::Color.rgba(0, 0, 0, 75))
|
10
|
+
subject.compose!(subcanvas)
|
11
|
+
ChunkyPNG::Canvas.from_canvas(subject).should == reference_canvas('operations').compose(subcanvas)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "should compose two images with offset exactly the same way as ChunkyPNG" do
|
15
|
+
subject.compose!(ChunkyPNG::Canvas.new(4, 8, ChunkyPNG::Color.rgba(0, 0, 0, 75)), 8, 4)
|
16
|
+
subject.should == oily_reference_canvas('composited')
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should return itself" do
|
20
|
+
subject.compose!(OilyPNG::Canvas.new(1,1)).should equal(subject)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should raise an exception when the pixels to compose fall outside the image" do
|
24
|
+
# For now this raises a runtime error, but it should probably raise a ChunkyPNG::OutOfBounds error
|
25
|
+
lambda { subject.compose!(OilyPNG::Canvas.new(1,1), 16, 16) }.should raise_error
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe '#replace!' do
|
30
|
+
subject { oily_reference_canvas('operations') }
|
31
|
+
|
32
|
+
it "should compose two images without offset exactly the same way as ChunkyPNG" do
|
33
|
+
subcanvas = ChunkyPNG::Canvas.new(3, 2, ChunkyPNG::Color.rgb(200, 255, 0))
|
34
|
+
subject.replace!(subcanvas)
|
35
|
+
ChunkyPNG::Canvas.from_canvas(subject).should == reference_canvas('operations').replace(subcanvas)
|
36
|
+
end
|
37
|
+
|
38
|
+
it "should compose two images with offset exactly the same way as ChunkyPNG" do
|
39
|
+
subject.replace!(ChunkyPNG::Canvas.new(3, 2, ChunkyPNG::Color.rgb(200, 255, 0)), 5, 4)
|
40
|
+
subject.should == oily_reference_canvas('replaced')
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should return itself" do
|
44
|
+
subject.replace!(OilyPNG::Canvas.new(1,1)).should equal(subject)
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should raise an exception when the pixels to compose fall outside the image" do
|
48
|
+
# For now this raises a runtime error, but it should probably raise a ChunkyPNG::OutOfBounds error
|
49
|
+
lambda { subject.replace!(OilyPNG::Canvas.new(1,1), 16, 16) }.should raise_error
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe OilyPNG::Resampling do
|
4
|
+
|
5
|
+
include OilyPNG::Resampling
|
6
|
+
|
7
|
+
describe '#steps' do
|
8
|
+
it "should generate the steps from 4 to 8 as [0,0,1,1,2,2,3,3]" do
|
9
|
+
steps(4,8).should == [0,0,1,1,2,2,3,3]
|
10
|
+
end
|
11
|
+
|
12
|
+
it "should generate the steps the same as ChunkyPNG" do
|
13
|
+
image = ChunkyPNG::Image.new(1,1)
|
14
|
+
steps(2,8).should == image.send(:steps,2,8)
|
15
|
+
steps(2,11).should == image.send(:steps,2,11)
|
16
|
+
steps(11,5).should == image.send(:steps,11,5)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe '#resample_nearest_neighbor!' do
|
21
|
+
before(:all) { @reference = ChunkyPNG::Canvas.from_file(resource_file('nonsquare.png'))}
|
22
|
+
|
23
|
+
it "should resample [0,1,2,3] to 4x4 properly" do
|
24
|
+
OilyPNG::Canvas.new(2,2,[0,1,2,3]).resample_nearest_neighbor(4,4).should == OilyPNG::Canvas.new(4,4,[0,0,1,1,0,0,1,1,2,2,3,3,2,2,3,3])
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should resample [0,1,2,3] to 99x45 as ChunkyPNG does" do
|
28
|
+
ChunkyPNG::Canvas.new(2,2,[0,1,2,3]).resample_nearest_neighbor(99,45).should == OilyPNG::Canvas.new(2,2,[0,1,2,3]).resample_nearest_neighbor(99,45)
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should resample an image to 10x20 as ChunkyPNG does" do
|
32
|
+
@reference.resample_nearest_neighbor(10,20).should == OilyPNG::Canvas.from_canvas(@reference).resample_nearest_neighbor(10,20)
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should resample an image to 11x19 as ChunkyPNG does" do
|
36
|
+
@reference.resample_nearest_neighbor(11,19).should == OilyPNG::Canvas.from_canvas(@reference).resample_nearest_neighbor(11,19)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe '#resample_bilinear!' do
|
41
|
+
before(:all) { @reference = ChunkyPNG::Canvas.from_file(resource_file('nonsquare.png'))}
|
42
|
+
|
43
|
+
it "should resample an image to 10x20 as ChunkyPNG does" do
|
44
|
+
@reference.resample_bilinear(10,20).should == OilyPNG::Canvas.from_canvas(@reference).resample_bilinear(10,20)
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should resample an image to 11x19 as ChunkyPNG does" do
|
48
|
+
@reference.resample_bilinear(11,19).should == OilyPNG::Canvas.from_canvas(@reference).resample_bilinear(11,19)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
Binary file
|
Binary file
|