Skip to content

keizo042/mruby-jpeg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mruby-jpeg

Note: This is a work in progress, only supports reads right now

Support for reading JPEGs in mruby using libjpeg.

Installation

In the mruby directory add the following to your build config:

MRuby::Build.new do |conf|

  conf.gem :git => 'git://github.com/carsonmcdonald/mruby-jpeg.git', :branch => 'master'

end

or

In the mruby directory:

mkdir mrbgems
cd mrbgems
git clone git://github.com/carsonmcdonald/mruby-jpeg.git

Then in your build config add:

MRuby::Build.new do |conf|
  
  conf.gem 'mrbgems/mruby-jpeg'

end

Example Use

jpeg = JPEG.read("test.jpg")
# Raw jpeg data found in jpeg.data

Options

You can pass the following options when reading a JPEG file:

  • :force_grayscale - Force the image to be read in grayscale

License

MIT - See LICENSE

About

JPEG support for mruby using libjpeg

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 60.8%
  • Ruby 39.2%