Output different when running scripts

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
SIMJEDI
Posts: 2
Joined: 2019-06-30T17:14:34-07:00
Authentication code: 1152

Output different when running scripts

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Output different when running scripts

Post 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
SIMJEDI
Posts: 2
Joined: 2019-06-30T17:14:34-07:00
Authentication code: 1152

Re: Output different when running scripts

Post by SIMJEDI »

That worked!
I'm such a noob... :oops: :-D
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Output different when running scripts

Post by fmw42 »

Don't worry about it. No problem. Everyone starts at the beginning!
Post Reply