ImageStream from Resource...
-
Hello C#-Community! I´ve a problem with a ImageStream from a Resource file. My programming partner (not available anymore) used some nice icons (I hope they are icons!), but he embedded them in a resource-file. It´s no problem to get these Images via:
private System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TestRessource)); private System.Windows.Forms.ImageList imlIcons; // .. this.imlIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imlIcons.ImageStream"))); imlIcons.Images[0].Save("test.ico", ImageFormat.Icon);
But the Save-Method did not return the expected result. The resulting .ico-file is only a Hex-File. To understand what he is doing with the stream - here is a code snippet from the resource file: <data name="imlIcons.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value> Private</value> </data> <data name="imlIcons.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </data> <data name="imlIcons.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuNTAw MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZT .... ..... .... </value> </data> Can anybody help me to save each image in a seperate .ico-files, so that I can use these icons in other applications? Or how can I find out in which format these images are? And then how I can convert them into icons? Please, I need help... Norman-Timo -
Hello C#-Community! I´ve a problem with a ImageStream from a Resource file. My programming partner (not available anymore) used some nice icons (I hope they are icons!), but he embedded them in a resource-file. It´s no problem to get these Images via:
private System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TestRessource)); private System.Windows.Forms.ImageList imlIcons; // .. this.imlIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imlIcons.ImageStream"))); imlIcons.Images[0].Save("test.ico", ImageFormat.Icon);
But the Save-Method did not return the expected result. The resulting .ico-file is only a Hex-File. To understand what he is doing with the stream - here is a code snippet from the resource file: <data name="imlIcons.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value> Private</value> </data> <data name="imlIcons.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </data> <data name="imlIcons.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64"> <value> AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuNTAw MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZT .... ..... .... </value> </data> Can anybody help me to save each image in a seperate .ico-files, so that I can use these icons in other applications? Or how can I find out in which format these images are? And then how I can convert them into icons? Please, I need help... Norman-TimoDoes really no one knows something about my problem? *PushThreadForward* Ciao Norman-Timo