Time passes by

by clabacchio

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

I used a perspective transformation on an image in GIMP, but not before I forgot to record the transformation matrix it used. (I need to apply the same transformation to a bunch of other images.)

I haven't even saved the image yet; the perspective transformation is still in my undo history. How can I find that matrix?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Most of the actions with tools in GIMP can be undone with CTRL+Z and all the settings will be set to the values just before applying them or you can view/reapply the last action with the options from the Filters menu. Unfortunately both are not implemented for the Perspective transform tool (or any of the transform tools IIRC).

Your best option is to copy the transformed image (to the clipboard), undo the transformation, paste as a new layer (from the clipboard) and try to achieve the same perspective correction while comparing with the transformed layer. Before hitting apply and do what you want with your transformation matrix.

Alternatively, get the x and y coordinates of the four corners of the transformation mesh and open Filters > Script-Fu > Console and write down for every image:

(gimp-drawable-transform-perspective (car (gimp-image-get-active-drawable (aref (cadr (gimp-image-list)) 0))) tl_X tl_Y tr_X tr_Y bl_X bl_Y br_X br_Y 0 2 FALSE 3 0)

Replace tl_X to br_Y with their respective coordinates.

tl = top-left
tr = top-right
bl = bottom-left
br = bottom-right

This modifies the last opened image.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.