Page 1 of 1

Output different when running scripts

Posted: 2019-06-30T17:36:21-07:00
by SIMJEDI
There is a bug when using -clahe through a .bat file versus the command prompt. With the batch file it produces blotchy results.

command used:

Code: Select all

magick mogrify -clahe 20x20%+128+1.5 *.png
Original
Image

Command Line
Image

Batch File
Image

Notice how the right shoulder has a large blotch on it and it's darker overall compared to the command line version.


Program version used:
PS P:\Image Processing\Clahe> magick -version
Version: ImageMagick 7.0.8-50 Q16 x64 2019-06-24 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC HDRI Modules OpenCL OpenMP(2.0)
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps raw rsvg tiff webp xml zlib

Re: Output different when running scripts

Posted: 2019-06-30T17:38:25-07:00
by fmw42
In a .bat file, you must escape % with % to %%. So % must be doubled. Try that. Look up information about bat scripting. See for example https://imagemagick.org/Usage/windows/#batch_guidelines

So try

magick mogrify -clahe 20x20%%+128+1.5 *.png

Re: Output different when running scripts

Posted: 2019-06-30T17:55:25-07:00
by SIMJEDI
That worked!
I'm such a noob... :oops: :-D

Re: Output different when running scripts

Posted: 2019-06-30T18:58:01-07:00
by fmw42
Don't worry about it. No problem. Everyone starts at the beginning!