# HG changeset patch # User pyon@macmini # Date 1317250026 -32400 # Node ID 214f2908b8e4f32999f486077684a538c8b8ba4c # Parent 2344703d786b7670518c5c6e8b950aa784e06639 test now. diff -r 2344703d786b -r 214f2908b8e4 TODO --- a/TODO Wed Sep 28 07:41:15 2011 +0900 +++ b/TODO Thu Sep 29 07:47:06 2011 +0900 @@ -1,6 +1,7 @@ =========================================================================== TODO =========================================================================== +* Log : moved time, files, distination --------------------------------------------------------------------------- Memo diff -r 2344703d786b -r 214f2908b8e4 src/testtune.cpp --- a/src/testtune.cpp Wed Sep 28 07:41:15 2011 +0900 +++ b/src/testtune.cpp Thu Sep 29 07:47:06 2011 +0900 @@ -1,35 +1,62 @@ #include "wx/utils.h" #include "wx/string.h" +#include "wx/image.h" bool IsBlack( int r, int g, int b ) { - if ( r == 255 && g == 255 && b == 255 ) { + if ( r == 0 && g == 0 && b == 0 ) { return true; } return false; } -int GuessHhs( wxString &file ) +wxString GuessHhs( void ) { - //open image file + wxString hhs; + wxImage img( wxT("img/img361.jpg"), wxBITMAP_TYPE_JPEG ); + int sx = 1800; // start x + int sy = 315;; // start y + int bw = 60; // block width + int bh = 50; // block height + int area = bw * bh; + int black = 0; + int x, y; + unsigned char r, g, b; + + int max_n = -1; + float max = 0.0; + float bk; + for ( int c=0; c<9; c++ ) { + for ( int n=0; n<9; n++ ) { - int xoffset = 0; - int yoffset = 0; - int dx = 10; - int dy = 10; + for ( x=sx+bw*c; x