I then tried to convert this line to a bash script to get workflow log output as suggested by you from other threads in relating matters, but have been unsuccessful at that part too. Unfortunately nothing happens at this point, even though the log output for %n and the static set path definately matches the full working path for the file itself. usr/bin/convert /mnt/product-images-sync/%n -interlace plane -strip -quality 80 -resize 1000x1000\> -set filename:new '%t_1'. Sudo -u When I then try to run this via the workflow script, the logging give me feedback that it was successful to run the command which in the GUI looks like this: The command I’m trying to run is the following and I’ve verified that the www-data user is able to run this in any folder applicable. The problem is that I find the logging really hard to interpret even though I’ve enabled debugging. I’ve been trying to wrap my head around this now for a while, but can’t seem to get it sorted. Once installed, you must enable ImageMagick in the Server Administration apps External Services tab, or in a portal-ext.properties file. As written the script has to be in the current directory, this can be changed.Thanks for your feedback.BAT syntax, for Bash (Linux,OSX) swap the simple and double quotes. Gimp -idf -batch-interpreter python-fu-eval -b "import sys sys.path=+sys.path import convertXCF n('/path/to/the/directory')" -b "pdb.gimp_quit(1)" MAGICKMAPLIMIT: Set maximum amount of memory map in bytes to allocate for the. MAGICKLISTLENGTHLIMIT: Set the maximum length of an image sequence. This path is consulted by uninstalled builds of ImageMagick which do not have their location hard-coded or set by an installer. Save as convertXCF.py (this is Python, so mind the indentation) Set the path at the top of ImageMagick installation directory.Print "Running as _main_ with args: %s" % sys.argv Print "Finished, total processing time: %.2f seconds" % (end-start) Print "Running on directory \"%s\"" % directoryįor infile in glob.glob(os.path.join(directory, '*.xcf')): Pdb.file_png_save(image,savedlayer,outfile, outfile,True,9,True,True,True,True,True) Savedlayer = pdb.gimp_layer_new_from_visible(image,image,"Saved image") # The API saves a layer, so make a layer from the visible image Image = pdb.gimp_xcf_load(0,infile,infile) XCF in the directory passed as a parameter #!/usr/bin/python Thanks to patdavid at for the original script. Tested working with Gimp v2.10.18 on Kubuntu 20.04. (gimp-message-set-handler 1) Messages to standard outputĮcho "(convert-xcf-png \"$i\" \"$.png\")" (file-png-save2 RUN-NONINTERACTIVE image drawable outpath outpath 0 9 0 0 0 0 0 0 0) # Invoke The GIMP with Script-Fu convert-xcf-png It does not require any installation in script directories: #!/bin/bash Imagick::borderImage Surrounds the image with a border. Imagick::blurImage Adds blur filter to image. Imagick::blueShiftImage Mutes the colors of the image. Imagick::blackThresholdImage Forces all pixels below the threshold into black. It should work on any Linux computer with Gimp installed. Imagick::averageImages Average a set of images. Here is a self-contained bash script that should convert all xcf files in your current directory into png format copies. Does anybody know the right calls/arguments to read xcf and write png? I found a script that converts some other file types ( ) but don't quite have the knowledge to modify it. My last hope is to write a batch convert script that will work in the latest version of Gimp itself, but I don't have any experience with ScriptFu. I tried the xcf2png command line tool and it gives me the message "Warning: XCF version 11 not supported (trying anyway.)" before creating an empty image. I tried using IMageMagick mogrify and convert, but they both give me "memory allocation failed" - perhaps they also don't understand the new format? I used to do this using IrfanView, but that no longer works because it refuses to open the latest version of. I've tried a few approaches that haven't worked: xcf format, and I would like to batch convert them to a more convenient format.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |