How to print a picture on the screen??!!

Mar 5, 2012 at 2:52 PM

Hi,

I want to know how can I print a picture on the screen.

 

I've managed to convert the picture into code but I still don't know how to print it on the screen??!!

Mar 5, 2012 at 2:59 PM
Edited Mar 5, 2012 at 3:05 PM
ahmedyosrihamdy wrote:

Hi,

I want to know how can I print a picture on the screen.

 

I've managed to convert the picture into code but I still don't know how to print it on the screen??!!

Depending on what you used to convert it. If you used my convertor then use this

 

 private static int i = 0;
 private static int t = 0;
 private static int count = 0;
 public static void DrawFrame(uint[] Arr, int width, int length, int xpixel, int ypixel)
        {
            count = 0;
            for (i = 0; i < length; i++)
            {
                for (t = 0; t < width; t++, count++)
                {
                    if (Arr[count] == 0xFF00FF)
                    {
                    }
                    else
                    {
                        SetPixel((int)(0 + (uint)t + 0 + (uint)xpixel), (int)(0 + (uint)i + 0 + (uint)ypixel), (int)Arr[count]);
                    }
                }
            }
        }

 

You will need to replace SetPixel with your setpixel method. My program also converts the colors to hex so if you are using it you will need to use the SVGA Driver, and if you dont want flicker then take a look at my driver: pearos.codeplex.com under Core > Screen > Screen and the folder drivers. 

And if you do use SVGA then you will need my mouse driver under Core > Cursor > Hardware to fix the bounds issue. And if you use VGA then you will need to use test mode to use the hex values. 

Link to my convertor:Pear CAIC

Hope it helps - Matt

Mar 5, 2012 at 3:39 PM

Thanks Matt and I'm using the "Cosmos Converter" to convert the picture.

Mar 5, 2012 at 3:43 PM
ahmedyosrihamdy wrote:

Thanks Matt and I'm using the "Cosmos Converter" to convert the picture.

Ah, well you might want to try mine. I used theres and it was really slow and generated way to much code. So I made CAIC which is super fast, and generates the smallest amount of code possible. Glad to help. Yours Truly - Matt

Mar 5, 2012 at 3:45 PM

I've tried to use CAIC but it was hanging.

 

I don't know what to do.

Mar 5, 2012 at 3:48 PM

PLEASE,

 

Can you give me an example  to learn from.

 

I'll be very grateful for you.


Mar 5, 2012 at 3:51 PM
Edited Mar 5, 2012 at 3:52 PM
ahmedyosrihamdy wrote:

I've tried to use CAIC but it was hanging.

 

I don't know what to do.

Hmm, ah I see. You need to use this version here:http://pearos.codeplex.com/releases/view/83066

and when it opens it will ask for the image location. Its written in VB which is a pain for console programs because you cant drag a file onto it and get the location so you will need to enter it. So put your image on your C drive or somewhere simple and when it opens give it the image location:

C://test.bmp

then it will ask for a name

TestImage

the name is not used for the location or anything, its used for the name it will use in the code.

and then let it do its thing and it will tell you its done and where it stored the image. I will store most images on the C drive, and if your windows7 you may need to right click and hit run as admin if it still hangs. And if after that it still does let me know and I will take a look at it. I use it frequently, that very version and I have not had any problems yet. Thanks - Matt

Mar 5, 2012 at 5:11 PM

CAIC worked very well, and I've managed to convert the picture. >> Thanks

 

But I don't know where can I use your code and How can I use it.

This is some of the code:

 

