It is currently Thu Apr 25, 2024 6:26 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Easy way of making a free selected image to certain dimensions
PostPosted: Fri May 18, 2018 3:01 pm  (#1) 
Offline
New Member

Joined: May 18, 2018
Posts: 3
GIMP Version: 2.8.22
Operating System: Windows
OS Version: Windows 10
GIMP Experience: New User

List any relevant plug-ins or scripts:
Tried MathMap but didn't work



Hello. I have used GIMP in the past to piece together a Google Map image of an airfield on an island in the ocean for personal use.

I loved how easy it was and decided to try that after I couldn't get what I wanted from MSPaint.

The image that I am working with is a map with longitude and latitude lines. The longitude lines converge to a fixed focal point. I'm trying to use tools>selection tools>user select to grab the grid "square" and make it to a certain dimension to create a flat map.

I can use tools>transform tools>perspective to change most of the boxes but the top of the map and the very bottom of the map have shorter heights and widths.

So, my question is this. Is there an easy way of grabbing the intersections of the longitude and latitude lines with free select and tell the program to make it into a rectangle 400x520 pixels in size?


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Easy way of making a free selected image to certain dimensions
PostPosted: Sat May 19, 2018 12:16 am  (#2) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
Too bad... you're not trying out GIMP 2.10, they have a transform by handle, you just click to add 4 handles on the intersection. Then drag the handles to any rectangle you like.

I tried it in 2.8 to achieve that you want. You can do it but because multiple transform you'll get a blurry result. What I did was if your intersection aren't in a perfect rectangle. Try transforming just one intersection into a corner to match then apply the transform. This way you have one corner as the handle of the bounding box and won't be moved when you try and match up other corners. But because of multiple transform the image might come out blurry.

_________________
TinT


Top
 Post subject: Re: Easy way of making a free selected image to certain dimensions
PostPosted: Sat May 19, 2018 12:45 am  (#3) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
I tried it again in 2.8. You can get decent result by 2 perspective transform if you only change try to only match 2 corners that way you have a close to perfect rectangle then from there you can scale it to whatever dimension you want.

1. Create guides of rectangle you want to match making 2 corners match intersection of guides (bottom 2 corners for example).
Image
2. Use the free select tool to select your not yet rectangle shape (intersections of longitude and latitude)
3. Use the perspective tool to drag an unmatched corner to match the guides (top left corner for example).
Image
4. Apply the transform/perspective. Anchor layer.
Image
5. Free select to select your not yet rectangle shape again (now having 3 corners matching guide).
6. Use the perspective tool to drag the remaining unmatched corner to match the guides (top right corner for example)
Image
7. Apply the transform/perspective. Anchor layer.
8. Now you have a close to perfect rectangle that you can scale to whatever dimension you want.
Image

_________________
TinT


Top
 Post subject: Re: Easy way of making a free selected image to certain dimensions
PostPosted: Sat May 19, 2018 4:38 am  (#4) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2424
There are one or two scripts around that will perform a perspective transform.

I like the one here: viewtopic.php?f=23&t=12653 ob_align.py Download, unzip, put in C:\Users\your-name\.gimp-2.8\plug-ins

Might be a bit tricky for a beginner, but briefly.

Painted in the grid lines in red to make them easier to see here, original is a faint white.

1. You can make a rectangle for a corrected size using the select tool and Image -> Guides -> New guides from selection. That will give a template for creating some paths. Hint. if View -> snap to guides is on, turn it off, makes things easier.
Now turn the selection off Select -> None

Image

2. Draw in a 4 node - 3 side path on the grid lines a,b,c,d
3. Make a second path, 1,2,3,4 using the guide lines you created

Image

4. Apply the plugin (it is in Distorts) and it corrects the image to match the guides.

Image

_________________
Image


Top
 Post subject: Re: Easy way of making a free selected image to certain dimensions
PostPosted: Sat May 19, 2018 7:47 am  (#5) 
Offline
New Member

Joined: May 18, 2018
Posts: 3
trandoductin wrote:
Too bad... you're not trying out GIMP 2.10, they have a transform by handle, you just click to add 4 handles on the intersection. Then drag the handles to any rectangle you like.

I tried it in 2.8 to achieve that you want. You can do it but because multiple transform you'll get a blurry result. What I did was if your intersection aren't in a perfect rectangle. Try transforming just one intersection into a corner to match then apply the transform. This way you have one corner as the handle of the bounding box and won't be moved when you try and match up other corners. But because of multiple transform the image might come out blurry.


I did have 2.10 but rolled it back to 2.8.22 to get the MathMap to work. I'll see what I can do with 2.8.22 with the suggestions. I may just reinstall 2.10 to see if there is an easier way like you mentioned.


Top
 Post subject: Re: Easy way of making a free selected image to certain dimensions
PostPosted: Tue May 22, 2018 1:46 pm  (#6) 
Offline
New Member

Joined: May 18, 2018
Posts: 3
Thank you rich2005. It worked better than I thought. Great detailed directions too. :D


Top
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) ( solved) dimensions of the image on several linked layers

4

No new posts Attachment(s) Fooling around with free prompt text to image gen AI

42

No new posts Attachment(s) Making A Blank Coin From Real Coin Image

7

No new posts Retexture an image with another image as "Image Pattern" Plug-in

4

No new posts Attachment(s) My tests 2021: Easy Effects: A, B, C, D

242



* Login  



Powered by phpBB3 © phpBB Group