RSS/Atom feed Twitter
Site is read-only, email is disabled

Image transformation batch processing

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

7 of 7 messages available
Toggle history

Please log in to manage your subscriptions.

Image transformation batch processing lloyd_borrett 11 May 03:45
  Image transformation batch processing Pat David 11 May 20:05
   Image transformation batch processing David Benfell 12 May 00:46
  Image transformation batch processing Jay Smith 11 May 20:53
   Image transformation batch processing lloyd_borrett 11 May 21:17
    Image transformation batch processing Kristen Sullivan 11 May 23:30
     Image transformation batch processing Liam R. E. Quin 12 May 00:54
2015-05-11 03:45:58 UTC (almost 9 years ago)
postings
2

Image transformation batch processing

G'day,

I have many directories of images, totaling more than 5000 images in total. Each image might be in a jpg, gif or png file format. I want to change all images to have a 1:1 aspect ratio, on a white background. I want no image to exceed 1000 x 1000 pixels at 72 dpi. Images already within the 1000x1000 limit should be extended to have a 1:1 aspect ratio, as required. At no point is any image scaled upwards in size. All images should be saved in a suitably compressed way for displaying on web sites. The new images should be written into a sub-directory, with the original images being left in place and unchanged. Would like to do this as a single batch process, if needs be per directory.

Here are some examples as to what should happen:

1200x1200: Image re-sized to 1000x1000. Save compressed.

1600x1200: Image re-sized to 1000x750. Then extended to 1000x1000, centred on a white background. Save compressed.

1200x1600: Image re-sized to 750x1000. Then extended to 1000x1000, centred on a white background. Save compressed.

750x750: Save compressed.

800x600: Image extended to 800x800, centred on a white background. Save compressed.

600x800: Image extended to 800x800, centred on a white background. Save compressed.

Is it possible to achieve the above using Gimp?

If so, how?

If not, can you please recommend a image processing tool that can do this?

Best regards, Lloyd Borrett.

Pat David
2015-05-11 20:05:59 UTC (almost 9 years ago)

Image transformation batch processing

This could possibly be done with BIMP, but it's likely not the best tool to achieve this across so many images.

Imagemagick is the more likely candidate for batch processing in this way. There are a couple of clarifications, though.

If an image is wrote:

G'day,

I have many directories of images, totaling more than 5000 images in total. Each image might be in a jpg, gif or png file format. I want to change all images to have a 1:1 aspect ratio, on a white background.
I want no image to exceed 1000 x 1000 pixels at 72 dpi. Images already within the 1000x1000 limit should be extended to have a 1:1 aspect ratio, as required.
At no point is any image scaled upwards in size. All images should be saved in a suitably compressed way for displaying on web
sites.
The new images should be written into a sub-directory, with the original images
being left in place and unchanged.
Would like to do this as a single batch process, if needs be per directory.

Here are some examples as to what should happen:

1200x1200: Image re-sized to 1000x1000. Save compressed.

1600x1200: Image re-sized to 1000x750. Then extended to 1000x1000, centred on a
white background. Save compressed.

1200x1600: Image re-sized to 750x1000. Then extended to 1000x1000, centred on a
white background. Save compressed.

750x750: Save compressed.

800x600: Image extended to 800x800, centred on a white background. Save compressed.

600x800: Image extended to 800x800, centred on a white background. Save compressed.

Is it possible to achieve the above using Gimp?

If so, how?

If not, can you please recommend a image processing tool that can do this?

Best regards, Lloyd Borrett.

-- lloyd_borrett (via www.gimpusers.com/forums) _______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list

Jay Smith
2015-05-11 20:53:46 UTC (almost 9 years ago)

Image transformation batch processing

On 05/10/2015 11:45 PM, lloyd_borrett wrote:

G'day,

I have many directories of images, totaling more than 5000 images in total. Each image might be in a jpg, gif or png file format. I want to change all images to have a 1:1 aspect ratio, on a white background. I want no image to exceed 1000 x 1000 pixels at 72 dpi. Images already within the 1000x1000 limit should be extended to have a 1:1 aspect ratio, as required.
At no point is any image scaled upwards in size. All images should be saved in a suitably compressed way for displaying on web sites.
The new images should be written into a sub-directory, with the original images being left in place and unchanged.
Would like to do this as a single batch process, if needs be per directory.

Here are some examples as to what should happen:

1200x1200: Image re-sized to 1000x1000. Save compressed.

1600x1200: Image re-sized to 1000x750. Then extended to 1000x1000, centred on a white background. Save compressed.

1200x1600: Image re-sized to 750x1000. Then extended to 1000x1000, centred on a white background. Save compressed.

750x750: Save compressed.

800x600: Image extended to 800x800, centred on a white background. Save compressed.

600x800: Image extended to 800x800, centred on a white background. Save compressed.

Is it possible to achieve the above using Gimp?

If so, how?

If not, can you please recommend a image processing tool that can do this?

Best regards, Lloyd Borrett.

