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. Indexed images with Graphics class

Indexed images with Graphics class

Scheduled Pinned Locked Moved C#
graphicsadobequestion
2 Posts 2 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.
  • G Offline
    G Offline
    gigahertz205
    wrote on last edited by
    #1

    I know that the Graphics class cannot take indexed images (I dont really know why). So I need to convert the indexed image to a color image, then convert it back to indexed image. How would I go about doing this conversion into color then back into indexed? Would there be data loss during the conversions? When i was doing it using Photoshop, every time i switched between indexed and RGB, the image got darker and darker, which meant data wasn't being preserved.

    M 1 Reply Last reply
    0
    • G gigahertz205

      I know that the Graphics class cannot take indexed images (I dont really know why). So I need to convert the indexed image to a color image, then convert it back to indexed image. How would I go about doing this conversion into color then back into indexed? Would there be data loss during the conversions? When i was doing it using Photoshop, every time i switched between indexed and RGB, the image got darker and darker, which meant data wasn't being preserved.

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      gigahertz205 wrote:

      I know that the Graphics class cannot take indexed images

      Are you sure? Indexed to RGB shouldn't cause any visible change. RGB to indexed may cause a change, since a best-fit color table needs to be created.

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      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