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 / C++ / MFC
  4. 256 colors icon getting modified without a reason

256 colors icon getting modified without a reason

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 Posts 3 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.
  • D Offline
    D Offline
    DaFrawg
    wrote on last edited by
    #1

    I took an image from my MSN Messenger 6 (I use XP and in my user files root it is somewhere in Application Data as a PNG image with a .tmp extension), converted it, using IrfanView 3.80, to a 256-colors 96x96 pix icon (ICO). The colors were still really good and the same as the PNG. But when I put the ICO into my resouce stuff and load it into an CImageList, the palette is being ignored and my icon gets really 4-bits like. How to avoid this?!

    J 1 Reply Last reply
    0
    • D DaFrawg

      I took an image from my MSN Messenger 6 (I use XP and in my user files root it is somewhere in Application Data as a PNG image with a .tmp extension), converted it, using IrfanView 3.80, to a 256-colors 96x96 pix icon (ICO). The colors were still really good and the same as the PNG. But when I put the ICO into my resouce stuff and load it into an CImageList, the palette is being ignored and my icon gets really 4-bits like. How to avoid this?!

      J Offline
      J Offline
      Johnny
      wrote on last edited by
      #2

      VisualStudio is a bit fussy, and if you open it from within the resource editor it will convert it automatically - you have to sneak it in the back (just copy over the existing file) and make sure not to open it from within VisualStudio itself.

      A 1 Reply Last reply
      0
      • J Johnny

        VisualStudio is a bit fussy, and if you open it from within the resource editor it will convert it automatically - you have to sneak it in the back (just copy over the existing file) and make sure not to open it from within VisualStudio itself.

        A Offline
        A Offline
        Atif Mushtaq
        wrote on last edited by
        #3

        I am also getting the similar kind of problem , i am using VC6.0. It is relating to winxp ...i needed a folder icon to display in my treeCtrl application.so i exteracted it using a IconExtractor software from the System32\url.dll.Internet Explorer Favorite picks its icons from this dll. This icon display all right with full quality in all other OS(WIN98,WINME,WIN2000) But in WINXP it i get the dark shade under these icons . But it is not only with me my app, i also saw another very famouse software (Neero Burning ROM) which use the same icon , and it also gets the similar shade under that icon. So there must be some problem regarding WINXP. But on the other hand IE Favorites in WINXP display that all rightt. so any clue. No Worries!

        D 1 Reply Last reply
        0
        • A Atif Mushtaq

          I am also getting the similar kind of problem , i am using VC6.0. It is relating to winxp ...i needed a folder icon to display in my treeCtrl application.so i exteracted it using a IconExtractor software from the System32\url.dll.Internet Explorer Favorite picks its icons from this dll. This icon display all right with full quality in all other OS(WIN98,WINME,WIN2000) But in WINXP it i get the dark shade under these icons . But it is not only with me my app, i also saw another very famouse software (Neero Burning ROM) which use the same icon , and it also gets the similar shade under that icon. So there must be some problem regarding WINXP. But on the other hand IE Favorites in WINXP display that all rightt. so any clue. No Worries!

          D Offline
          D Offline
          DaFrawg
          wrote on last edited by
          #4

          No, that is an other problem. The icon is 24-bits (I guess it is) and that dark shade is real. But XP can 'convert' that shade to a transparency level and so use it for the Operating System. For instance, in the "Choose an icon" :~ dialog (when choosing an icon for a link or a folder or whatever), you'll see an array of some icons in SHELL32.DLL :~ . You don't see a weird shadow there. But when a not-advanced program opens/extracts the icon, the shade will appear, because it is impreted as an opaque color.

          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