Though we have not done some of the specific tasks or had some of the specific limitations/operations you describe, we have done operations fairly similar to this that require a lot of complex if-then-else logic. To accomplish this, we used Perl and Imagemagick -- this was a few years ago, but I think there is/was a Perl image processing module to aid in such situations.

I don't recall all the details and I can't help with code samples. However, the good news is that the input was in the tens of thousands of images and the output was 4x the input (there were four output streams, not just one as you need, because our output had in four size ranges, not just your one range). While the code took a bit of work to develop, the actual running (and re-running because there were always new or modified inputs that had to be detected/compared as new and thus new output created), was surprisingly fast. Obviously the bigger the machine (I think we were running on a machine 16 cores and 16 GB of RAM), the faster the results.

One or two tiny suggestions. You describe that the output needs to be centered on a white background (if the output is less than 1000 in a particular dimension). The "white background" should be a command line parameter type of setting so that you don't have to dig into the code to change background color that for a particular run. You may also want to consider the potential use of transparent background (if supported by file type of the image type being used for the output) and do the "color of background" on the display side (if possible) rather than in the image -- that would give you greater flexibility; then you might just need a one-line CSS change for your entire website rather than regenerating umpteen images.

Jay

2015-05-11 21:17:15 UTC (almost 9 years ago)
postings
2

Image transformation batch processing

Thanks Jay.

Kristen Sullivan
2015-05-11 23:30:17 UTC (almost 9 years ago)

Image transformation batch processing

ok so I can't find the link to my thread I made so I'm lost LOL....

OK so I have uninstalled this program and installed it AGAIN. I go and open a 800X600 image and still force closes. IDK what is going on with this but I dont know what to do either. I don't know if it is easier to get help from a GIMP creator but do they come out here? If so please email me at Kristen6207@gmail.com I have tried to open the gimp program again and till crashing. I would LOVE to talk to someone that is the creator or someone VERY VERY knowledgeable about gimp. Anyways IDK if this message is going to get any of you or be posted on that thread I made but if you could send me the link to my thread I'd appreciate that.

Thanks :)

On Mon, May 11, 2015 at 5:17 PM, lloyd_borrett wrote:

Thanks Jay.

--
lloyd_borrett (via www.gimpusers.com/forums) _______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-user-list List archives: https://mail.gnome.org/archives/gimp-user-list

David Benfell
2015-05-12 00:46:43 UTC (almost 9 years ago)

Image transformation batch processing

Quoting Pat David :

Imagemagick is the more likely candidate for batch processing in this way. There are a couple of clarifications, though.

I concur. Specifically, the convert tool, although you may need additional tools to identify your input and tailor the convert command accordingly.

David Benfell 
Liam R. E. Quin
2015-05-12 00:54:39 UTC (almost 9 years ago)

Image transformation batch processing

On Mon, 2015-05-11 at 19:30 -0400, Kristen Sullivan wrote:

ok so I can't find the link to my thread I made so I'm lost LOL....\

Bestto change the subject line at least infuture.

OK so I have uninstalled this program and installed it AGAIN.

Where exactly are you downloading GIMP from? Which exact version?
Please paste the exact and full URL.

Is this on a GNU/Linux™ system? Or Microsoft Windows? or the Mac? or what? Which exact version?

Is it a 32-bit or a 64-bit computer?

How are you running GIMP exactly?

It is difficult even to begin to answer your questions without such detail. GIMP does work for a great many people, unless you use one of the fake or bad download sites, or download the wrong version for your operating system, for example.

I go and open
a 800X600 image and still force closes. IDK what is going on with this but
I dont know what to do either.

Does GIMP open by itself with no image?

If you send me a copy of the image (or the URL where I can download it, if that's an option) I can look at it.

If you are on a Linux or Unix system (including OS X) the terminal command
$ file the-image.jpg
(or whatever the file is called) may tell you the image format; if it doesn't match the filename's extension, you may need to rename it, or tell GIMP the file format in the Open dialogue box.

Liam

I don't know if it is easier to get help from a GIMP creator but do they come out here? If so please email me at Kristen6207@gmail.com I have tried to open the gimp program again and till crashing. I would LOVE to talk to someone that is the creator or someone VERY VERY knowledgeable about gimp. Anyways IDK if this message is going to get any of you or be posted on that thread I made but if you could
send me the link to my thread I'd appreciate that.

Thanks :)

On Mon, May 11, 2015 at 5:17 PM, lloyd_borrett

wrote:

Thanks Jay.

--
lloyd_borrett (via www.gimpusers.com/forums) _______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership:
https://mail.gnome.org/mailman/listinfo/gimp-user-listList archives: https://mail.gnome.org/archives/gimp-user-list

_______________________________________________ gimp-user-list mailing list
List address: gimp-user-list@gnome.org List membership:
https://mail.gnome.org/mailman/listinfo/gimp-user-listList archives: https://mail.gnome.org/archives/gimp-user-list