Page 1 of 1

ImageMagick GUI

Posted: 2012-05-22T22:56:40-07:00
by sudarshans
Does ImageMagick have a decent cross platform open source GUI? (If not, I'm planning to write one and open source it under GPL (this app is intended for end users and they wont be affected by GPL since the use of the program output is not restricted by GPL, and I'm planning to use an unmodified ImageMagick backend which is under a permissive license anyway))

BTW if the GPL makes people feel uneasy I can make the program output a batch file or shell script to do the same modification via the command line tool :)

Re: ImageMagick GUI

Posted: 2012-05-23T00:00:25-07:00
by Bonzo
There was a project for Windows that seems to have disapered which was using "wires" to join different commands: Picture Tweaker

Another developer was working on a Windows GUI but he did not seem to get much responce; I could not test it as have a 32bit PC and he was writing it for a 64bit. The thread is here viewtopic.php?f=1&t=18219&hilit=gui
NIP2 is mentioned in the thread and from memory I tried that but it was a very slow process; maybe if I had more experiance with NIP2 it would have been quicker.

I like to have batch files and think they are useful as you can have a standard program you can tweek and just drag and drop files over the batch file icon to modify.

Re: ImageMagick GUI

Posted: 2012-05-23T00:42:31-07:00
by anthony
Bonzo wrote:I like to have batch files and think they are useful as you can have a standard program you can tweek and just drag and drop files over the batch file icon to modify.
Nothing to do with GUI. BUT....

IMv7 will have batch file capability. That is reading image processing options from a file.

I have even looked at methods to have a DOS ".bat" file convert from DOS to ImageMagick Script. That way you don't need to create another suffix for Magick Scripts. It is similar to one of the UNIX techniques.

This is the header of a ImageMagick 'batch' script, though it is not tested with the current IMv7. But it should (hopefully) work.

Code: Select all

@echo This line is DOS executed but ignored by Magick
@magick -script %~dpnx0 %*
@GOTO :EOF
#
# The rest of the file is magick script
-read label:"This is a Magick Script!"
-write label.png
-exit
Under UNIX Shell you can do the following (this has been tested)

Code: Select all

#!/bin/sh
@() { exec magick -script "$@"; }
@ "$0" "$@"; exit
#
# The rest of the file is magick script
-read label:"This is a Magick Script!"
-write show: -exit
Of course the other UNIX scripting methods work too.

Code: Select all

#!/path/to/command/magick -script

Code: Select all

#!/usr/bin/env magick-script
The second one needs 'magick-script' to be linked to the "magick" command.


The script contents are basically parsed much like BASH does for Quoting, escapes, and line continuation. But not using shell variables or backquotes. The use of '\' at the end of the line (outside a quoted arguement) is optional but handled exactly as BASH shell.

The -exit at the end is new, and optional. It basically stops IM reading the script any further. It also works from IMv7 command line when you don't want a final 'implict write' of the images in memory.

As such you should be able to cut an paste the arguments from a UNIX command line, and put it into the script and have it work as before. With the exception that you must use -write for the final save of image results when processing from a script.


What is missing.... Script argument handling!!!
But that is coming too. After I get global Percent Escapes finished (it is working for operator options but not setting options).

Re: ImageMagick GUI

Posted: 2012-05-23T01:44:14-07:00
by sudarshans
Well, what I had in mind is allowing a user to load an image, apply a set of transforms, seeing a live preview as he/she progresses, and then save the result to a script that will allow running the same transforms on as many images as the user wants. This will be a great help to anyone who is not too familiar with the command line and who wants to see live results of transforms on the initially loaded image.

(Think of it as the web IM GUI ported to the desktop, but faster and with support to export to a batch file. The idea I have in mind is maintaining a list of transforms to be done, a bit like GParted keeps a list of partition operations to be done)

BTW, I'm planning to do this in either Qt or PyQt and provide precompiled binaries for windows, and source for other platforms. I'm not sure whether I'll link to IM or use the command line tools

Re: ImageMagick GUI

Posted: 2012-05-23T22:37:53-07:00
by sudarshans
Well, so shall I start working on it? (Are there any parallel active efforts/ dead programs with publicly available source code that I can continue from?)

Or, if anyone has any suggestions/ reasons why such a tool is not needed at the moment or any other suggestions or questions, please let me know.

BTW, what I had in mind is a bit along what is suggested here, although I'm not sure if there will be a full fledged editor or just a list of operations to be done like GParted:
viewtopic.php?f=1&t=18219&hilit=gui#p71935

Re: ImageMagick GUI

Posted: 2012-05-23T22:57:55-07:00
by anthony
Please do. But look at the IMv7 Scripting.

I am also considering montage like features as well as 'function' type sub-routines, for more complex user designed image processing operations.

See notes of the project at...
http://www.imagemagick.org/Usage/bugs/I ... ipting.txt