How to make parts of an image transparent using Visual Studio 2017 Editor RRS feed

  • Question

  • Hi, I am to make my own graphic , using the Visual Studio 2017 Image Editor. I would like to design a heart in the center of the image, and where there are no pixels, I want those areas transparent. The first thing I did, I created a new item inside the Resources folder, "bitmap", and named it hearts.bmp. However, after saving it from the Image Editor, I have noticed that the areas that are suppose to be transparent, are white, when I place it on a PictureBox. I am suspecting it is because the image format is a bmp, but when I add a new item from the resource folder, the only choice I have is choosing a bitmap. So, how can I make this image to include transparent areas?
    Wednesday, July 4, 2018 6:14 PM


All replies

  • See Image Editor and you can choose "PNG Image"

    Wednesday, July 4, 2018 6:44 PM
  • Before coming here, I have must of read that page 4 times, and yes it says that you can work with png files. However, when selecting add new item from the resources folder, the only option to choose from is bmp. I even tried renaming the format to png, just for the sake of it, and I get an error stating the file is an unknown format. I then tried making an image in a 3rd party image editor, saved it as a png, which did import, but then I was not able to edit it in the Visual 5tudio Image Editor. All tools except for the magnifying glass where greyed out.
    Wednesday, July 4, 2018 9:51 PM
  • It is from the Project, not resource folder :

    • Edited by Castorix31 Wednesday, July 4, 2018 10:00 PM
    Wednesday, July 4, 2018 9:56 PM
  • I cannot see a programming language would make a difference, but I am using C#, and this is what I get....

    Wednesday, July 4, 2018 10:40 PM
  • It works for any language, but

    You did not right-click on Project, you right-clicked on Solution...

    • Marked as answer by MrNeilen Thursday, July 5, 2018 4:34 AM
    • Unmarked as answer by MrNeilen Thursday, July 5, 2018 4:35 AM
    Wednesday, July 4, 2018 11:17 PM
  • So I found a solution. Apparently, you do need to download the C++ library. I do not know why? That only has to do with coding. Anywho here is the link

    … take a look at Tim Wappat's post.

    • Marked as answer by MrNeilen Thursday, July 5, 2018 4:38 AM
    Thursday, July 5, 2018 4:38 AM