class Logo
{
  private Cosmos.Hardware.VGAScreen VGAScreen = new Cosmos.Hardware.VGAScreen();
  #region "Logo Data"
  public uint[] test = {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x171717,0x313131,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x636A6A,0x5A5A5C,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x2A2A2C,0x2D2D2D,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x818183,0x5A5F65,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x242628,0x383838,0x4A4A4A,0x3C3C3C,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x8E8E8F,0x55575D,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x1F1F24,0x2B2D2D,0x404040,0x4E4E4E,0x565655,0x525251,0x313131,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x737373,0x8C8E8F,0x3E474F,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0D1414,0x2B292B,0x313031,0x404040,0x5E5E5E,0x686868,0x4F4F4F,0x5A5A5A,0x6E6E6E,0x313131,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x8C8C8F,0x8A8C8C,0x30303E,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x1A1A1F,0x2B2B2B,0x434243,0x575656,0x4E4E4E,0x4E4E4E,0x636363,0x6C6C6C,0x7D7D7D,0x5C5C5C,0x181818,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x9B9D9D,0x7D7E80,0x0C1933,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x161A1A,0x2D2D2D,0x3D3C3C,0x585858,0x737473,0x606060,0x4C4C4C,0x4E4E4E,0x919191,0x666668,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x525259,0xA3A3A4,0x6D6E6F,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x1D2023,0x2E2D2D,0x3E3D3D,0x4E4E4E,0x565655,0x606060,0x737473,0x5A5A5A,0x606060,0x515150,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x8B8B8B,0xADADAD,0x606063,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x1C1C1F,0x2E2D2E,0x403F3F,0x4E4E4E,0x525251,0x525251,0x555554,0x5F5F5F,0x949494,0x818181,0x2A2A2A,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x9F9FA0,0x9A9898,0x575D5D,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x1E1E1E,0x2F2E2F,0x413F3F,0x4F4F4F,0x525251,0x515150,0x515150,0x4F4F4F,0x6A6A6A,0xAAADAD,0x5A5A5A,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x6C706C,0xB1B1B1,0x7B7B7A,0x5F5F62,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x18181C,0x2C2D2D,0x3E3D3D,0x4E4E4E,0x525251,0x515150,0x515150,0x4F4F4F,0x676868,0x888989,0x574646,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x989699,0xADADAD,0x666666,0x5E6369,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x1F1F21,0x343535,0x3C3B3B,0x494848,0x50504F,0x515150,0x4F4F4F,0x6B6C6C,0x878D8E,0x906864,0xDA8C83,0xC24B42,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x616165,0xAEAEAE,0x888787,0x696D6C,0x1F1F3F,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x0C000C,0x282828,0x313031,0x373636,0x3B3A3B,0x494848,0x4F4F4F,0x707271,0x808180,0x894540,0xDD5045,0xFAAFA7,0xE7A39B,0xBA382F,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x919192,0xB6B6B5,0x6E6E6E,0x75797C,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x0C0C0C,0x2E2C2F,0x3D3B3B,0x343333,0x313031,0x373636,0x3B3A3B,0x666666,0x7A7C7D,0x463533,0xB10200,0xDF3626,0xDE584A,0xF9B4AE,0xE39D93,0xB7342D,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x6E6E73,0xB8B8B8,0x868585,0x6D6D6E,0x7D8186,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x2F3030,0x484747,0x50504F,0x3E3D3D,0x323132,0x323132,0x393839,0x4C4C4C,0x393939,0x000000,0x70150A,0xC21400,0xDD3C2B,0xE05B4D,0xFBB9B3,0xE2968C,0xBF1800,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x393F3F,0xA0A0A0,0xAFAFAF,0x676767,0x888A8B,0x0000FF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x2F2F2F,0x484646,0x535352,0x555554,0x494848,0x2E2C2E,0x2D2C2D,0x292929,0x000000,0x000000,0x00FFFF,0x771209,0xC81700,0xDE3E2F,0xE15E51,0xFBBEB8,0xE18B81,0xB61603,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x8E8E8E,0xBFBEBE,0x727472,0x7C7C7C,0xA29FA5,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x302E30,0x4D4E4E,0x767674,0x535355,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000033,0x7E1409,0xCE1700,0xDD4232,0xE26254,0xFEC1BB,0xDD847B,0xAB1910,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x808080,0xBEBEBE,0x8C8C8C,0x6B6969,0xA2A3A6,0x0000FF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x3C3C3E,0x4E4E4C,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0D0D1A,0x84140A,0xD21B00,0xDC4334,0xE36759,0xFFC3BF,0xDB7E75,0xAB1300,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x7D7D7D,0xBDBDBD,0x9C9C9C,0x616161,0x9D9D9E,0xB9C5C5,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x36171E,0x8D1100,0xD51F00,0xDC4636,0xE46A5D,0xFEC6C1,0xD9746B,0xA80000,0x000000,0x000000,0x000000,0x000000,0x000000,0x393939,0x878787,0xBDBDBD,0x9D9D9D,0x636262,0x9B999B,0xC5C7CA,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x412020,0x940E00,0xD82100,0xDD4738,0xE46F62,0xFFC6C2,0xD76D61,0xA60000,0x000000,0x000000,0x111111,0x6D6B6B,0x9E9E9E,0xBDBEBC,0x8C8C8C,0x646464,0x9E9F9F,0xCDCDD7,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x4C201C,0x9B0D00,0xD9260E,0xDF483A,0xEA7467,0xFFC2BE,0xC95D53,0x522E2E,0x6B6F6F,0x969695,0xBBBBBB,0xAAAAAA,0x737473,0x787776,0xB0B0B1,0xCFD5DB,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x521310,0xA00000,0xC82917,0xB95046,0xA97F7A,0xA49A99,0xA8A2A2,0xB6B7B7,0xA5A5A6,0x808080,0x7B7A7A,0x9B9B9C,0xC8C8CB,0xE4E4FF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x344843,0x76605D,0xA18A88,0xA4A6A6,0xA6AAAA,0x9B9D9D,0x8B8D8D,0x7D7F7E,0x838787,0xA5A8A9,0xC5C8C9,0xD8DCE8,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x656763,0xA19F9F,0xB0B3B3,0x818485,0x6F6F6F,0x7B7F7F,0x929595,0xA99E9F,0xBDB6B7,0xB88481,0xBD8686,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x696969,0xB0B0B0,0xA4A2A2,0x606060,0x787877,0xA9A9AA,0xB28180,0xB75D56,0xA84B43,0xA7605A,0xB0827D,0x9B332A,0x6D0000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x5B5B5B,0xA7A9A9,0x979797,0x575656,0x868686,0xC5C8CB,0xC4D1E4,0x510904,0x8E0900,0xAA281A,0xBA4237,0xD38278,0xF2BAB3,0xCC4339,0x770000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x424242,0x9E9E9D,0x99999A,0x525251,0x807F7F,0xBBBEC1,0x6D91FF,0x000000,0x001C55,0x6E1309,0xCA1300,0xDD3929,0xE15344,0xEE9B90,0xFEBBB5,0xCA3629,0x620000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x861A35,0x0000FF,0x000000,0x151515,0x969696,0xA2A2A2,0x50504F,0x757573,0xB4B8BC,0xAABBDD,0x000000,0x000000,0x000000,0x1E2D3C,0x821508,0xD01600,0xDB3C2C,0xDF5244,0xEFA097,0xFEB6B0,0xC83126,0x660000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x00FFFF,0xCD0000,0xAB0000,0x3C6969,0x8B8F8F,0xACABAC,0x575656,0x666666,0xAFAFAF,0xC3D2D2,0x000000,0x000000,0x000000,0x000000,0x000000,0x291818,0x881200,0xD41600,0xDB3F2E,0xDE5445,0xF0A69F,0xFCB0A9,0xC43023,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x00FFFF,0xD70000,0xEC0000,0xA71720,0xA3A4A4,0x616363,0x5D5B5B,0xA5A5A5,0xDBDBDF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x3B1B1B,0x901000,0xD61B00,0xDB4132,0xDE5748,0xF1ACA5,0xFAA8A0,0xC12A20,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x00FFFF,0xD60000,0xE90000,0xE40000,0xA3121D,0x656262,0x9A9D9D,0xBEC4C9,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x451C1C,0x971000,0xD81E00,0xDB4435,0xDF584A,0xF4B2AC,0xF6A198,0xC31A00,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xBD2941,0xE10000,0xE80000,0xDB0000,0xD90000,0xA70818,0x9B969B,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x4F1C19,0xA01000,0xD91F00,0xDB4637,0xE05B4D,0xF4B9B2,0xF3988E,0xC21700,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xC61238,0xDB0000,0xF10000,0xEC0000,0xDA0000,0xD10000,0xD00000,0x7C0000,0x343441,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x5A1611,0xAC1200,0xDA2209,0xDC4739,0xE05E4F,0xF6BDB7,0xF09186,0xBD1C08,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xCC0E33,0xDA0000,0xEE0000,0xE40000,0xDB0000,0xCB0000,0xAA0000,0xAC0000,0x910000,0x531E2B,0x00FFFF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000FF,0x601712,0xB71000,0xDA2510,0xDC4A3A,0xE16152,0xF7C0BB,0xED877D,0xBA1805,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xC7374F,0xDA0000,0xEE0000,0xE40000,0xDB0000,0xC80000,0x870000,0x512333,0x0099FF,0x4E3A4E,0x242448,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x661915,0xBF1000,0xDA2912,0xDD4B3B,0xE26356,0xF8C3BF,0xEA7E74,0xAF0000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xA35B7F,0xDD0000,0xF00000,0xE50000,0xDD0000,0xCC0000,0x890000,0x442D36,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000FF,0x6E1712,0xC61100,0xDA2D19,0xDD4C3E,0xE3685A,0xF9C5C1,0xE7756A,0xB50000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x00FFFF,0xD80000,0xF50000,0xED0006,0xDF0000,0xD00000,0x9B0000,0x49151E,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x001717,0x74160D,0xCA1600,0xDA2F1C,0xDD4D3F,0xE36C5E,0xFAC6C2,0xE26E60,0xB80800,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xDC0032,0xE30000,0xF84D53,0xE90018,0xD30000,0xAA0000,0x550514,0x000913,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x001015,0x771208,0xCF1400,0xDA321F,0xDC4E40,0xE47164,0xFCC8C4,0xDD6457,0xBA0000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x003FFF,0xDF0000,0xF90000,0xE70000,0xD60000,0xB00000,0x690716,0x00001C,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x121212,0x84130A,0xD21400,0xD93624,0xDE5041,0xE6776B,0xFDC9C5,0xD8574C,0xB30000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x00FFFF,0xD90000,0xF70C24,0xED2632,0xD50000,0xA40000,0x6E0E1A,0x0000FF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x2C1313,0x8B1300,0xD61700,0xDA3828,0xDF5042,0xE87E70,0xFFC9C5,0xD55348,0xB00000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x9F4F5F,0xD30000,0xE40000,0xE90000,0xD10000,0x990000,0x581F2E,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x311818,0x931000,0xD71800,0xDB3C2C,0xDF5243,0xEA8277,0xFFC7C3,0xD44D41,0xA20000,0x000000,0x000000,
                      0x000000,0xB9002E,0xC90000,0xCD0000,0xE30000,0xDF0000,0xCD0000,0x900000,0x004455,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x321515,0x9A1300,0xD81E00,0xDB402F,0xE05345,0xEB8B81,0xFFC8C3,0xD14E42,0x970000,0x000000,
                      0x000000,0xD9001A,0xF00000,0xE00000,0xD20000,0xC90000,0x890000,0x0E1C2A,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x391311,0xA11000,0xDA2000,0xDD4435,0xE2574A,0xF2988E,0xFFCBC6,0xCD5550,0x000000,
                      0x00FFFF,0xD40023,0xF10000,0xE90000,0xCF0000,0xA00000,0x461119,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x421715,0xA71300,0xDF2712,0xE64E41,0xFF7E70,0xEAA394,0x556363,0x000000,
                      0x000000,0xB1001F,0xD90000,0xE40000,0xD30000,0x790000,0x1E222A,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x4E1D1A,0xAC1100,0xFB5E4D,0xEC9586,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0xB00012,0xBD0000,0xA20000,0x680B1A,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x641B1B,0xB24136,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x136275,0x00AAFF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      };


  #endregion
  #region "Colors"
  public static byte[] Color0 = { 124, 214, 86 };
  public static byte[] Color1 = { 91, 194, 48 };
  public static byte[] Color2 = { 159, 225, 132 };
  public static byte[] Color3 = { 62, 132, 32 };
  public static byte[] Color4 = { 0, 0, 0 };
  public static byte[] Color5 = { 77, 162, 40 };
  public static byte[] Color6 = { 192, 192, 192 };
  #endregion
  public void Draw(int xpixel, int ypixel)
  {
      int width = 42;
      int length = 42;
      uint[] Arr = test;
      uint x = 0, y = 0;
      int texnumwid = 0;
      int textnumlen = 0;
      int i;
      int t;
      int count = 0;
      for (i = 0; i < length; i++)
      {
          for (t = 0; t < width; t++, count++)
          {
              VGAScreen.SetPalette(12421486, Color0);
              if (Arr[count] == 12421486)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 12421486);
              } VGAScreen.SetPalette(9119448, Color1);
              if (Arr[count] == 9119448)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 9119448);
              } VGAScreen.SetPalette(159225132, Color2);
              if (Arr[count] == 159225132)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 159225132);
              } VGAScreen.SetPalette(6213232, Color3);
              if (Arr[count] == 6213232)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 6213232);
              } VGAScreen.SetPalette(000, Color4);
              if (Arr[count] == 000)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 000);
              } VGAScreen.SetPalette(7716240, Color5);
              if (Arr[count] == 7716240)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 7716240);
              } VGAScreen.SetPalette(192192192, Color6);
              if (Arr[count] == 192192192)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 192192192);
              }
          }
      }
  }
}

 

