0
votes

Old product, but still, it was so annoying, that I share it anyway. Maybe there are others stuck with VS2010 projects, or maybe later VS versions inhibit the same problem.

So: I use PhotoShop to edit the icon image for an app. To display the icon correctly on various backgrounds, I use a transparent background for the image. The icon file has to contain various resolutions from 16x16x bits to 96x96x24bits. Problem: I happened to change the images, but after that change, icon backgrounds became solid - transparency was lost. I tried changing the color that represented transparency, but nothing helped.

1
The icon editor in Visual Studio doesn't actually support transparency. Export directly to an ICO file from Photoshop or whatever icon editor you're using, and just don't use the Visual Studio icon editor. The resource compiler will find and use them just fine, leaving transparency intact.Cody Gray

1 Answers

1
votes

The resolution: in Visual Studio Icon editor I had to remove the image type, add it again, and paste the image into the newly created image type. This way, transparency was retained.

So, to be exact, here's the workflow to keep transparency:

  • In PhotoShop, edit your image with a transparent background.
  • In VS, open your icon file.
  • In VS, remove the target image type (i.e. the 3x32x24bits image type, within the icon file)
  • In PhotoShop, resize your image to the target size (32x32).
  • In PhotoShop select all, and click Edit / Copy Merged.
  • In VS use the selector tool, and click into the target image.
  • In VS Paste into the target image.