Click here to Skip to main content
15,888,313 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I am using an algorithm to straighten images. A quadrilateral image is mapped into a rectangular image. I am able to compute a grid with pixel mapping defined at its each node. What i want is to find out an efficient way to copy the respective pixels into my rectangular image. I have tried Get and SetPixel methods of bitmap class which are too slow. Currently the solution i found uses lockbits method to copy chunks of source image into my destination image because simple lockbits method throws out of memory exception if the source image is too large.
Posted
Comments
Nathan Minier 11-Aug-14 9:40am    
Is there a compelling reason that you cannot use .Clone(Rectangle, PixelFormat)?

http://msdn.microsoft.com/en-us/library/ms141944%28v=vs.110%29.aspx
Member 10919102 17-Sep-14 6:06am    
Yes it throws out of memory exception even if the rectangle is of the right size. I think it has something to do with indexed pixel format.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900