Permalink
Browse files

presetup

  • Loading branch information...
1 parent f3b644f commit 0b68423f1a370461530984bb83dc0e1a0028b2ad @stanislaw stanislaw committed Jun 25, 2012
View
11 Gemfile
@@ -5,10 +5,13 @@ source "http://rubygems.org"
# Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc.
+gem 'ruby-vips'
+gem 'rmagick'
+
group :development do
- gem "rspec", "~> 2.8.0"
- gem "rdoc", "~> 3.12"
- gem "bundler", "~> 1.0.0"
+ # gem "rspec", "~> 2.8.0"
+ # gem "rdoc", "~> 3.12"
+ gem "bundler"
gem "jeweler", "~> 1.8.3"
- gem "rcov", ">= 0"
+ # gem "rcov", ">= 0"
end
View
@@ -0,0 +1,24 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ git (1.2.5)
+ jeweler (1.8.4)
+ bundler (~> 1.0)
+ git (>= 1.2.5)
+ rake
+ rdoc
+ json (1.7.3)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ rmagick (2.13.1)
+ ruby-vips (0.1.1)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ bundler
+ jeweler (~> 1.8.3)
+ rmagick
+ ruby-vips
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
No changes.
View
@@ -0,0 +1,17 @@
+#!/usr/bin/ruby
+
+require 'rubygems'
+require 'RMagick'
+
+include Magick
+
+puts Magick::Long_version
+
+im = ImageList.new(ARGV[0])
+
+im = im.shave(100, 100)
+im = im.scale(0.9)
+kernel = [-1, -1, -1, -1, 16, -1, -1, -1, -1]
+im = im.convolve(3, kernel)
+
+im.write(ARGV[1])
View
@@ -0,0 +1,22 @@
+#!/usr/bin/ruby
+
+require 'rubygems'
+require 'vips'
+
+puts "Ruby-vips #{VIPS::VERSION}"
+
+include VIPS
+
+im = Image.new(ARGV[0])
+
+im = im.extract_area(100, 100, im.x_size - 200, im.y_size - 200)
+im = im.affinei(:bilinear, 0.9, 0, 0, 0.9, 0, 0)
+mask = [
+ [-1, -1, -1],
+ [-1, 16, -1,],
+ [-1, -1, -1]
+]
+m = Mask.new mask, 8, 0
+im = im.conv(m)
+
+im.write(ARGV[1])
View
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# echo "Ruby-vips"
+
+time ruby ruby/ruby-vips.rb images/huge.jpg images/huge_output.jpg
+
+echo
+# echo "RMagick"
+
+time ruby ruby/rmagick.rb images/huge.jpg images/huge_output.jpg
@@ -1,7 +0,0 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
-
-describe "RubyVipsBenchmarks" do
- it "fails" do
- fail "hey buddy, you should probably rename this file and start specing for real"
- end
-end
View
@@ -1,12 +0,0 @@
-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
-$LOAD_PATH.unshift(File.dirname(__FILE__))
-require 'rspec'
-require 'ruby-vips-benchmarks'
-
-# Requires supporting files with custom matchers and macros, etc,
-# in ./support/ and its subdirectories.
-Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
-
-RSpec.configure do |config|
-
-end

0 comments on commit 0b68423

Please sign in to comment.