none
Highlighting Text (not really text) in a tiff image RRS feed

  • Question

  • Hi Everyone,

    I've been asked to look into the ability of highlighting various areas of a tiff image.

    I am using VS2010 Pro, C# Winforms

    I cannot OCR these to another application, just straight tiff images created by scanner.

    I don't want to open these with 3rd party like Ecopy or Acrobat

    My idea is to allow user to draw rectangle around area to be highlighted, convert that area to a bitmap variable, examine each pixel in the bitmap variable and if the color is white then change it to yellow, then overlay rectangle area in tiff image with the bitmap variable and allow user to save when completed.

    Has anyone had any luck trying something like this?  Are there any better solutions out there for something like this?

    Tuesday, October 1, 2013 8:57 AM

Answers

All replies

  • What's a tiff image?  Usually tiff refers to an image or images stored in a tiff file.  You seem to mean something different.
    Tuesday, October 1, 2013 9:18 AM
  • tiff file format created by scanner.
    Tuesday, October 1, 2013 9:25 AM
  • But what does that have to do with what you want to do?  What does the file format containing the image have to do with modifying the image?  It seems you want to change the color of the pixels of a Bitmap within a rectangular area.  If that's what you want to do, what happens if no pixel matches the color you're testing for?
    Tuesday, October 1, 2013 9:31 AM
  • Nothing directly, this is what I have to work with.  I am trying to mimic highlighting by replacing pixel color on selected areas of scanned documents that are generated from another system.  If no pixel matches the color I am looking for then it would not be changed.  But all documents are just printed text documents that are then scanned for processing.

    I am not sure if this is even the right way to go about doing this, just trying to prove / disprove my concept at this point.

    Tuesday, October 1, 2013 9:44 AM
  • You can search within and modify the pixels of a bitmap using GetPixel and SetPixel or LockBits.
    Tuesday, October 1, 2013 10:16 AM