Skip to content

Quickly determine image types and attributes in Crystal

License

Notifications You must be signed in to change notification settings

taylorfinnell/imagecr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Quickly determine image types and attributes in Crystal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published