LEADTOOLS Support
Imaging
Imaging SDK Questions
HOW TO: Modify a small portion of a large image without loading the entire image
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, October 22, 2008 6:22:54 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
Sometimes you might want to make a small change to a specific area of a large image that would take up a lot of memory if loaded in its entirety. For example, you just want to stamp some text or fill a 100x100 rectangle in a 10,000x10,000 image. Instead of loading the entire image into memory (over 300MB at 24bpp), you can load just the tile, modify it, and then save it back to the image. This C# 2005 example uses LEADTOOLS v16 .NET interface shows how to do this by:
1. Using the RasterCodecs.Load overload function which takes a Rectangle to load a specific portion (tile) of the image
2. Modify the tile with an ImageProcessing command such as FlipCommand
3. Use the RasterCodecs.SaveImage event to save the image row by row (using RasterImage.GetRow) so that you don't have to load the entire image into memory at one time.
LEADTOOLS Support
Imaging
Imaging SDK Questions
HOW TO: Modify a small portion of a large image without loading the entire image
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.