Does a functional image conversion tool exist for the latest release of Cosmos?

Mar 5, 2012 at 7:56 AM

Currently, I have a graphical user interface with a mouse set up; but I would rather render a cursor to the screen that I have already designed instead of simply displaying a pixel.

Mar 5, 2012 at 8:37 AM
SethiXzon wrote:

Currently, I have a graphical user interface with a mouse set up; but I would rather render a cursor to the screen that I have already designed instead of simply displaying a pixel.

Yes one does, it super super fast and very small: http://pearos.codeplex.com/releases/view/83066 You however will need to be using the SVGA Driver unless you use test mode in VGA because this uses hex for colors. But it works well, I built it and I use it in my os. It support Png, Bmp, Tiff, ect... And you will need this code to draw the image:

  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]);
                    }
                }
            }
        }

Just give it the Array, and size and location, and it will draw it. However you will need to replace SetPixel with your setpixel
method as mine is different than yours. Hope it helps - Matt

My SVGA Code and drivers are located here: pearos.codeplex.com under Core > Screen > Screen.cs and the drivers are in the folder
drivers ect.. But if you do use my SVGA driver for no flicker your going to also have to use my custom mouse driver to fix the
mouse bounds issue, located on Core > Cursor > Hardware I believe. If you need and help let me know.

Mar 5, 2012 at 6:55 PM

I noticed that to use your code; I must copy code from quite a few other locations in your source; as they reference different classes inherent to your operating system.

I did find a relatively older conversion tool of your design; however, it tends to crash when converting images; even those that are of a relatively small resolution. 

Mar 6, 2012 at 12:10 AM
SethiXzon wrote:

I noticed that to use your code; I must copy code from quite a few other locations in your source; as they reference different classes inherent to your operating system.

I did find a relatively older conversion tool of your design; however, it tends to crash when converting images; even those that are of a relatively small resolution. 

Yeah everything relies on something else. Its kind of like a big puzzle, every piece does something important for the other pieces, or they just are wrappers for the system. Usually I do this to keep the code in order and organized as much as possible, but it can be a pain for someone trying to implement the same functions. Yeah the old conversion tool worked but it was based off of MS4 not the current dev kit. So it would not supprise me if it didn't work. - Matt