catpix_mini 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +22 -9
- data/img/benchmark.jpg +0 -0
- data/lib/catpix_mini/private.rb +1 -1
- data/lib/catpix_mini/version.rb +1 -1
- metadata +2 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 0bc8d5334f7b77bb8f0c68953cf19c62741003ca
         | 
| 4 | 
            +
              data.tar.gz: ed5aeffb958c1db66fc3dbfe2d622c5d524be086
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 34baa5e8b5f8a2adc24b208120ea7c42c5861bdef85f071947b640524556496e66e2c09def65bd430ffb4895eadad47cfcf63ac7d9702e9911ce02dcebbd3048
         | 
| 7 | 
            +
              data.tar.gz: a72af0d8cbef4a902e067af1b7588c3e60605047744784e4fb0ba9778726b067bcef5197b26df8a708fe742715a882cdeb9a03614524d7d93e84e8f86896532b
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -2,18 +2,26 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            Renders images in the terminal.
         | 
| 4 4 |  | 
| 5 | 
            -
             | 
| 5 | 
            +
            This project is a "port" from [pazdera's catpix repo](https://github.com/pazdera/catpix). 
         | 
| 6 6 |  | 
| 7 | 
            -
             | 
| 8 | 
            -
            The original project is based on RMagick while this one is based on MiniMagick. I was spending
         | 
| 9 | 
            -
            time finding solutions with MiniMagick but could not find any hence I decided to port from the
         | 
| 10 | 
            -
            original.
         | 
| 7 | 
            +
            The original project is based on RMagick while this one is compatible with MiniMagick. I made this project in hope that MiniMagick would speed up the original gem and some other mini-magick fans will be able to use this awesome feature in their minimagick projects.
         | 
| 11 8 |  | 
| 9 | 
            +
            I would probably switch over to rmagick for serious projects in the future. I just did not want to invest effort in switching from mini-magick to rmagick in my main app so I think this 1 day work is pretty useful.
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            ## Example
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                $ catpix_mini pokemon.gif
         | 
| 14 | 
            +
                
         | 
| 12 15 | 
             
            
         | 
| 13 16 |  | 
| 14 | 
            -
            ## More examples
         | 
| 17 | 
            +
            ## More examples and options
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                $ catpix_mini panda.png -c xy
         | 
| 20 | 
            +
                $ catpix_mini trophy.png -w 0.5 -h 0.5
         | 
| 21 | 
            +
                $ catpix_mini tux.png -c xy -r high # enforce high resolution
         | 
| 15 22 |  | 
| 16 | 
            -
            For more examples and APIs please check out [pazdera's catpix repo](https://github.com/pazdera/catpix).  | 
| 23 | 
            +
            For more examples and APIs please check out [pazdera's catpix repo](https://github.com/pazdera/catpix). 
         | 
| 24 | 
            +
            They should be very similar at this point except that the binary name is changed from `catpix` to `catpix_mini`.
         | 
| 17 25 |  | 
| 18 26 | 
             
            ## Performances
         | 
| 19 27 |  | 
| @@ -25,7 +33,7 @@ has upper advantage when rendering large image while catpix is slightly faster f | |
| 25 33 | 
             
                time catpix ./img/benchmark.jpg  
         | 
| 26 34 | 
             
                48.25s user 0.56s system 87% cpu 55.578 total
         | 
| 27 35 |  | 
| 28 | 
            -
                catpix_mini ./img/benchmark.jpg  
         | 
| 36 | 
            +
                time catpix_mini ./img/benchmark.jpg  
         | 
| 29 37 | 
             
                42.26s user 0.76s system 83% cpu 51.647 total
         | 
| 30 38 |  | 
| 31 39 |  | 
| @@ -36,11 +44,16 @@ more proper tests and let me know your results. | |
| 36 44 |  | 
| 37 45 | 
             
            ## Quality
         | 
| 38 46 |  | 
| 39 | 
            -
            RMagick return pixels colours in  | 
| 47 | 
            +
            RMagick return pixels' colours in `16-bit` by default while MiniMagick colour is only `8-bit` therefor the
         | 
| 40 48 | 
             
            quality at high-res looks slightly better in catpix compared to catpix-mini.
         | 
| 41 49 |  | 
| 42 50 | 
             
            Only slightly because the quality printed out to terminal is not too insanely detailed to begin with.
         | 
| 43 51 |  | 
| 52 | 
            +
            ## Transparency
         | 
| 53 | 
            +
             | 
| 54 | 
            +
            Due to the performance advantage is not too impressive, I have not invested time to do pixel reading per pixel to detect alpha channel for the image. Therefor transparent images printed out by catpix_mini will be in white-background.
         | 
| 55 | 
            +
             | 
| 56 | 
            +
            Another disadvantage of mini-magick.
         | 
| 44 57 |  | 
| 45 58 | 
             
            ## About Me
         | 
| 46 59 |  | 
    
        data/img/benchmark.jpg
    ADDED
    
    | Binary file | 
    
        data/lib/catpix_mini/private.rb
    CHANGED
    
    
    
        data/lib/catpix_mini/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: catpix_mini
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Radek Pazdera
         | 
| @@ -143,6 +143,7 @@ files: | |
| 143 143 | 
             
            - Rakefile
         | 
| 144 144 | 
             
            - bin/catpix_mini
         | 
| 145 145 | 
             
            - catpix_mini.gemspec
         | 
| 146 | 
            +
            - img/benchmark.jpg
         | 
| 146 147 | 
             
            - lib/catpix_mini.rb
         | 
| 147 148 | 
             
            - lib/catpix_mini/private.rb
         | 
| 148 149 | 
             
            - lib/catpix_mini/version.rb
         |