Crop a photo into evenly sized squares?

Post Reply
RocckLobster

Crop a photo into evenly sized squares?

Post by RocckLobster »

I have a photo that I'd like to crop multiple times in order to create nine separate images that, if pasted back together in a new image file, would look like the original image; almost like creating a tiled puzzle. So, the challenge is how to do it in a way that makes everything come out evenly...it looks like the crop tool only allows me to crop one section of the image; then I have to save that cropped area and then try to crop the next area, but there are no markers to tell me where I already cropped.

Any suggestions to make this task easier?

Thanks!
heinz-oz

Post by heinz-oz »

Which version of PI do you use?

There is a function in PI 10 (I'm sure PI 11 has it too) that allows to split an image into a number of columns and rows and makes each cell a separate object.

In PI 10 you'll find that on the menu bar in Web >Grid and Partition. Works very well.
RocckLobster

Post by RocckLobster »

Hello Heinz,

I am using PI 11. Although there is a Grid and Partition menu option in the Web menu, it is disabled unless you are starting from a new file. So, using your suggestion as a starting point, here's what I was able to do:

1. Start a new file set to the same size as the active file
2. Select Web -> Grid and Partition. Set to 3 columns and 3 rows. Grid lines set to 5 pixels, black color. Option to Draw Border line is unchecked; option to convert cells to objects is unchecked.
3. Use the magic wand selection tool and click in the new grid area; right-click and Invert.
4. Right click again and choose Convert to Object.
5. Change the selector to the Pick tool. Click on one of the grid lines you just created and Copy/Paste to the other image file and you now have a nice grid overlay, which can be used for guidelines for cropping.

Thanks for the tip!

Mike
keenart

Post by keenart »

I think it is the nearly the same as Heinz-oz mentions, and that is the Slice Tool. Open the Image and then Press the key I to select the Slice Tool.
RocckLobster

Post by RocckLobster »

I'm not familiar with the Slice tool; I'll have to read up on that one.

Thanks.
heinz-oz

Post by heinz-oz »

I will check PI 11 tonight when I get home. Only have PI 10 here at work.

I have set the options to 0 for the grid line and ticked the option to convert each cell to object. By simply using the selection tool or the layer manager I can select any of the cells and shift the contents around. When looking at the original image, you don't even see the cell boundaries.

In order for the process to work, you need to have an image open.

Here is an example of the menu choice

Image

and here of the effect when you unlock the cell from layer manager and shift it

Image

As you can see, there are no grid lines or indications on the image where the grid lines are.

This feature is helpful for larger images on web pages, where the image loads gradually, bit by bit.
RocckLobster

Post by RocckLobster »

Heinz,

My goal is to draw grid lines on my image so I have a guideline for cropping out the grids and saving to new images. Here's the image on which I overlayed the grid:

Image

And here's an example of the end result, a photo collage for my wall:

Image
heinz-oz

Post by heinz-oz »

Whatever works for you :wink:

There is no need though to crop out the grids. With the options set like shown in my example, each grid cell is a separate object. I can simply select one, copy or cut it and paste as a new image, done. And I don't lose parts of the image where the grid lines are either :D
RocckLobster

Post by RocckLobster »

If I could figure out how to use the grid and partition tool like you demonstrated, I'm sure it would be a lot easier....

For some reason, though, it's not enabled when I have my image file open; it only seems to be enabled when I have a blank new file.
keenart

Post by keenart »

Now I know what you are talking about. Nice pics! I have seen the same done with smaller pics and miniatures.

Another feature you might consider is the Print Multiple or Print Poster. This would allow you to print a large image in several sections without having to crop the image.
heinz-oz

Post by heinz-oz »

RocckLobster wrote:If I could figure out how to use the grid and partition tool like you demonstrated, I'm sure it would be a lot easier....

For some reason, though, it's not enabled when I have my image file open; it only seems to be enabled when I have a blank new file.
What format are your images in? I found that I cannot use this feature with gif images. Jpeg's work fine. If your images are gif, convert the image to jpeg (24 bit RGB) or greyscale if they are B&W.
RocckLobster

Post by RocckLobster »

What format are your images in? I found that I cannot use this feature with gif images. Jpeg's work fine. If your images are gif, convert the image to jpeg (24 bit RGB) or greyscale if they are B&W.

The image starts out as a 24 bit RGB jpg, then I convert to grayscale. Not sure if it retains the 24 bit attribute though. I'll check it when I get home tonight; that may very well be the problem.

keenart; I'll also look into the Print Multiple and Print Poster options as those sound promising too.

Thanks for both of your suggestions and ideas!

Mike
heinz-oz

Post by heinz-oz »

Did some more tests, as I said, I never used the feature before. Turns out that it will only work as described with RGB True Color images, sorry.
RocckLobster

Post by RocckLobster »

I tried out the Print Poster option and it almost did what I wanted. Except for the lines that it prints on the photos (in order to trim or overlay your photos so they can be "stitched" back together to create a poster) it would have been a good option.

So, I went back to Heinz's original suggestion, using the Grid and Partition option in the Web menu. I had to start over with the original full color photo and, instead of converting it to B&W using the Convert Data Type menu, I used the option Photo->Enhance->Monochrome in order to retain the full color attribute. Thereafter, I was able to use the Grid and Partition tool and easily copy/paste the sections into new images and print them out for my project.

Thanks for all the great tips!

Mike
heinz-oz

Post by heinz-oz »

You are welcome :D

Do come back occasionally to share some of your experiences with other newbees. I'm sure you would be as valuable to some soul out there, trying to get one of his/her ideas to work, as we have been to you.

I have never even thought of doing what you were aiming to do. I was just fortunate enough to remember a lesson from the beginners workshop where my suggested process was used to splice an image for use on a web site.
Post Reply