So, How can I use it and paint the picture on the screen?


Mar 5, 2012 at 11:14 PM
ahmedyosrihamdy wrote:

CAIC worked very well, and I've managed to convert the picture. >> Thanks

 

But I don't know where can I use your code and How can I use it.

This is some of the code:

 

class Logo
{
  private Cosmos.Hardware.VGAScreen VGAScreen = new Cosmos.Hardware.VGAScreen();
  #region "Logo Data"
  public uint[] test = {0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x171717,0x313131,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x636A6A,0x5A5A5C,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x2A2A2C,0x2D2D2D,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x818183,0x5A5F65,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x242628,0x383838,0x4A4A4A,0x3C3C3C,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x8E8E8F,0x55575D,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x1F1F24,0x2B2D2D,0x404040,0x4E4E4E,0x565655,0x525251,0x313131,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x737373,0x8C8E8F,0x3E474F,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0D1414,0x2B292B,0x313031,0x404040,0x5E5E5E,0x686868,0x4F4F4F,0x5A5A5A,0x6E6E6E,0x313131,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x8C8C8F,0x8A8C8C,0x30303E,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x1A1A1F,0x2B2B2B,0x434243,0x575656,0x4E4E4E,0x4E4E4E,0x636363,0x6C6C6C,0x7D7D7D,0x5C5C5C,0x181818,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x9B9D9D,0x7D7E80,0x0C1933,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x161A1A,0x2D2D2D,0x3D3C3C,0x585858,0x737473,0x606060,0x4C4C4C,0x4E4E4E,0x919191,0x666668,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x525259,0xA3A3A4,0x6D6E6F,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x1D2023,0x2E2D2D,0x3E3D3D,0x4E4E4E,0x565655,0x606060,0x737473,0x5A5A5A,0x606060,0x515150,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x8B8B8B,0xADADAD,0x606063,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x1C1C1F,0x2E2D2E,0x403F3F,0x4E4E4E,0x525251,0x525251,0x555554,0x5F5F5F,0x949494,0x818181,0x2A2A2A,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x9F9FA0,0x9A9898,0x575D5D,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x1E1E1E,0x2F2E2F,0x413F3F,0x4F4F4F,0x525251,0x515150,0x515150,0x4F4F4F,0x6A6A6A,0xAAADAD,0x5A5A5A,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x6C706C,0xB1B1B1,0x7B7B7A,0x5F5F62,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x18181C,0x2C2D2D,0x3E3D3D,0x4E4E4E,0x525251,0x515150,0x515150,0x4F4F4F,0x676868,0x888989,0x574646,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x989699,0xADADAD,0x666666,0x5E6369,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x1F1F21,0x343535,0x3C3B3B,0x494848,0x50504F,0x515150,0x4F4F4F,0x6B6C6C,0x878D8E,0x906864,0xDA8C83,0xC24B42,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x616165,0xAEAEAE,0x888787,0x696D6C,0x1F1F3F,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x0C000C,0x282828,0x313031,0x373636,0x3B3A3B,0x494848,0x4F4F4F,0x707271,0x808180,0x894540,0xDD5045,0xFAAFA7,0xE7A39B,0xBA382F,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x919192,0xB6B6B5,0x6E6E6E,0x75797C,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x0C0C0C,0x2E2C2F,0x3D3B3B,0x343333,0x313031,0x373636,0x3B3A3B,0x666666,0x7A7C7D,0x463533,0xB10200,0xDF3626,0xDE584A,0xF9B4AE,0xE39D93,0xB7342D,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x6E6E73,0xB8B8B8,0x868585,0x6D6D6E,0x7D8186,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x2F3030,0x484747,0x50504F,0x3E3D3D,0x323132,0x323132,0x393839,0x4C4C4C,0x393939,0x000000,0x70150A,0xC21400,0xDD3C2B,0xE05B4D,0xFBB9B3,0xE2968C,0xBF1800,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x393F3F,0xA0A0A0,0xAFAFAF,0x676767,0x888A8B,0x0000FF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x2F2F2F,0x484646,0x535352,0x555554,0x494848,0x2E2C2E,0x2D2C2D,0x292929,0x000000,0x000000,0x00FFFF,0x771209,0xC81700,0xDE3E2F,0xE15E51,0xFBBEB8,0xE18B81,0xB61603,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x8E8E8E,0xBFBEBE,0x727472,0x7C7C7C,0xA29FA5,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x302E30,0x4D4E4E,0x767674,0x535355,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000033,0x7E1409,0xCE1700,0xDD4232,0xE26254,0xFEC1BB,0xDD847B,0xAB1910,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x808080,0xBEBEBE,0x8C8C8C,0x6B6969,0xA2A3A6,0x0000FF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x3C3C3E,0x4E4E4C,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0D0D1A,0x84140A,0xD21B00,0xDC4334,0xE36759,0xFFC3BF,0xDB7E75,0xAB1300,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x7D7D7D,0xBDBDBD,0x9C9C9C,0x616161,0x9D9D9E,0xB9C5C5,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x36171E,0x8D1100,0xD51F00,0xDC4636,0xE46A5D,0xFEC6C1,0xD9746B,0xA80000,0x000000,0x000000,0x000000,0x000000,0x000000,0x393939,0x878787,0xBDBDBD,0x9D9D9D,0x636262,0x9B999B,0xC5C7CA,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x412020,0x940E00,0xD82100,0xDD4738,0xE46F62,0xFFC6C2,0xD76D61,0xA60000,0x000000,0x000000,0x111111,0x6D6B6B,0x9E9E9E,0xBDBEBC,0x8C8C8C,0x646464,0x9E9F9F,0xCDCDD7,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x4C201C,0x9B0D00,0xD9260E,0xDF483A,0xEA7467,0xFFC2BE,0xC95D53,0x522E2E,0x6B6F6F,0x969695,0xBBBBBB,0xAAAAAA,0x737473,0x787776,0xB0B0B1,0xCFD5DB,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x521310,0xA00000,0xC82917,0xB95046,0xA97F7A,0xA49A99,0xA8A2A2,0xB6B7B7,0xA5A5A6,0x808080,0x7B7A7A,0x9B9B9C,0xC8C8CB,0xE4E4FF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x344843,0x76605D,0xA18A88,0xA4A6A6,0xA6AAAA,0x9B9D9D,0x8B8D8D,0x7D7F7E,0x838787,0xA5A8A9,0xC5C8C9,0xD8DCE8,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x656763,0xA19F9F,0xB0B3B3,0x818485,0x6F6F6F,0x7B7F7F,0x929595,0xA99E9F,0xBDB6B7,0xB88481,0xBD8686,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x696969,0xB0B0B0,0xA4A2A2,0x606060,0x787877,0xA9A9AA,0xB28180,0xB75D56,0xA84B43,0xA7605A,0xB0827D,0x9B332A,0x6D0000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x5B5B5B,0xA7A9A9,0x979797,0x575656,0x868686,0xC5C8CB,0xC4D1E4,0x510904,0x8E0900,0xAA281A,0xBA4237,0xD38278,0xF2BAB3,0xCC4339,0x770000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x424242,0x9E9E9D,0x99999A,0x525251,0x807F7F,0xBBBEC1,0x6D91FF,0x000000,0x001C55,0x6E1309,0xCA1300,0xDD3929,0xE15344,0xEE9B90,0xFEBBB5,0xCA3629,0x620000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x861A35,0x0000FF,0x000000,0x151515,0x969696,0xA2A2A2,0x50504F,0x757573,0xB4B8BC,0xAABBDD,0x000000,0x000000,0x000000,0x1E2D3C,0x821508,0xD01600,0xDB3C2C,0xDF5244,0xEFA097,0xFEB6B0,0xC83126,0x660000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x00FFFF,0xCD0000,0xAB0000,0x3C6969,0x8B8F8F,0xACABAC,0x575656,0x666666,0xAFAFAF,0xC3D2D2,0x000000,0x000000,0x000000,0x000000,0x000000,0x291818,0x881200,0xD41600,0xDB3F2E,0xDE5445,0xF0A69F,0xFCB0A9,0xC43023,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x00FFFF,0xD70000,0xEC0000,0xA71720,0xA3A4A4,0x616363,0x5D5B5B,0xA5A5A5,0xDBDBDF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x3B1B1B,0x901000,0xD61B00,0xDB4132,0xDE5748,0xF1ACA5,0xFAA8A0,0xC12A20,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x00FFFF,0xD60000,0xE90000,0xE40000,0xA3121D,0x656262,0x9A9D9D,0xBEC4C9,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x451C1C,0x971000,0xD81E00,0xDB4435,0xDF584A,0xF4B2AC,0xF6A198,0xC31A00,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xBD2941,0xE10000,0xE80000,0xDB0000,0xD90000,0xA70818,0x9B969B,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x4F1C19,0xA01000,0xD91F00,0xDB4637,0xE05B4D,0xF4B9B2,0xF3988E,0xC21700,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xC61238,0xDB0000,0xF10000,0xEC0000,0xDA0000,0xD10000,0xD00000,0x7C0000,0x343441,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x5A1611,0xAC1200,0xDA2209,0xDC4739,0xE05E4F,0xF6BDB7,0xF09186,0xBD1C08,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xCC0E33,0xDA0000,0xEE0000,0xE40000,0xDB0000,0xCB0000,0xAA0000,0xAC0000,0x910000,0x531E2B,0x00FFFF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000FF,0x601712,0xB71000,0xDA2510,0xDC4A3A,0xE16152,0xF7C0BB,0xED877D,0xBA1805,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xC7374F,0xDA0000,0xEE0000,0xE40000,0xDB0000,0xC80000,0x870000,0x512333,0x0099FF,0x4E3A4E,0x242448,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x661915,0xBF1000,0xDA2912,0xDD4B3B,0xE26356,0xF8C3BF,0xEA7E74,0xAF0000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xA35B7F,0xDD0000,0xF00000,0xE50000,0xDD0000,0xCC0000,0x890000,0x442D36,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x0000FF,0x6E1712,0xC61100,0xDA2D19,0xDD4C3E,0xE3685A,0xF9C5C1,0xE7756A,0xB50000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x00FFFF,0xD80000,0xF50000,0xED0006,0xDF0000,0xD00000,0x9B0000,0x49151E,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x001717,0x74160D,0xCA1600,0xDA2F1C,0xDD4D3F,0xE36C5E,0xFAC6C2,0xE26E60,0xB80800,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0xDC0032,0xE30000,0xF84D53,0xE90018,0xD30000,0xAA0000,0x550514,0x000913,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x001015,0x771208,0xCF1400,0xDA321F,0xDC4E40,0xE47164,0xFCC8C4,0xDD6457,0xBA0000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x000000,0x003FFF,0xDF0000,0xF90000,0xE70000,0xD60000,0xB00000,0x690716,0x00001C,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x121212,0x84130A,0xD21400,0xD93624,0xDE5041,0xE6776B,0xFDC9C5,0xD8574C,0xB30000,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x000000,0x00FFFF,0xD90000,0xF70C24,0xED2632,0xD50000,0xA40000,0x6E0E1A,0x0000FF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x2C1313,0x8B1300,0xD61700,0xDA3828,0xDF5042,0xE87E70,0xFFC9C5,0xD55348,0xB00000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x9F4F5F,0xD30000,0xE40000,0xE90000,0xD10000,0x990000,0x581F2E,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x311818,0x931000,0xD71800,0xDB3C2C,0xDF5243,0xEA8277,0xFFC7C3,0xD44D41,0xA20000,0x000000,0x000000,
                      0x000000,0xB9002E,0xC90000,0xCD0000,0xE30000,0xDF0000,0xCD0000,0x900000,0x004455,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x321515,0x9A1300,0xD81E00,0xDB402F,0xE05345,0xEB8B81,0xFFC8C3,0xD14E42,0x970000,0x000000,
                      0x000000,0xD9001A,0xF00000,0xE00000,0xD20000,0xC90000,0x890000,0x0E1C2A,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x391311,0xA11000,0xDA2000,0xDD4435,0xE2574A,0xF2988E,0xFFCBC6,0xCD5550,0x000000,
                      0x00FFFF,0xD40023,0xF10000,0xE90000,0xCF0000,0xA00000,0x461119,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x421715,0xA71300,0xDF2712,0xE64E41,0xFF7E70,0xEAA394,0x556363,0x000000,
                      0x000000,0xB1001F,0xD90000,0xE40000,0xD30000,0x790000,0x1E222A,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x4E1D1A,0xAC1100,0xFB5E4D,0xEC9586,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0xB00012,0xBD0000,0xA20000,0x680B1A,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x641B1B,0xB24136,0x000000,0x000000,0x000000,0x000000,
                      0x000000,0x000000,0x000000,0x136275,0x00AAFF,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,0x000000,
                      };


