Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to split the image into number of parts
Posted

1 solution

You have to create each part as a separate image.

1) Load the whole image, and (say) you want it in four equal pieces.
2) Create four new images large enough to hold each partial image.
3) Get the Graphics context for each sub image in turn (using Graphics.FromImage[^]) and use the Graphics.DrawImage overload[^] which allows you to specify the location in the destination, and the area of the original that you wish to draw.
4) You can then dispose of your Graphics objects, and save your images.
 
Share this answer
 

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