Need example for read/write bmp
-
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
-
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
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 )
-
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 )
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