Skip to content
Browse files

Added BGR support

  • Loading branch information...
1 parent 97ffecd commit 25fd747174ca27b49fcd56fa62a40cfe30d8a3c6 @wedesoft committed Jun 6, 2011
Showing with 6 additions and 6 deletions.
  1. +1 −1 Rakefile
  2. +1 −1 ext/colourspace.cc
  3. +4 −4 lib/hornetseye-frame/fourcc.rb
View
2 Rakefile
@@ -8,7 +8,7 @@ require 'rbconfig'
require 'tempfile'
PKG_NAME = 'hornetseye-frame'
-PKG_VERSION = '0.9.2'
+PKG_VERSION = '0.10.0'
CFG = RbConfig::CONFIG
CXX = ENV[ 'CXX' ] || 'g++'
RB_FILES = FileList[ 'lib/**/*.rb' ]
View
2 ext/colourspace.cc
@@ -40,7 +40,7 @@ static void setupFormat( const string &typecode, int width, int height, char *me
*format = PIX_FMT_RGB24;
data[ 0 ] = (uint8_t *)memory;
lineSize[ 0 ] = width * 3;
- } else if ( typecode == "BGR " ) {
+ } else if ( typecode == "BGR" ) {
*format = PIX_FMT_BGR24;
data[ 0 ] = (uint8_t *)memory;
lineSize[ 0 ] = width * 3;
View
8 lib/hornetseye-frame/fourcc.rb
@@ -19,7 +19,7 @@ module Hornetseye
class FourCC
- def initialize( a, b, c, d )
+ def initialize(a, b, c, d = nil)
@a, @b, @c, @d = a, b, c, d
end
@@ -28,7 +28,7 @@ def inspect
end
def to_s
- "#{@a}#{@b}#{@c}#{@d}"
+ "#{@a}#{@b}#{@c}#{@d ? @d : ''}"
end
def to_str
@@ -41,13 +41,13 @@ def ==( other )
end
- def FourCC( a, b, c, d )
+ def FourCC(a, b, c, d = nil)
FourCC.new a, b, c, d
end
module_function :FourCC
- BGR = FourCC 'B', 'G', 'R', ' '
+ BGR = FourCC 'B', 'G', 'R'
BGRA = FourCC 'B', 'G', 'R', 'A'
UYVY = FourCC 'U', 'Y', 'V', 'Y'
YUY2 = FourCC 'Y', 'U', 'Y', '2'

0 comments on commit 25fd747

Please sign in to comment.
Something went wrong with that request. Please try again.