Home All Groups Group Topic Archive Search About
Author
26 Nov 2007 9:20 AM
Ruby Nadler
Hi EveryOne,
Does some one knows a way or tool that knows how to divide image into
regions with c# so if the image is like a table style i will now the
positions of the columns?
i can read the pixlels colors but it will be very slow.
thanks

Author
26 Nov 2007 4:35 PM
Nicholas Paldino [.NET/C# MVP]
Ruby,

    Can you be a little more specific with what you are trying to do?  What
do you mean if the image is like a "table style"?  Are you trying to place
pieces of an image into a table?

    What is the end result of what you are trying to do?


--
          - Nicholas Paldino [.NET/C# MVP]
          - mvp@spam.guard.caspershouse.com

Show quote
"Ruby Nadler" <RubyNad***@discussions.microsoft.com> wrote in message
news:48912885-B6BF-4D70-9243-29124576F2B8@microsoft.com...
> Hi EveryOne,
> Does some one knows a way or tool that knows how to divide image into
> regions with c# so if the image is like a table style i will now the
> positions of the columns?
> i can read the pixlels colors but it will be very slow.
> thanks
>
Author
27 Nov 2007 4:44 AM
Ruby Nadler
Hi Nicholas,
what i am trying to do is cut b&w image (like newspaper page) into columns
and rows according to its layout.
any idea?
thanks.

Show quote
"Nicholas Paldino [.NET/C# MVP]" wrote:

> Ruby,
>
>     Can you be a little more specific with what you are trying to do?  What
> do you mean if the image is like a "table style"?  Are you trying to place
> pieces of an image into a table?
>
>     What is the end result of what you are trying to do?
>
>
> --
>           - Nicholas Paldino [.NET/C# MVP]
>           - mvp@spam.guard.caspershouse.com
>
> "Ruby Nadler" <RubyNad***@discussions.microsoft.com> wrote in message
> news:48912885-B6BF-4D70-9243-29124576F2B8@microsoft.com...
> > Hi EveryOne,
> > Does some one knows a way or tool that knows how to divide image into
> > regions with c# so if the image is like a table style i will now the
> > positions of the columns?
> > i can read the pixlels colors but it will be very slow.
> > thanks
> >
>
>
>
Author
27 Nov 2007 11:04 AM
henon
On Nov 27, 5:44 am, Ruby Nadler <RubyNad***@discussions.microsoft.com>
wrote:
> Hi Nicholas,
> what i am trying to do is cut b&w image (like newspaper page) into columns
> and rows according to its layout.
> any idea?
> thanks.
>

AFAIK, you can manipulate images efficiently by using unsafe code
regions and pointer arithmetics. There is a simple example in C# 3.0
in a Nutshell which I remember:

unsafe void RedFilter(int[,] bitmap)
{
  int length = bitmap.Length;
  fixed (int* b= bitmap)
  {
    int* p = b;
    for(int i = 0; i < length; i++)
      *p++ &= 0xFF;
  }
}

This kind of iteration over a bitmap avoids runtime index checking and
runtime type checking as you would have by accessing the bitmap via
[x,y]
hth,
-- Henon

my site: http://www.eqqon.com

AddThis Social Bookmark Button