Tutorial 2: Auto generating regular slices Slice up images into separate files
This tutorial covers creating a new project and auto generating regular slices, including using padding and spacing.
Creating the new project
- Select Open from the File menu, or press Control+O
- When prompted, select the sample2.bmp image from your Slicr samples folder (typically
C:\\ocuments and Settings\<username>\Application Data\cyotek\slicr\samples).
You should now have something approximating the image below:
Although it's a little difficult to tell due to the dark background of the image, it has been "washed out" indicating that the entire image currently contains no segments or slices.
Auto generating slices
Select Add Slices from the Project menu, or press Control+A to display the Add Slices Wizard.
The default mode for this Wizard is to split the image into slices of a fixed size. However, in this image it's fairly clear to see that it's comprised of 9 images in a 3x3 grid, so lets tell Slicr to do it that way. First, select Slice by rows and columns, then enter 3 in the Rows and Columns fields.
You can now see the 9 separate images, but they are still incorrect - this image has both some padding around the edge, and spacing between the images. By default, Slicr will display a pixel grid when you zoom in. This can help calculate spacing offsets.
In this example, all padding and spacing is a single pixel, so enter 1 into all fields in the Padding and Spacing groups.
By default, when generating automatic slices, Slicr will slice up the image from edge to edge. When using padding or spacing, that can mean many additional slices - Slicr will disable these additional slices, but you may find these extra's undesirable. By changing the slice mode, you can choose to use edge to edge, or box. Whereas edge goes from edge to edge, box goes from point to point - 4 segments will be created for each rectangle. Edge will use less individual segments, but create more slices. Box will use more segments, but create less slices. Try changing the Slice mode to Box now.
This reduces the number of slices back to 9.
Finally, click Finish to apply your settings and close the wizard. You can now configure each slice's properties if required, set export options or add additional slices.
The original location of this content can be found here.
- Windows 10, 8.1, 8, 7, Vista SP2
- Microsoft .NET Framework 4.6
- 20MB of available hard disk space