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. Write Text on Image using Indexed Image Color Pallete

Write Text on Image using Indexed Image Color Pallete

Scheduled Pinned Locked Moved C#
databasecom
3 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.
  • A Offline
    A Offline
    adnanrafiq
    wrote on last edited by
    #1

    How i can write text on image, using the color pallete of index image like tif,so resulting jpg have text color same like image.Regards,adnan

    Many Thanks, Adnan Rafiq muhammadadnanrafiq@gmail.com

    C 1 Reply Last reply
    0
    • A adnanrafiq

      How i can write text on image, using the color pallete of index image like tif,so resulting jpg have text color same like image.Regards,adnan

      Many Thanks, Adnan Rafiq muhammadadnanrafiq@gmail.com

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      JPEGs are never indexed, so you really can't. A jpeg is lossy and no matter what colors you start with, it will go to 24 bit and the lossy compression will add colors. If you were to save back out as a tiff, then I guess you could find the colors you want my looking through the pallette. I never use 256 color tho, nor do many other people, it's a shame you need to.

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      A 1 Reply Last reply
      0
      • C Christian Graus

        JPEGs are never indexed, so you really can't. A jpeg is lossy and no matter what colors you start with, it will go to 24 bit and the lossy compression will add colors. If you were to save back out as a tiff, then I guess you could find the colors you want my looking through the pallette. I never use 256 color tho, nor do many other people, it's a shame you need to.

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        A Offline
        A Offline
        adnanrafiq
        wrote on last edited by
        #3

        what if we create a bitmat having format System.Drawing.Imaging.PixelFormat.Format24bppRgb ?

        Many Thanks, Adnan Rafiq muhammadadnanrafiq@gmail.com

        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