[Gimp-user] -crop formula

Bob Meetin bobm at dottedi.biz
Sun Jun 14 22:24:51 PDT 2009


Bob Meetin wrote:
> I have a batch of images all the same size, 1488x2240 pixels.  I could 
> use a pointer for a formula that would crop each image to a specific 
> size and keep the same proportion, roughly 2:3, or perhaps crop to a 3:4 
> proportion.  For instance crop the center 744x1120 pixels (50% of height 
> or width). 
>
> I would like to be able to plug in a specific size either in % (50%, 
> 33%, etc) or dimensions. 
>
> Thx, Bob
>   
I think never mind - found the -crop example:

convert img1.jpg -crop 1120x744+560+372 img2.jpg

formula:
  d1 = 50 %width
  d2 = 50 %height
  d3 = 25 %width
  d4 = 25 %height

convert img1.jpg -crop $d1 x $d2 + $d3 + $d4 img2.jpg



More information about the Gimp-user mailing list