Page 1 of 1

Testing Version 7

Posted: 2013-04-11T04:57:13-07:00
by Alan Hadley
I am still working on my Windows program that lets you use a lot of IMs functions interactively, I have decided to wait for the official IM 7 release before I release this to the world. I have successfully ported a lot of things to IM7 and am testing, debugging, and improving my code. This means testing the IM7 functions, is this the correct place to report problems?

My first sticking point is with the Wave function. I discovered it will only work if the source image has an alpha channel which is enabled, I can work around this. But it seams that some of the other channels behave like alpha channels, probably something to do with pixel traits but I have not changed them from the defaults, if a Wave an image of a spectrum the parts near cyan become transparent. Also if I set the background alpha value to 0.0 the newly exposed background at the edges is black, not clear.

Alan Hadley

Re: Testing Version 7

Posted: 2013-04-11T08:02:09-07:00
by Alan Hadley
I am working down my list of effects functions, you can get some interesting results by disabling channels, though not all functions allow this.

BlueShift keeps returning a transparent image, it sets the alpha channel to 0.0.

Alan Hadley

Re: Testing Version 7

Posted: 2013-04-11T09:01:06-07:00
by magick
We pay attention to version 7 problems and suggestions here but its a lower priority than version 6 so it may take a bit longer to respond. We have one more feature to add to IMv7, read and write masks. As soon as that is complete (in 2-3 weeks), we'll start responding to IMv7 reports in a more timely fashion.

Re: Testing Version 7

Posted: 2013-04-11T21:31:35-07:00
by anthony
Have you tried using "magick" scripts in PC's yet.

EG: try this 'DOS mapped to Magick' script?

Code: Select all

@echo This line is DOS executed but ignored by Magick
@magick -script %~dpnx0 %*
@echo This line is processed after the Magick script is finished
@GOTO :EOF
#
# The rest of the file is magick script
-read label:"This is a Magick Script!"
-write show: -exit
Did it work? if not can you help me figure out why it didn't work. I am not a Windows user, but coded scripting to try and allow this form of "magick" script to work with DOS.

For info on this see
http://www.imagemagick.org/Usage/bugs/I ... ipting.txt

Re: Testing Version 7

Posted: 2013-04-12T11:13:47-07:00
by Alan Hadley
I tried various combinations of letters in the %~...0 bit and managed to get IM7 to launch, but it seems that IM is not skipping the first parameter on the command line which in windows is always the name of the program which is running, or rather whatever was used to start the program. So IM is reading this and thinking it is a command and issuing an error message. If you use the full path to start IM you may get C:\Program as part of the error message because command line parameters are separated by spaces.

The letters between %~ and 0 are as follows 'd' Drive, 'p' Path, 'n' file Name and 'x' eXtension. They refer to the parts of the path to the batch file, so if the batch file is in the same folder as IM7 all you need is %~dp0\magick.exe, that is the directory and path of the containing folder and the name of the file to execute, you may need to quote this if the path contains spaces. You may even get away with magick.exe, without the preamble, if the current directory is correct.

Then all you need is for IM to skip the first argument before executing the rest of the commands on the line.

Alan Hadley

Re: Testing Version 7

Posted: 2013-04-13T04:19:47-07:00
by Alan Hadley
Nice to hear about the two mask channels. It would be nice if they can be exported using ExportImagePixels(), so that they can be displayed over an image easily. Will ChannelFX() be able to manipulate all channels including the User ones.

Alan Hadley

Re: Testing Version 7

Posted: 2013-04-13T05:17:07-07:00
by magick
We're working on expanding the functionality of ChannelFxImage() to support additional channels and operations such as deleting a channel. We should have this work completed in about a month.

Re: Testing Version 7

Posted: 2013-04-14T21:40:50-07:00
by anthony
Alan Hadley wrote:I tried various combinations of letters in the %~...0 bit and managed to get IM7 to launch, but it seems that IM is not skipping the first parameter on the command line which in windows is always the name of the program which is running, or rather whatever was used to start the program. So IM is reading this and thinking it is a command and issuing an error message. If you use the full path to start IM you may get C:\Program as part of the error message because command line parameters are separated by spaces.

The letters between %~ and 0 are as follows 'd' Drive, 'p' Path, 'n' file Name and 'x' eXtension. They refer to the parts of the path to the batch file, so if the batch file is in the same folder as IM7 all you need is %~dp0\magick.exe, that is the directory and path of the containing folder and the name of the file to execute, you may need to quote this if the path contains spaces. You may even get away with magick.exe, without the preamble, if the current directory is correct.

Then all you need is for IM to skip the first argument before executing the rest of the commands on the line.

Alan Hadley

The command that should be run in the DOS part is
magick -script "name of the batch file" ...arguments given to DOS batch file....

The %~..0 should be the full path name of the DOS script that DOS is currently running when it executes the "magick" command (whcih is assumed to be on the command path)

If "magick is not on the command path then that ling needs to replace "magick" with the full path name to the "magick" command, for example...

Code: Select all

@C:\program files\IMv7\bin\magick -script %~dpnx0 %*
This was what I was attempting to avoid... hardcoding any 'path' in the DOS script so users can just run it.

Suggestions?