Code Monkey home page Code Monkey logo

batch-smart-resize's Introduction

batch-smart-resize

GIMP script-fu for batch resizing images.

  • Maximum height and width can be specified.
  • Crops to layer mask.
  • Optional padding in any color to the full maximum dimensions.

Installation

Usage

The script dialog can be accessed at: File > Create > batch-smart-resize.

  • Source Folder - The folder that contains the source images. All files in the folder must be valid image files or the script will fail with the error: Error: Procedure execution of gimp-file-load failed: Unknown file type.
  • Destination Folder - The folder where the processed images will be saved to.
  • Output Filename Modifier - A string to add to the end of the output filenames.
  • Output Type - File type to use for the processed images.
  • Output Quality - Determines the compression level for JPEG Output Type. A higher value will produce better image quality and larger file size.
  • Max Width - The maximum width of the processed image.
  • Max Height - The maximum height of the processed image.
  • Pad - If this box is checked then the script will add background to size the image to the full maximum dimensions. This can be useful to avoid having sites such as Etsy and Handmade at Amazon crop your image thumbnails to an arbitrary aspect ratio.
  • Padding Color - Color used for padding if enabled.
  • JPEG DCT Method - This parameter can only be set by scripts that call script-fu-batch-smart-resize. 0==integer, 1==fixed, 2==float. The default value is 0. For details on the DCT methods see http://docs.gimp.org/en/gimp-images-out.html#file-jpeg-save.

Contributing

Pull requests or issue reports are welcome! Please see the contribution rules for instructions.

batch-smart-resize's People

Contributors

dependabot[bot] avatar per1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

batch-smart-resize's Issues

Empty source folder causes error

Right now it aborts with the error "Invalid Source Folder" but this is a problem when another script runs batch-smart-resize on multiple folders where one of the folders might be empty so it would be better if it could just skip over empty folders.

Non-image files in the source folder causes failure

It fails if there are any non-images in the source folder. For now I have just noted the limitation in the documentation.

  • Try to detect if the file is a valid images after loading
    • gimp-image-is-valid
    • gimp-file-load - maybe use both
      • calling this with an invalid file causes the error so I can't use it
  • Filter by extension - this seems to be the only option but I don't like it because it will be lots of code and people may be able to add support for other file types that wouldn't be on the list.

unbound variable:  during script-fu refresh

Error while loading C:\Program Files\GIMP 2\share\gimp\2.0\scripts\batch-smart-resize.scm:

Error: (C:\Program Files\GIMP 2\share\gimp\2.0\scripts\batch-smart-resize.scm : 1) eval: unbound variable: 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.