From 1b37a3d71dabc451f48f05fce7ce2d300212c43c Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 12 Sep 2013 15:04:26 +0100 Subject: BGR2RGB for thumbnails --- rotord/src/graph.h | 4 +++- rotord/src/rotord.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rotord/src/graph.h b/rotord/src/graph.h index 6ade53e..6a2fc2d 100644 --- a/rotord/src/graph.h +++ b/rotord/src/graph.h @@ -73,7 +73,9 @@ namespace Rotor { if (player.fetchFrame(w,h,player.getNumberOfFrames()/4)) { Image i; i.setup_fromRGB(w,h,player.frame->Data[0],player.frame->Linesize[0]-(w*3)); - cv::imwrite(outputfilename.c_str(),i.rgb); + cv::Mat cp; + cvtColor(i.rgb,cp,CV_RGB2BGR); + cv::imwrite(outputfilename.c_str(),cp); return true; } diff --git a/rotord/src/rotord.cpp b/rotord/src/rotord.cpp index 49770a4..94964eb 100644 --- a/rotord/src/rotord.cpp +++ b/rotord/src/rotord.cpp @@ -49,7 +49,7 @@ HTTPRequestHandler* RotorRequestHandlerFactory::createRequestHandler(const HTTPS XML.pushTag("rotor"); if (request.getMethod()=="POST") { if (body.size()){ - int w=360; + int w=320; int h=180; if (command.size()>1){ Poco::StringTokenizer t1(command[1],","); -- cgit v1.2.3