Link to home
Start Free TrialLog in
Avatar of johnny_device
johnny_device

asked on

Embedding .png in Visual Studio Project

Is there a way of embedding .png images in a Visual Studio 2010 project?  The project currently reads .png images from disk, for the purposes of changing button backgrounds.  This works ok, but means that dozens of separate image files need to be maintained, rather than having the images incorporated into the .exe.  .bmp files can be embedded easily, but do not retain the smooth shading of the original .png, nor the transparency.  I can put them onto a uniform background, and therefore get round the transparency issue, but the images still come out "striated" where there is graduated shading, and thus unusable.

Any tips?

jd
Avatar of Bryan Butler
Bryan Butler
Flag of United States of America image

If it was a silverlight project, I think you could do it.  This link talks about it, but I'm guessing has the same issues that you are seeing:

http://stackoverflow.com/questions/278838/visual-studio-how-to-store-an-image-resource-as-an-embedded-resource
ASKER CERTIFIED SOLUTION
Avatar of JimBeveridge
JimBeveridge
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of johnny_device
johnny_device

ASKER

Thanks for the replies, guys.  I'll split the spoils, because I can learn from more than one answer, but Jim(Beveridge)'s is the fullest response for me.


Regards,

jd