Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. ImageStream from Resource...

ImageStream from Resource...

Scheduled Pinned Locked Moved C#
csharphelpquestiongraphicshardware
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Norman Timo
    wrote on last edited by
    #1

    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

    N 1 Reply Last reply
    0
    • N 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-Timo

      N Offline
      N Offline
      Norman Timo
      wrote on last edited by
      #2

      Does really no one knows something about my problem? *PushThreadForward* Ciao Norman-Timo

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups