Post Reply 

Crop, Scale, Export as .jpg

Jul 17, 2013, 05:19
Post: #1
Crop, Scale, Export as .jpg
I downloaded Gimp for this one photo edit I need to do, but I'm having trouble figuring out the steps to get to the final product.

I drop the .jpg image into Gimp and select:

Tools/Transform Tools/Crop

I use the crop tool and draw a box around the portion of the image I want to remain after the crop, then I press enter. The remaining image is exactly what I'd like to scale and then export. So far, so good.

Tools/Transform Tools/Scale

I then select keep aspect and drag the corners of the image until it is the size I want the image to be. During this process, I see that scaling the image leave one image on the screen unchanged, and creates a second image which is scaled. I drag the corners of the scaled image around until I can see both the original cropped image and the scaled image. So far, so good.

I then press enter. The original cropped-but-not-scaled image turns into a checkerboard. The new cropped-and-scaled image goes blank.

What I'd like to do is display the new cropped-and-scaled image on the screen, without the grid, so that I can see that it is properly scaled, then export that image to a .jpg file. I've tried every combination of steps that I think might work, and still no progress on displaying or exporting that new image.

Can you guys tell me if I'm doing something wrong, or how to display then export that image?

Thanks!
Find all posts by this user
Quote this message in a reply
Jul 17, 2013, 05:41
Post: #2
RE: Crop, Scale, Export as .jpg
can you do an example steps you've described above, take a screenshot(Prt Scr...) and export it as a jpeg & attach it on here so we can see whats up?
Visit this user's website Find all posts by this user
Quote this message in a reply
Jul 17, 2013, 06:13
Post: #3
RE: Crop, Scale, Export as .jpg
[undefined=undefined]
(Jul 17, 2013 05:41)iForStyle007 Wrote:  can you do an example steps you've described above, take a screenshot(Prt Scr...) and export it as a jpeg & attach it on here so we can see whats up?

               
Find all posts by this user
Quote this message in a reply
Jul 17, 2013, 06:17
Post: #4
RE: Crop, Scale, Export as .jpg
(Jul 17, 2013 06:13)GreenRite Wrote:  [undefined=undefined]
(Jul 17, 2013 05:41)iForStyle007 Wrote:  can you do an example steps you've described above, take a screenshot(Prt Scr...) and export it as a jpeg & attach it on here so we can see whats up?

The first image is the original image. The second is the cropped image. The third shows both the cropped image and the scaled image. The fourth image is the result after I press <enter> (or alternatively click on the <scale> button.
Find all posts by this user
Quote this message in a reply
Jul 17, 2013, 07:43
Post: #5
RE: Crop, Scale, Export as .jpg
@ GreenRite

The problem is fairly simple in this case, the original image is 400x537 and you cropped down to 108x135 - the canvas dimension are shown in the gimp window bar.
Trying to scale the way you are doing and the scaled image is outside the canvas and not visible.

To scale after a crop use; Image menu -> Scale Image, put in the pixels or percentage, interpolation method, sinc is generally considered the best for general use.

[Image: LKSP5sh.jpg]

If you need to use the scale tool, one way, there are others,
Instead of crop make a selection.
copy the selection.
now kill that selection (selection -> none) the selection is in the gimp clipboard.
paste the selection as a new layer.
Working on that layer you can scale, rotate, move, to the extents of the original canvas.


[Image: OOD28KI.jpg]

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Jul 19, 2013, 05:29
Post: #6
RE: Crop, Scale, Export as .jpg
Thanks for your help guys...that did the trick.

Another question. I have lots of digital camera pictures of faces. Sometimes the camera is held at an odd angle, sometimes the person in the photo tips their head, and sometimes both happen.

I'd like to rotate the photo's such that when someone views the photo, a line drawn through the pupils of the subject's eyes is parallel to the ground the viewer is on.

Since the images are generally too small to get a good view of the images, I'm thinking that I will have to scale the images up, then rotating the images to my 'best-guess' position, then crop the image, then scale the image back down to the proper size.

Is there an easier way to do this task?

Also, is there a more precise way to rotate the photo so that the eyes are parallel to the ground?

Finally, is there any type of facial recognition feature, or face-select feature in Gimp that would help automate this task?

Thanks.
Find all posts by this user
Quote this message in a reply
Jul 19, 2013, 07:45
Post: #7
RE: Crop, Scale, Export as .jpg
(Jul 19, 2013 05:29)GreenRite Wrote:  ...Also, is there a more precise way to rotate the photo so that the eyes are parallel to the ground?...

There is a useful auto-rotate script where you set a path along a line that represents the horizontal (or vertical), the script does the rest.
[Image: FmcmTtc.jpg]

Getting 404's at gimp.plugin.registry at the moment so script is zipped and attached. Do not forget to unzip.


Attached File(s)
.zip  Auto_rotate.scm.zip (Size: 1.05 KB / Downloads: 65)

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Oct 21, 2013, 03:58 (This post was last modified: Oct 21, 2013 06:46 by ofnuts.)
Post: #8
RE: Crop, Scale, Export as .jpg
I can't seem to get this auto-rotate script to work:

Auto_rotate.scm.zip (Size: 1.05 KB / Downloads: 12)

I unzip the file and place it in the the scrips folder then restart GIMP.

I select Layer/Auto Rotate and get this error message (image attached).

Can anyone clue me in as to what I'm doing wrong?

Thanks,
Green
Find all posts by this user
Quote this message in a reply
Oct 21, 2013, 07:32
Post: #9
RE: Crop, Scale, Export as .jpg
Sorry mate.

Windows 7 64 bit
Gimp 2.8.6

Both of these error messages appear at the same time:

Calling error for procedure 'gimp-vectors-get-strokes':
Procedure 'gimp-vectors-get-strokes' has been called with value '-1' for argument 'vectors' (#1, type GimpVectorsID). This value is out of range.

Execution error for 'Auto rotate':
Error: ( : 1) Procedure execution of gimp-vectors-get-strokes failed on invalid input arguments: Procedure 'gimp-vectors-get-strokes' has been called with value '-1' for argument 'vectors' (#1, type GimpVectorsID). This value is out of range.
Find all posts by this user
Quote this message in a reply
Oct 21, 2013, 08:43
Post: #10
RE: Crop, Scale, Export as .jpg
(Oct 21, 2013 07:32)GreenRite Wrote:  Sorry mate.

Windows 7 64 bit
Gimp 2.8.6

Both of these error messages appear at the same time:

Calling error for procedure 'gimp-vectors-get-strokes':
Procedure 'gimp-vectors-get-strokes' has been called with value '-1' for argument 'vectors' (#1, type GimpVectorsID). This value is out of range.

Execution error for 'Auto rotate':
Error: ( : 1) Procedure execution of gimp-vectors-get-strokes failed on invalid input arguments: Procedure 'gimp-vectors-get-strokes' has been called with value '-1' for argument 'vectors' (#1, type GimpVectorsID). This value is out of range.

I see the problem in Win7 64 bit. Looks like that script has died of old age in that OS. Still works here in linux though.

Fortunately there is recent python plug-in that does the same.
http://registry.gimp.org/node/28588 there is a link there to the authors site. Have a look there, there is a video on use and the download is a rar archive.

Windows users might have a problem with rar so I have repacked as a zip and attached it.

This is a plug-in so it goes in your C:\Users\"yourname"\.gimp-2.8\plug-ins folder.

Use is a little different, right click in the paths dialog to bring up the context menu, then tool entry is down at the bottom. Click on that and it brings up a dialog with some options.

Screenshots of the process. http://i.imgur.com/G8DAahP.jpg

hope it helps.


Attached File(s)
.zip  rot2.py.zip (Size: 1.76 KB / Downloads: 39)

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Nov 3, 2013, 05:49 (This post was last modified: Nov 3, 2013 07:47 by GreenRite.)
Post: #11
RE: Crop, Scale, Export as .jpg
Thanks Rich2005, the "rotate about two points" plug-in works great.

I need to edit thousands of images using this plug-in. Is there a way in GIMP to automate the processes of 1) after I open a .jpg file the Path Tool automatically opens, and; 2) after I draw the path, with one click or hotkey, the "rotate by path/lanczos" option automatically executes?

Green
Find all posts by this user
Quote this message in a reply
Nov 3, 2013, 12:13 (This post was last modified: Nov 3, 2013 13:11 by GreenRite.)
Post: #12
RE: Crop, Scale, Export as .jpg
A different degree of rotation will be applied to each different .jpg image.

I have thousands of photos of individuals and groups, of different sizes and qualities, and taken at different camera angles, from which I need to extract headshots, which are close to vertical, for a continuous-loop slideshow presentation on a website.
Find all posts by this user
Quote this message in a reply
Nov 4, 2013, 01:35 (This post was last modified: Nov 4, 2013 01:36 by iForStyle007.)
Post: #13
RE: Crop, Scale, Export as .jpg
(Nov 3, 2013 12:13)GreenRite Wrote:  A different degree of rotation will be applied to each different .jpg image.

I have thousands of photos of individuals and groups, of different sizes and qualities, and taken at different camera angles, from which I need to extract headshots, which are close to vertical, for a continuous-loop slideshow presentation on a website.

Another user ran into problems trying to import 2,000 photos, their gimp crashed at around importing 240 images last I read.

*ALWAYS BACKUP YOUR ORIGINAL IMAGES FIRST in another folder (external flash/hard drive if your low on space)

I recommend you to import about 5 to 10 photos at a time, (this is a stable number unless your images are huge in dimension/file size, then less is better.)
If most of your photos have a resolution of 640 x 480, you can get away with importing a little more than 10 photos at a time as long as the rotation plugin is the only thing your doing.

*Test & Try, you'll reach a limit somewhere.

"In order to succeed, your desire for success should be greater than fear of failure." BC
[Image: 29uocaf.png]
iFS007 tut vids on YT ~ auto color B&W landscape tut
Visit this user's website Find all posts by this user
Quote this message in a reply
Nov 6, 2013, 07:30
Post: #14
RE: Crop, Scale, Export as .jpg
(Nov 3, 2013 05:49)GreenRite Wrote:  I need to edit thousands of images using this plug-in. Is there a way in GIMP to automate the processes of 1) after I open a .jpg file the Path Tool automatically opens, and; 2) after I draw the path, with one click or hotkey, the "rotate by path/lanczos" option automatically executes?

I now have a more complete list of the actions I'd like GIMP to automate, but first I need to know if GIMP can even be made to perform these type of operations?

If not, is there a software program that would better match what I'd like to do? (Free is nice but I'd be willing to buy).

Maybe I should post the more complete list of automated tasks in a different section of the forum?

Thanks,
Green
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Export multiple layers as a layered PDF, not a mulitpage PDF auriuman78 2 210 Jun 15, 2018 22:14
Last Post: auriuman78
  Scale tool pop-up not working? Zethian 1 179 Jun 15, 2018 12:56
Last Post: paynekj
  Font export resolution SerDom 1 270 May 4, 2018 13:15
Last Post: paynekj
  Straighten, Square and Crop Photo's of Old Photos amyearsley 1 195 Apr 16, 2018 08:00
Last Post: paynekj
  Scaling layer does not scale alpha! WallyZ 1 286 Apr 3, 2018 06:22
Last Post: blighty

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS