C
C#2y ago
uselessxp

❔ best way to include and works with images

I'm working on a project, and I'll have to work with several images. Actually the project is working with:
string ImageFile1 = @"C:\Users\xxxxx\Desktop\image1.png";
string ImageFile2 = @"C:\Users\xxxxx\Desktop\image2.png";
string ImageFile3 = @"C:\Users\xxxxx\Desktop\image3.png";
string ImageFile4 = @"C:\Users\xxxxx\Desktop\image4.png";
...
string ImageFile1 = @"C:\Users\xxxxx\Desktop\image1.png";
string ImageFile2 = @"C:\Users\xxxxx\Desktop\image2.png";
string ImageFile3 = @"C:\Users\xxxxx\Desktop\image3.png";
string ImageFile4 = @"C:\Users\xxxxx\Desktop\image4.png";
...
Is there a way to improve this? I'm not referring to the fact I'm using path of my PC, but I'd like to make it more elegant. Regarding the path I could put images on a project subfolder, adding them as resources, changing the extension with a random one, so final users will not know they are simple .png But are there other solutions? I read about the ability to convert an image to a string, using bitmaptostring. What do you think about?
1 Reply
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server