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.

XNA GIF Animation Library problem -


hey guys, trying use xna gif animation library found online, when running , keep givving me exception said "the size of data passed in large or small resource." gifanimationcontenttypereader

        (int = 0; < num; i++)         {             surfaceformat format = (surfaceformat) input.readint32();             int width = input.readint32();             int height = input.readint32();             int numberlevels = input.readint32();             frames[i] = new texture2d(graphicsdevice, width, height, false, format);             (int j = 0; j < numberlevels; j++)             {                 int count = input.readint32();                 byte[] data = input.readbytes(count);                 rectangle? rect = null;                 frames[i].setdata<byte>(j, rect, data, 0, data.length);             }         } 

at line "frames[i].setdata(j, rect, data, 0, data.length);" donno how, data length huge though

anyone know hows happen thx

the number of bytes (in code: count , data.length) should equal width * height * bytesperpixel, bytesperpixel depends on data format (for default surfaceformat.color format 4).

if not equal, don't have enough data (or have data) texture.

you haven't provided enough detail in question me able tell why values not equal.


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 -