  #endregion
  #region "Colors"
  public static byte[] Color0 = { 124, 214, 86 };
  public static byte[] Color1 = { 91, 194, 48 };
  public static byte[] Color2 = { 159, 225, 132 };
  public static byte[] Color3 = { 62, 132, 32 };
  public static byte[] Color4 = { 0, 0, 0 };
  public static byte[] Color5 = { 77, 162, 40 };
  public static byte[] Color6 = { 192, 192, 192 };
  #endregion
  public void Draw(int xpixel, int ypixel)
  {
      int width = 42;
      int length = 42;
      uint[] Arr = test;
      uint x = 0, y = 0;
      int texnumwid = 0;
      int textnumlen = 0;
      int i;
      int t;
      int count = 0;
      for (i = 0; i < length; i++)
      {
          for (t = 0; t < width; t++, count++)
          {
              VGAScreen.SetPalette(12421486, Color0);
              if (Arr[count] == 12421486)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 12421486);
              } VGAScreen.SetPalette(9119448, Color1);
              if (Arr[count] == 9119448)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 9119448);
              } VGAScreen.SetPalette(159225132, Color2);
              if (Arr[count] == 159225132)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 159225132);
              } VGAScreen.SetPalette(6213232, Color3);
              if (Arr[count] == 6213232)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 6213232);
              } VGAScreen.SetPalette(000, Color4);
              if (Arr[count] == 000)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 000);
              } VGAScreen.SetPalette(7716240, Color5);
              if (Arr[count] == 7716240)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 7716240);
              } VGAScreen.SetPalette(192192192, Color6);
              if (Arr[count] == 192192192)
              {
                  VGAScreen.SetPixel320x200x8(x + (uint)t + (uint)texnumwid + (uint)xpixel, y + (uint)i + (uint)textnumlen + (uint)ypixel, 192192192);
              }
          }
      }
  }
}

 

