Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

How to convert yuy2 to a BITMAP in C++ -


i'm using security camera dll retreive image camera. dll call function of program passing image buffer parameter, image in yuy2 format. need convert buffer rgb, tried every formula found on internet no success. every example tried (including http://msdn.microsoft.com/en-us/library/aa904813(vs.80).aspx#yuvformats_2) gives me wrong colors.

i'm able convert buffer bw image using y component of pixel, need color picture. debugged (assembly only) dll shows image in screen , uses directdraw this.

using information microsoft link in question:

for (int = 0;  < width/2;  ++i) {     int y0 = ptrin[0];     int u0 = ptrin[1];     int y1 = ptrin[2];     int v0 = ptrin[3];     ptrin += 4;     int c = y0 - 16;     int d = u0 - 128;     int e = v0 - 128;     ptrout[0] = clip(( 298 * c + 516 * d + 128) >> 8); // blue     ptrout[1] = clip(( 298 * c - 100 * d - 208 * e + 128) >> 8); // green     ptrout[2] = clip(( 298 * c + 409 * e + 128) >> 8); // red     c = y1 - 16;     ptrout[3] = clip(( 298 * c + 516 * d + 128) >> 8); // blue     ptrout[4] = clip(( 298 * c - 100 * d - 208 * e + 128) >> 8); // green     ptrout[5] = clip(( 298 * c + 409 * e + 128) >> 8); // red     ptrout += 6; } 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -