imagecr

Quickly determine image types and attributes in Crystal

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
Repository

imagecr

Owner
Statistic
  • 2
  • 0
  • 0
  • 0
  • 0
  • over 5 years ago
  • October 23, 2017
License

MIT License

Links
Synced at

Sat, 21 Dec 2024 19:16:08 GMT

Languages