Permalink
Commits on Nov 11, 2016
  1. Bump to version 1.3.8

    committed Nov 11, 2016
  2. Merge pull request #118 from kobsy/write-phys

    Include the physical chunk when enumerating chunks
    committed on GitHub Nov 11, 2016
Commits on Nov 9, 2016
Commits on Sep 26, 2016
  1. Merge pull request #115 from cph/support-pHYs

    Added support for parsing the physical dimensions of a PNG’s pixels
    committed on GitHub Sep 26, 2016
Commits on Sep 25, 2016
  1. Raised UnitsUnknown when attempting to get the DPI of a PNG whose phy…

    …sical dimensions have no units specified
    boblail committed Sep 25, 2016
Commits on Sep 19, 2016
Commits on Aug 31, 2016
  1. Bump to version 1.3.7

    committed Aug 31, 2016
  2. Merge pull request #112 from wvanbergen/transparency_cleanup

    Bugfix: make decoding_palette and transparent_color variables that get passed along instead of instance variables.
    committed on GitHub Aug 31, 2016
Commits on Aug 30, 2016
  1. Merge pull request #113 from wvanbergen/euclidean-distance-shortcut

    Add shortcut in euclidean_distance_rgba
    committed on GitHub Aug 30, 2016
Commits on Aug 29, 2016
  1. Add shortcut in euclidean_distance_rgba

    If the pixels are the same, the Euclidean distance will always be 0.0.
    We can save a bunch of function calls and maths if we take this
    shortcut.
    lencioni committed Aug 29, 2016
Commits on Jun 23, 2016
  1. Bugfix: make decoding_palette and transparent_color variables that ar…

    …e passed along while decoding instead of instance variables.
    committed Jun 23, 2016
Commits on Jun 19, 2016
  1. Update CHANGELOG.

    committed Jun 19, 2016
  2. Bump to version 1.3.6

    committed Jun 19, 2016
  3. Merge pull request #111 from wvanbergen/fix_reading_streams_with_trai…

    …ling_bytes
    
    Fix reading streams with trailing data
    committed on GitHub Jun 19, 2016
  4. Stop reading from a stream after the IEND chunk has been seen, instea…

    …d of until EOF. This prevents a stream with trailing data to raise an exception failed error.
    committed Jun 19, 2016
Commits on Apr 13, 2016
  1. Merge pull request #109 from jeremyevans/master

    Work with ruby 2.3's --enable-frozen-string-literal
    committed Apr 13, 2016
Commits on Apr 12, 2016
  1. Work with ruby 2.3's --enable-frozen-string-literal

    These changes are the minimal ones necessary to allow Rodauth's specs
    to pass. There may well be other changes that are required.
    jeremyevans committed Apr 12, 2016
Commits on Dec 16, 2015
Commits on Oct 29, 2015
  1. Clean up readme a bit

    Linkifying some URLs and some other small punctuation, formatting, and
    grammar tweaks.
    lencioni committed Oct 29, 2015
  2. Fix filesize benchmark

    This benchmark was broken since f050b85 which removed the
    clock_stubbed.png file. I decided to fix this by changing the reference
    to a file that currently exists.
    lencioni committed Oct 29, 2015
  3. Fix heading in readme

    When I converted this document from rdoc to markdown, I missed this
    heading.
    lencioni committed Oct 29, 2015
  4. Merge pull request #104 from lencioni/markdown

    Convert readme from rdoc to markdown
    lencioni committed Oct 29, 2015
Commits on Oct 28, 2015
  1. Update year in LICENSE

    It is almost 2016.
    lencioni committed Oct 28, 2015
  2. Convert readme from rdoc to markdown

    This allows us to have syntax highlighting when viewing this document on
    GitHub. I believe that this will also work for the rdoc.info site.
    lencioni committed Oct 28, 2015
  3. Bump version to 1.3.5

    committed Oct 28, 2015
  4. Use SVG for build status badge in README

    Since SVG is vector format, it will look much better, especially on
    higher density displays.
    lencioni committed Oct 28, 2015
  5. Merge pull request #103 from lencioni/zlib

    Microoptimize ImageData.combine_chunks
    committed Oct 28, 2015
  6. Microoptimize ImageData.combine_chunks

    When doing some memory profiling, I noticed that this line was
    allocating by far the most memory in my application. Looking for a way
    to bring this down a little, I discovered that we can avoid building and
    joining our own array here by just pushing onto the stream directly.
    
    Using memory_profiler in my application, this appears to bring memory
    allocation down from 1,158,307,467 bytes (499,055 objects) to
    1,154,056,455 bytes (498,849 objects), which is a difference of
    4,251,012 bytes (roughly 4 MiB). While not the juicy win I'd really like
    to see here, it seems like a simple enough change for the payoff.
    
    I did see slightly worse memory usage for the smallest of images due to
    the overhead of allocating the memory for instantiating the
    Zlib::Inflate class, but I think this is a worthwhile tradeoff.
    lencioni committed Oct 28, 2015
  7. Merge pull request #102 from lencioni/croptimization

    Optimize crop! when only cropping top/bottom
    committed Oct 28, 2015
  8. Optimize crop! when only cropping top/bottom

    I am working on a project where cropping performance is critical. There
    are some situations where we only need to crop to the tops and/or
    bottoms of images and I noticed an opportunity to take a shortcut to get
    some perf gains.
    
    I generated the cropped_height.png reference image by running
    operations.png through imagemagick with the following command:
    
      convert operations.png -crop 16x8+0+5 cropped_height.png
    
    I tested the performance improvement in a little benchmark:
    
    ```
    require 'benchmark'
    
    pixels = []
    width = 2000
    height = 2000
    (width * height).times { pixels << rand }
    
    crop_opts = [0, 100, 2000, 1000]
    x, y, crop_width, crop_height = crop_opts
    
    n = 10
    Benchmark.bmbm do |b|
      b.report('baseline:') do
        n.times do
          new_pixels = []
          for cy in 0...crop_height do
            new_pixels.concat pixels.slice((cy + y) * width + x, crop_width)
          end
        end
      end
    
      b.report('optimized:') do
        n.times do
          pixels.slice(y * width, width * crop_height)
        end
      end
    end
    ```
    
    The results of this show very good improvement:
    
    Rehearsal ---------------------------------------------
    baseline:   0.080000   0.070000   0.150000 (  0.144634)
    optimized:  0.000000   0.000000   0.000000 (  0.000006)
    ------------------------------------ total: 0.150000sec
    
                    user     system      total        real
    baseline:   0.050000   0.070000   0.120000 (  0.126334)
    optimized:  0.000000   0.000000   0.000000 (  0.000008)
    lencioni committed Oct 28, 2015
  9. Organize #crop! spec examples

    I am about to modify the behavior of crop! so that it takes an optimized
    path when it doesn't need to crop the width of the image. Before I do
    this, I want to organize these specs a little better to make the diff of
    the addition of my new specs easier to see.
    lencioni committed Oct 28, 2015