imagecr

Version, currently master branch1 version
  • master branchlatestJul 28, 2019

github.com/taylorfinnell/imagecr

Quickly determine image types and attributes in Crystal

2 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  imagecr:
    github: taylorfinnell/imagecr
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.29.0
License
MIT
Author
Taylor Finnell

Dependencies

This version declares no dependencies.

README

imagecr

Build Status

Image.cr is a shard to quickly and performantly identify an image type and basic attributes of the image.

Installation

Add this to your application's shard.yml:

dependencies:
  imagecr:
    github: taylorfinnell/imagecr

Supported Image Types

  • TIFF
  • GIF
  • BMP
  • PNG
  • PSD

Usage

require "imagecr"

Open from a URL.

image = Imagecr.open("http://someserver.com/test.png")
image.type   # => "png"
image.width  # => 100
image.height # => 100

Open from a local file.

image = Imagecr.open("~/Downloads/test.png")
image.type   # => "png"
image.width  # => 100
image.height # => 100