Gimp-Forum.net
Deform image to a specific shape (e.g. ellipse) - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Deform image to a specific shape (e.g. ellipse) (/Thread-Deform-image-to-a-specific-shape-e-g-ellipse)



Deform image to a specific shape (e.g. ellipse) - jugoslav - 03-07-2023

Hi
Absolutely new to gimp.
0% experience, never used, mot even installed.
Want to use it if one thing is possible.

Is it possible to deform, distort, wrap, do not know right word a photo, usually rectangular shape, but lets say any shape, to a different shape, in this case I would like an ellipse, so the entire photo is deformed, something like stretching a rubber?

So in short any shape photo transform to any other shape deforming the whole photo, not short enough, sorry.

Thank you


RE: Deform image to a specific shape (e.g. ellipse) - denzjos - 03-07-2023

Little deformation is possible with this plugin from flamingpear :
http://www.flamingpear.com/free-trials.html

Under the item 'Free Plug-ins' you find 'Circle to Square' and tis plugin can also deform 'Square to Circle' (or ellips). Th plugin work with gimp.
[attachment=9498]
[attachment=9499]

Try also G'MIC-Qt / Deformations / Square to Circle
[attachment=9500]


RE: Deform image to a specific shape (e.g. ellipse) - jugoslav - 03-07-2023

Thx
Maybe it is right but looks to much deformed and looks like loosing some parts.
Just looks like.
I need engineering precision.

Will try, thx.

Can you explain g mic qt ….
My experience 0%

If you cannot, ok thx anyway, you helped.


RE: Deform image to a specific shape (e.g. ellipse) - Ofnuts - 03-07-2023

(03-07-2023, 08:49 AM)jugoslav Wrote: Thx
Maybe it is right but looks to much deformed and looks like loosing some parts.
Just looks like.
I need engineering precision.

Will try, thx.

Can you explain g mic qt ….
My experience 0%

If you cannot, ok thx anyway, you helped.

If engineering precision, what is the equation? If you can express exactly what you want to do, then you can create a displace map (actually, a pair of such). Then given a target bitmap, a source bitmap, and the displace map, the target bitmap is populated by fetching pixels in the source bitmap using X,Y offsets in the displace map. There is also a variant where the displace map are radius/angle offsets.

Then you create the displace maps using gradient, with which you can approximate about any function (which is going to be the inverse of the source->target function). This is something I am doing here.

If you need to go beyond this, you'll need to write you own C plugin, which is beyond my current competences.


RE: Deform image to a specific shape (e.g. ellipse) - denzjos - 03-07-2023

@jugoslav, G'MIC-Qt is a gimp plugin, you find it here : https://gmic.eu


RE: Deform image to a specific shape (e.g. ellipse) - sallyanne - 03-11-2023

@jugoslav go through all of the filters in deforamtions in GMIC-QT and you are sure to find something.
There are a few good distorts under filters in gimp as well