So, How can I use it and paint the picture on the screen?


Ok so that array contains the color codes. So if you just use set mode for the VGAScreen you have to define every color, a way around this is to use VGAScreen test mode, it will add all the

needed colors. So for example: 0xFFFFFF is white so I would call VGAScreen.SetPixel(0,0,0xFFFFFF), now if you want to draw the array then just replace 0xFFFFFF with the arrays values, and

that will print the proper colors and make your code smaller. Not only that dont use the if Arr[] ect == that is old, we used to use that. Look at me Core > Screen > Screen.cs and then look at Core > Graphics

System images for reference on how to use the Screen code. Hope it helps - Matt 

Developer
Mar 17, 2012 at 9:15 AM

@civilwarock - I would suggest not using hex codes for your image drawing. It increases the size of the source code.

@ahmedyosrihandi - If you need help with the image converter thing that civilwarrock name, try asking on his codeplex site, you will get more help there

Developer
Mar 19, 2012 at 6:18 PM
CMan332 wrote:

@civilwarock - I would suggest not using hex codes for your image drawing. It increases the size of the source code.

@ahmedyosrihandi - If you need help with the image converter thing that civilwarrock name, try asking on his codeplex site, you will get more help there


Hex is smaller (in terms of the size of the source code) than normal integers, provided you leave out the 0's that aren't needed. He left those 0's in so that the image lines up in source code form. Both hex and integer form are the exact same size once compiled though.

