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. Visual Basic
  4. Need example for read/write bmp

Need example for read/write bmp

Scheduled Pinned Locked Moved Visual Basic
algorithmsjsonperformancetutorial
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.
  • R Offline
    R Offline
    rfrank5356
    wrote on last edited by
    #1

    Hi I need to build an app that does the following - I am processing about 1000 10MP files each week . . . Read a jpg, inflate to bmp in memory search the bmp row by row for a selected color - when found copy and display a 300x400 pixel snippet, determine the min/max x-y bounds of the homogenous color and save for later exclusion processing, create a new bmp structure with this data, allow a user to enter a string to append to the original file name (or OCR the pixels contained in the bounded area), then save the new image, and continue searching frombeyond the bounded area. I think I need an api to read the jpg data into a bmp table - then do some straightforward line scanning, some calculations for determining the bounds of the extract area, then an api to an ocr routine, then an api to write the new file. Does anyone have pointers to code snippets that will model any of these components Thanks Bob

    C 1 Reply Last reply
    0
    • R rfrank5356

      Hi I need to build an app that does the following - I am processing about 1000 10MP files each week . . . Read a jpg, inflate to bmp in memory search the bmp row by row for a selected color - when found copy and display a 300x400 pixel snippet, determine the min/max x-y bounds of the homogenous color and save for later exclusion processing, create a new bmp structure with this data, allow a user to enter a string to append to the original file name (or OCR the pixels contained in the bounded area), then save the new image, and continue searching frombeyond the bounded area. I think I need an api to read the jpg data into a bmp table - then do some straightforward line scanning, some calculations for determining the bounds of the extract area, then an api to an ocr routine, then an api to write the new file. Does anyone have pointers to code snippets that will model any of these components Thanks Bob

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

      rfrank5356 wrote:

      Read a jpg, inflate to bmp in memory

      The Image class does this. In fact, it's more work to have it in memory as a jpg/

      rfrank5356 wrote:

      search the bmp row by row for a selected color -

      My image processing articles show how to do this

      rfrank5356 wrote:

      (or OCR the pixels contained in the bounded area),

      That part is very hard, you won't do it, I don't expect.

      rfrank5356 wrote:

      I think I need an api to read the jpg data into a bmp table

      The Bitmap constructor will read a jpg, and it's a bitmap in memory.

      rfrank5356 wrote:

      then an api to an ocr routine

      There are OCR libraries for purchase if you really need this, Atalasoft have one and the libraries of theirs I use, are excellent.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      R 1 Reply Last reply
      0
      • C Christian Graus

        rfrank5356 wrote:

        Read a jpg, inflate to bmp in memory

        The Image class does this. In fact, it's more work to have it in memory as a jpg/

        rfrank5356 wrote:

        search the bmp row by row for a selected color -

        My image processing articles show how to do this

        rfrank5356 wrote:

        (or OCR the pixels contained in the bounded area),

        That part is very hard, you won't do it, I don't expect.

        rfrank5356 wrote:

        I think I need an api to read the jpg data into a bmp table

        The Bitmap constructor will read a jpg, and it's a bitmap in memory.

        rfrank5356 wrote:

        then an api to an ocr routine

        There are OCR libraries for purchase if you really need this, Atalasoft have one and the libraries of theirs I use, are excellent.

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        R Offline
        R Offline
        rfrank5356
        wrote on last edited by
        #3

        Thanks very much - I've downloaded the sdk, looked at some of the references - still working - Is there a short vb code snippet I can grab that will allow me to get a single image and start rummaging - I have gone through a zillion (well - maybe a million) pages and no simple thing that I can grab - Once I have a start - I can usually make progress . . . Thanks Again !! Best Bob

        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