2026-03-16 10:49:08 EDT

M: I scanned a square, or rather I took a picture of a square canvas with my phone because I can't find my scanner. Now I'm trying to use GIMP on Linux to turn it into an actual square, you know, deal with all of the perspective and all of that. What's the simplest way to do it?

G: TL;DR: In GIMP, use Tools → Transform Tools → Perspective (or Unified Transform) and drag the four corners of the canvas in the photo until they match a square grid. Then crop. That’s the fastest manual method.


Method 1 — Fastest: Perspective Tool

  1. Open the image in GIMP.
  2. Turn on guides if helpful:
    Image → Guides → New Guide by Percent → 50% (Horizontal & Vertical)
  3. Select:
    Tools → Transform Tools → Perspective
  4. Click the image. A 4-corner grid appears.
  5. Drag the four corners until the edges of your photographed canvas line up with the grid so that:
    • vertical edges look vertical
    • horizontal edges look horizontal
  6. Click Transform.
  7. Use the Crop Tool to crop to the corrected square.

This works because the perspective tool maps your skewed quadrilateral to a rectangle.


Method 2 — Slightly easier to control: Unified Transform Tool

If the photo has rotation + perspective distortion:

  1. Tools → Transform Tools → Unified Transform
  2. Drag the corner handles to match the edges of the canvas.
  3. Adjust rotation and perspective simultaneously.
  4. Apply transform → crop.

This tool is basically GIMP’s closest equivalent to Photoshop’s Free Transform.


Method 3 — Precise (if the corners are obvious)

  1. Use Tools → Transform Tools → Perspective.
  2. Zoom in and align each corner exactly with the actual corner of the canvas.
  3. Apply transform.

This gives the most accurate result.


Two practical tips

1. Turn on snapping

View → Snap to Grid
View → Show Grid

Then set grid spacing under:

Image → Configure Grid

2. Overshoot the canvas When correcting perspective, the edges may distort. It's fine — just crop afterward.


If you want the “one-click” approach

GIMP can do this semi-automatically using G’MIC plugin → Repair → Perspective correction, but it requires installing the plugin.


If you want, you can drop the photo here, and I can also show the exact corner points to drag. That usually takes about 30 seconds once I see the distortion pattern.

2026-03-16 10:51:19 EDT

M: Check online for what you're doing. What you gave me is almost what I need, but like in the exact opposite direction. Your version doesn't let me select the area. It automatically selects the canvas and then starts screwing with it. So I don't get to select the actual intended square area.

G: You’re running into a specific behavior of GIMP’s transform tools:
If no selection exists, the transform tool automatically grabs the entire layer and distorts it. citeturn0search3

So what you’re seeing is expected — GIMP assumes you want to transform the whole image.

The trick is: you must define the region first, then run the transform.

Below are the two methods that actually behave the way you want.


Method 1 (closest to what you want): Perspective Tool in Corrective Mode

This is the “fix photographed document” workflow.

Steps

  1. Select Free Select Tool (lasso) or Rectangle Select Tool.
  2. Draw a selection around the square canvas in the photo.
  3. Now choose:
    Tools → Transform Tools → Perspective (Shift+P).

Because a selection exists, the perspective transform now operates only on that selection, not the whole layer. citeturn0search0

  1. In Tool Options, set: Direction → Corrective (Backward)
  2. Drag the four corner handles to the four corners of the photographed square.
  3. Click Transform.
  4. Crop.

This workflow literally tells GIMP:
“Take this quadrilateral and flatten it into a rectangle.”


Method 2 (often easier): Cage Transform

This tool actually lets you draw the region you want to deform, which is closer to what you described wanting.

Steps:

  1. Tools → Transform Tools → Cage Transform
  2. Click around the four corners of your canvas.
  3. Press Enter to finish the cage.
  4. Drag the corner nodes to form a perfect square.
  5. Press Enter again.

The cage tool works by defining a deformable polygon around an area and then moving the anchor points. citeturn0search15


The simplest workflow most people actually use

For photographing paper, paintings, canvases, etc:

  1. Crop roughly to the object
  2. Perspective Tool → Corrective
  3. Align the 4 handles to the 4 real corners
  4. Apply
  5. Scale to a perfect square if needed

That’s the fastest practical workflow. citeturn0search20


✔ If you want, show the photo.
There is also a very fast 3-step method using the Handle Transform tool that many GIMP users miss, and for a photographed canvas it’s usually the cleanest fix.

2026-03-16 10:53:57 EDT

M: Okay, I figured out what it was. You basically gave me a set without a step zero, which was to select the canvas and then follow your methods. The problem is that while I can almost freehand it, it's not quite the same thing, if that makes sense. I'm trying to get the computer to make it square perfect, not try to freehand it approximately into the right place. Is there any way to do that? Let me try and give the situation again so that you might have a better idea of what I'm trying to do. What I have is a picture of a square canvas, right? Well, what I want to do is select either through a tool or just with the lasso tool and clicking, select four corners and then have the computer say, okay, those are supposed to be four corners of a square or rectangle. Here's what it would look like if it got pulled into that arrangement. So it takes up the entire screen or work area.

G: TL;DR: Yes. What you want is a 4-point perspective correction (homography): pick the four corners of the photographed canvas and map them to a perfect rectangle. In GIMP, the closest built-in tool is the Handle Transform Tool, which lets you place four exact corner points and then force them into a square/rectangle.


Method that actually does what you described

Handle Transform Tool (best built-in option)

This tool lets you define four source points and then move them to four destination points.

Steps

  1. Open the image.

  2. Select
    Tools → Transform Tools → Handle Transform
    (shortcut: Shift + L)

  3. Click the four corners of your canvas in the photo

    • top-left
    • top-right
    • bottom-right
    • bottom-left
  4. Press Enter to activate the transform handles.

  5. Now drag those four handles so they form a perfect rectangle or square.
    Use guides or grid for precision:

    • View → Show Grid
    • View → Snap to Grid
  6. Press Enter again to apply.

GIMP then computes the full perspective transform and stretches the image so your four points become a perfect rectangle.

This is mathematically the exact operation you're describing.


Why this works

What you're doing is a projective transform:

skewed quadrilateral  →  perfect rectangle

The computer calculates a mapping so that:

This is the same math used for:


Even more automatic (optional)

If you install the G’MIC plugin, it has a filter literally designed for this:

Filters → G’MIC → Repair → Perspective [4 points]

You click the four corners and it automatically outputs a rectangular result.

This behaves exactly like phone “scan document” apps.


Small trick to make it perfect

After the transform:

  1. Image → Canvas Size
  2. Set width = height if you want a mathematically perfect square.
  3. Crop.

One conceptual sentence (Japanese practice)

四(よん) つ の 角(かど) を 選(えら)ぶ と、画像(がぞう) を 正方形(せいほうけい) に 変形(へんけい) できる。
— “If you choose four corners, the image can be transformed into a square.”


If you'd like, I can also show a much faster 20-second workflow many GIMP users use for photographed paintings, because there's one tool hidden in the transform menu that makes this almost trivial.