Developer
Mar 29, 2012 at 8:33 AM

In terms of the current revision of cosmos, there can only be up to 256 colours. That means that the integers not written in hex form take up to 3 characters at the maximum. When written in hex (in the source code), there are three characters at the maximum. I do know that they are the exact same size when compiled though. Maybe we should require people to post their source code in a pastebin though, the source dumps are quite annoying.

Developer
Mar 29, 2012 at 1:51 PM

Actually, no, the current version of Cosmos supports 32-bit color.

Developer
Mar 30, 2012 at 9:12 AM

I was thinking VGA Screen, VMWare SVGA doesn't really apply to anything besides VMWare.

Mar 22, 2013 at 8:52 AM
civilwarrock wrote:
ahmedyosrihamdy wrote: Hi, I want to know how can I print a picture on the screen.   I've managed to convert the picture into code but I still don't know how to print it on the screen??!! Depending on what you used to convert it. If you used my convertor then use this   private static int i = 0; private static int t = 0; private static int count = 0; public static void DrawFrame(uint[] Arr, int width, int length, int xpixel, int ypixel) { count = 0; for (i = 0; i < length; i++) { for (t = 0; t < width; t++, count++) { if (Arr[count] == 0xFF00FF) { } else { SetPixel((int)(0 + (uint)t + 0 + (uint)xpixel), (int)(0 + (uint)i + 0 + (uint)ypixel), (int)Arr[count]); } } } }   You will need to replace SetPixel with your setpixel method. My program also converts the colors to hex so if you are using it you will need to use the SVGA Driver, and if you dont want flicker then take a look at my driver: pearos.codeplex.com under Core > Screen > Screen and the folder drivers.  And if you do use SVGA then you will need my mouse driver under Core > Cursor > Hardware to fix the bounds issue. And if you use VGA then you will need to use test mode to use the hex values.  Link to my convertor:Pear CAIC Hope it helps - Matt
Matt, your link just leads me to an unfinished project.
Mar 22, 2013 at 10:13 PM
lolface123 wrote:
civilwarrock wrote:
ahmedyosrihamdy wrote: Hi, I want to know how can I print a picture on the screen.   I've managed to convert the picture into code but I still don't know how to print it on the screen??!! Depending on what you used to convert it. If you used my convertor then use this   private static int i = 0; private static int t = 0; private static int count = 0; public static void DrawFrame(uint[] Arr, int width, int length, int xpixel, int ypixel) { count = 0; for (i = 0; i < length; i++) { for (t = 0; t < width; t++, count++) { if (Arr[count] == 0xFF00FF) { } else { SetPixel((int)(0 + (uint)t + 0 + (uint)xpixel), (int)(0 + (uint)i + 0 + (uint)ypixel), (int)Arr[count]); } } } }   You will need to replace SetPixel with your setpixel method. My program also converts the colors to hex so if you are using it you will need to use the SVGA Driver, and if you dont want flicker then take a look at my driver: pearos.codeplex.com under Core > Screen > Screen and the folder drivers.  And if you do use SVGA then you will need my mouse driver under Core > Cursor > Hardware to fix the bounds issue. And if you use VGA then you will need to use test mode to use the hex values.  Link to my convertor:Pear CAIC Hope it helps - Matt
Matt, your link just leads me to an unfinished project.
Ah someone has called for help.. :) Matt at your service. My project went dead because I was moving into a new area of testing and programming. I am going to, today release it. I have created a C# IL Compiler, x86 Assembly Kernel, C# Kernel, and C# Operating System (PearOs4). I have gone off the grid as you could say. I am Cosmos free, I moved away so I could learn, expand and play. My platform, requires no installation, it has Multitasking Support, Timer Support, Memory Management and more. Its written from the ground up by me. But I will be writing VGA Drivers and such so you guys will get to see my code and use it in Cosmos if you would like. I am not here to steal any of Cosmos's users. I just have my own project and I am releasing the code to help others learn and develop. Thanks, Matt
Mar 22, 2013 at 10:18 PM
lolface123 wrote:
civilwarrock wrote:
ahmedyosrihamdy wrote: Hi, I want to know how can I print a picture on the screen.   I've managed to convert the picture into code but I still don't know how to print it on the screen??!! Depending on what you used to convert it. If you used my convertor then use this   private static int i = 0; private static int t = 0; private static int count = 0; public static void DrawFrame(uint[] Arr, int width, int length, int xpixel, int ypixel) { count = 0; for (i = 0; i < length; i++) { for (t = 0; t < width; t++, count++) { if (Arr[count] == 0xFF00FF) { } else { SetPixel((int)(0 + (uint)t + 0 + (uint)xpixel), (int)(0 + (uint)i + 0 + (uint)ypixel), (int)Arr[count]); } } } }   You will need to replace SetPixel with your setpixel method. My program also converts the colors to hex so if you are using it you will need to use the SVGA Driver, and if you dont want flicker then take a look at my driver: pearos.codeplex.com under Core > Screen > Screen and the folder drivers.  And if you do use SVGA then you will need my mouse driver under Core > Cursor > Hardware to fix the bounds issue. And if you use VGA then you will need to use test mode to use the hex values.  Link to my convertor:Pear CAIC Hope it helps - Matt
Matt, your link just leads me to an unfinished project.
Ah someone has called for help.. :) Matt at your service. My project went dead because I was moving into a new area of testing and programming. I am going to, today release it. I have created a C# IL Compiler, x86 Assembly Kernel, C# Kernel, and C# Operating System (PearOs4). I have gone off the grid as you could say. I am Cosmos free, I moved away so I could learn, expand and play. My platform, requires no installation, it has Multitasking Support, Timer Support, Memory Management and more. Its written from the ground up by me. But I will be writing VGA Drivers and such so you guys will get to see my code and use it in Cosmos if you would like. I am not here to steal any of Cosmos's users. I just have my own project and I am releasing the code to help others learn and develop. Thanks, Matt
Mar 22, 2013 at 10:18 PM
lolface123 wrote:
civilwarrock wrote:
ahmedyosrihamdy wrote: Hi, I want to know how can I print a picture on the screen.   I've managed to convert the picture into code but I still don't know how to print it on the screen??!! Depending on what you used to convert it. If you used my convertor then use this   private static int i = 0; private static int t = 0; private static int count = 0; public static void DrawFrame(uint[] Arr, int width, int length, int xpixel, int ypixel) { count = 0; for (i = 0; i < length; i++) { for (t = 0; t < width; t++, count++) { if (Arr[count] == 0xFF00FF) { } else { SetPixel((int)(0 + (uint)t + 0 + (uint)xpixel), (int)(0 + (uint)i + 0 + (uint)ypixel), (int)Arr[count]); } } } }   You will need to replace SetPixel with your setpixel method. My program also converts the colors to hex so if you are using it you will need to use the SVGA Driver, and if you dont want flicker then take a look at my driver: pearos.codeplex.com under Core > Screen > Screen and the folder drivers.  And if you do use SVGA then you will need my mouse driver under Core > Cursor > Hardware to fix the bounds issue. And if you use VGA then you will need to use test mode to use the hex values.  Link to my convertor:Pear CAIC Hope it helps - Matt
Matt, your link just leads me to an unfinished project.
Ah someone has called for help.. :) Matt at your service. My project went dead because I was moving into a new area of testing and programming. I am going to, today release it. I have created a C# IL Compiler, x86 Assembly Kernel, C# Kernel, and C# Operating System (PearOs4). I have gone off the grid as you could say. I am Cosmos free, I moved away so I could learn, expand and play. My platform, requires no installation, it has Multitasking Support, Timer Support, Memory Management and more. Its written from the ground up by me. But I will be writing VGA Drivers and such so you guys will get to see my code and use it in Cosmos if you would like. I am not here to steal any of Cosmos's users. I just have my own project and I am releasing the code to help others learn and develop. Thanks, Matt
Mar 22, 2013 at 10:19 PM
Sorry for the duplicated messages, Codeplex has a refresh button glitch. If I refresh the page it keeps posting my reply... - Matt
Developer
Mar 22, 2013 at 11:43 PM
Pearos4 is it better than the last pearos release before you closed it. I was a developer for that and you just closed it.
Mar 22, 2013 at 11:48 PM
Edited Mar 22, 2013 at 11:48 PM
clearosdev wrote:
Pearos4 is it better than the last pearos release before you closed it. I was a developer for that and you just closed it.
Lets put it this way. It can Multitask, has Memory Management and a lot of other features I really needed. It is not close to being finished by far. However, as the weeks progress it will pass up all other versions. But it still is better, faster and can Multitask which is important to me. - Matt
Developer
Mar 23, 2013 at 12:00 AM
Will it be open on codeplex or closed source?
Mar 23, 2013 at 2:01 AM
Edited Mar 23, 2013 at 2:50 AM
clearosdev wrote:
Will it be open on codeplex or closed source?
It will open source. :) - Matt

Its on pearos.codeplex.com right now. So if you want you can check it out.