Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added BGR support

  • Loading branch information...
commit 25fd747174ca27b49fcd56fa62a40cfe30d8a3c6 1 parent 97ffecd
Jan Wedekind authored
2  Rakefile
@@ -8,7 +8,7 @@ require 'rbconfig'
8 8 require 'tempfile'
9 9
10 10 PKG_NAME = 'hornetseye-frame'
11   -PKG_VERSION = '0.9.2'
  11 +PKG_VERSION = '0.10.0'
12 12 CFG = RbConfig::CONFIG
13 13 CXX = ENV[ 'CXX' ] || 'g++'
14 14 RB_FILES = FileList[ 'lib/**/*.rb' ]
2  ext/colourspace.cc
@@ -40,7 +40,7 @@ static void setupFormat( const string &typecode, int width, int height, char *me
40 40 *format = PIX_FMT_RGB24;
41 41 data[ 0 ] = (uint8_t *)memory;
42 42 lineSize[ 0 ] = width * 3;
43   - } else if ( typecode == "BGR " ) {
  43 + } else if ( typecode == "BGR" ) {
44 44 *format = PIX_FMT_BGR24;
45 45 data[ 0 ] = (uint8_t *)memory;
46 46 lineSize[ 0 ] = width * 3;
8 lib/hornetseye-frame/fourcc.rb
@@ -19,7 +19,7 @@ module Hornetseye
19 19
20 20 class FourCC
21 21
22   - def initialize( a, b, c, d )
  22 + def initialize(a, b, c, d = nil)
23 23 @a, @b, @c, @d = a, b, c, d
24 24 end
25 25
@@ -28,7 +28,7 @@ def inspect
28 28 end
29 29
30 30 def to_s
31   - "#{@a}#{@b}#{@c}#{@d}"
  31 + "#{@a}#{@b}#{@c}#{@d ? @d : ''}"
32 32 end
33 33
34 34 def to_str
@@ -41,13 +41,13 @@ def ==( other )
41 41
42 42 end
43 43
44   - def FourCC( a, b, c, d )
  44 + def FourCC(a, b, c, d = nil)
45 45 FourCC.new a, b, c, d
46 46 end
47 47
48 48 module_function :FourCC
49 49
50   - BGR = FourCC 'B', 'G', 'R', ' '
  50 + BGR = FourCC 'B', 'G', 'R'
51 51 BGRA = FourCC 'B', 'G', 'R', 'A'
52 52 UYVY = FourCC 'U', 'Y', 'V', 'Y'
53 53 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.