maria 🌟
maria 🌟
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
but for me 7 milliseconds are already fast enoughbut for me 7 milliseconds are already fast enough
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
instead of copyng pixel per pixel copy whole image?
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
how
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
well i suppose i dont need the parallel then
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
before it would take like 9000 miliseconds 😳
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
both take 7 miliseconds
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
i suppose im gona try it one with and one without and check the times with a stopwatch
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
im making a thread for each whole image so idk
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
its working but its very slow so im trying with graphics
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
and im making to support multiple wallpapers per screen
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
the program gets random images related of the word thath you give and it changes the background every x time you selected automatcly
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
make wallpaper
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
i think the best is to lock bits and modify the raw data of the bytes
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
you cant acess a bit map twice from 2 threads at same time
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
41 replies
CC#
Created by maria 🌟 on 4/18/2023 in #help
❔ How i can write this code more efficient
private static Image GenerateScreensImage(Image[] Images)
{
var Result = ResolveScreen();

Console.WriteLine("Highest X:" + Result.XHighest + " Highest Y:" + Result.YHighest);

Bitmap Image = new Bitmap(Result.XHighest, Result.YHighest);

Console.WriteLine("Gemerating image");
foreach (var Element in Result.ScreensInfo)
{
Console.WriteLine("Making image " + Element.Index);
Console.WriteLine("Screen:" + Element.Index + " X:" + Element.XPoint + " Y:" + Element.YPoint);

for (int x = Element.WidthPoint; x < Element.XPoint; x++)
{
for (int y = Element.HeightPoint; y < Element.YPoint; y++)
{
Color PixelColor = ((Bitmap)Images[Element.Index]).GetPixel(x - Element.WidthPoint, y - Element.HeightPoint);

Image.SetPixel(x, y, PixelColor);
}
}
}

return Image;
}
private static Image GenerateScreensImage(Image[] Images)
{
var Result = ResolveScreen();

Console.WriteLine("Highest X:" + Result.XHighest + " Highest Y:" + Result.YHighest);

Bitmap Image = new Bitmap(Result.XHighest, Result.YHighest);

Console.WriteLine("Gemerating image");
foreach (var Element in Result.ScreensInfo)
{
Console.WriteLine("Making image " + Element.Index);
Console.WriteLine("Screen:" + Element.Index + " X:" + Element.XPoint + " Y:" + Element.YPoint);

for (int x = Element.WidthPoint; x < Element.XPoint; x++)
{
for (int y = Element.HeightPoint; y < Element.YPoint; y++)
{
Color PixelColor = ((Bitmap)Images[Element.Index]).GetPixel(x - Element.WidthPoint, y - Element.HeightPoint);

Image.SetPixel(x, y, PixelColor);
}
}
}

return Image;
}
41 replies