Click here to Skip to main content
15,894,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,
I have code in C3 which converts sbyte array to image. I am developing Windows metro style application and want to use this code in metro application?
Code is as
sbyte[][] img = byteIMG.Array;
                Bitmap bmp = new Bitmap(strWidth, strHeight);
                Graphics g = Graphics.FromImage(bmp);
                g.Clear(Color.White);

                for (int i = 0; i <= img.Length - 1; i++)
                {
                    for (int j = 0; j <= img[i].Length - 1; j++)
                    {
                        if (img[j][i] == 0)
                        {
                            g.FillRectangle(Brushes.Black, i, j, 1, 1);
                        }
                        else
                        {
                            g.FillRectangle(Brushes.White, i, j, 1, 1);
                        }
                    }
                }
 bmp.Save("C:\\" + strFileName + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);

But i cant use some of namespaces required for this ex System.Drawing.Graphics and System.Drawing.Bitmap.

Could you please guide me how can i achive this ?

your help would be greatful for me.... Its urgent need in my project and am searching a lot on but don't found any soln ..

Please guide me

Thanks in Advance
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900