Click here to Skip to main content
13,294,840 members (63,220 online)
Rate this:
Please Sign up or sign in to vote.
See more:
how to split the image into number of parts
Posted 2-Dec-12 22:16pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171207.1 | Last Updated 3 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100