Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dana_w
Posts: 8
Joined: 2019-08-13T12:31:45-07:00
Authentication code: 1152

Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by dana_w »

I've been trying to figure out why I can't get -normalize to work on my Windows 10 laptop. It works as expected on my Linux computers.

I've downloaded the latest build from the website ImageMagick 7.0.8-60 Q16 x64 2019-08-10 and tested to make sure I am using that version.

magick convert PANO0001.tif -normalize PANO0001_out.tif

Works without error, but results in no change on Windows

convert PANO0001.tif -normalize PANO0001_out.tif

Works as expected on a system running Linux Mint with version ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28

Should I try an older version on my Windows machine?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by fmw42 »

In ImageMagick 7, use magick, not magick convert.

Can you post the input image?

On IM 7.0.8.60 Q16 Mac OSX, it works fine and the same as IM 6.9.10.60 Q16 Mac OSX.
dana_w
Posts: 8
Joined: 2019-08-13T12:31:45-07:00
Authentication code: 1152

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by dana_w »

Hi fmw42,

Using magick alone produces the same output.

I'll be glad to post a link to the rather large, 81.7MB, uncompressed tiff file that I am trying to work with, but as I said the -normalize command seems to work fine on another machine running an earlier version and Linux. And of course, I've tried many other files and file types without success.

Here is a link: http://frogfancy.com/PANO0001.tif

Thanks for looking,
Dana
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by fmw42 »

Can you post a link to a smaller image that shows the same issue?
dana_w
Posts: 8
Joined: 2019-08-13T12:31:45-07:00
Authentication code: 1152

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by dana_w »

Any photo I've tried doesn't work. But sure.

magick PANO0001.JPG -normalize PANO0001_out.JPG

No change in the output in Windows, big change in Linux.

Here it is: http://frogfancy.com/PANO0001.JPG
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by fmw42 »

I only see minuscule difference with IM 6.9.10.60 Q16 Mac OSX and IM 7.0.8.60 Q16 Mac OSX using the latter image. Does -contrast-stretch 2x1% make any change. It should be the same as -normalize, but for me not much change. But -contrast-stretch 10x10% does show noticeable change.

What do you get from

Code: Select all

magick -version
on your Windows system?
dana_w
Posts: 8
Joined: 2019-08-13T12:31:45-07:00
Authentication code: 1152

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by dana_w »

Hi fmw42,

As stated above the Windows version I am using is ImageMagick 7.0.8-60 Q16 x64 2019-08-10
C:\>magick -version
Version: ImageMagick 7.0.8-60 Q16 x64 2019-08-10 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 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
Using a batch process with IM I am trying to get the same results as using Auto Levels in The Gimp. That is exactly what I get on a system running Linux Mint with version ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28 and -normalize. The difference isn't small it is HUGE!

Yes, there is a change when I try this on the Windows system.

magick PANO0001.tif -contrast-stretch 2x1% PANO0001_out.tif

Contrast is indeed stretched but in my sample image, the highlights are blown out, which isn't something that seems to happen when I use -normalize on the Linux system.

Thanks again for taking a look,
Dana
Last edited by dana_w on 2019-08-14T15:17:46-07:00, edited 2 times in total.
dana_w
Posts: 8
Joined: 2019-08-13T12:31:45-07:00
Authentication code: 1152

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by dana_w »

I've checked again and there isn't much, if any, difference using -contrast-stretch 2x1% on Windows and -normalize on Linux. Still, I'd love to know why command like -normalize and -auto-levels seem to do nothing at all on my Windows system running ImageMagick 7.0.8-60 Q16 x64 2019-08-10. It there a known problem?
Last edited by dana_w on 2019-08-14T15:18:10-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by fmw42 »

Normalize should not be the same as -auto-level. Auto-level stretches to full dynamic range. If the image is already at full dynamic range, it won't change. Normalize clips 2% at the black end and 1% and the white end. So it stretches a little past full dynamic range, but not much. If the image is already at full dynamic range, it won't change much. Check your verbose information on the input, to see what the dynamic ranges are for the overall colors.

Here is a test image that is not at full dynamic range. See if that produces a change for you.

Image

Code: Select all

magick zelda3_bm20_cm20.jpg -normalize zelda3_bm20_cm20_norm.jpg
Image
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by snibgo »

dana_w wrote:Contrast is indeed stretched but in my sample image, the highlights are blown out, which isn't something that seems to happen when I use -nominalize on the Linux system.
I'm confused. IM has no "-nominalize" command.

As Fred says, "-normalize" blows out highlights. It is supposed to do this.
snibgo's IM pages: im.snibgo.com
dana_w
Posts: 8
Joined: 2019-08-13T12:31:45-07:00
Authentication code: 1152

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by dana_w »

My problem is not understanding the difference between commands like -normalize or -auto-level. My problem is I can't get these commands to behave the same way on Windows as they do for me on Linux. In fact, they seem to do nothing at all on a Windows system running the latest version of ImageMagick. What I wanted to do when I started was -auto-levels. When those didn't work I tried -normalize. The tried many images in both Linux and Windows before asking for help. As I said above, I get the expected results in Linux.

I am not sure how to interpret the verbose information to determine the dynamic range of the source. But there is a link to a sample image above. Also, I can load the image into The Gimp and see that I can pull up the black point by looking at the histogram.

Can someone test these commands using ImageMagick 7.0.8-60 Q16 x64 2019-08-10 running on Window 10? Do they work for you?
Last edited by dana_w on 2019-08-14T15:12:37-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by fmw42 »

Sorry, I do not have Windows. But perhaps one of the other members could help. But I posted my example for you to use to test so that we can be sure that the image you use would show an affect and since you did not post any before and after examples. Would you confirm that the image that I provided above does not work on Windows and post the result from both Windows and Linux.

You have an older version of OpenMP. Perhaps it might be an issue. Try my image as follows:

Code: Select all

magick -limit thread 1 zelda3_bm20_cm20.jpg -normalize zelda3_bm20_cm20_norm.jpg
or perhaps on Windows it might need to be

Code: Select all

magick.exe -limit thread 1 zelda3_bm20_cm20.jpg -normalize zelda3_bm20_cm20_norm.jpg
Does that show the same as the input or as my output?
dana_w
Posts: 8
Joined: 2019-08-13T12:31:45-07:00
Authentication code: 1152

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by dana_w »

I'll test your examples in the morning when I have both systems handy. Then post the results here.
My before and after examples on Windows are visually identical. I haven't done a bit by bit comparison.

Thanks again.
dana_w
Posts: 8
Joined: 2019-08-13T12:31:45-07:00
Authentication code: 1152

Re: Problem with -normalize when using Windows, ImageMagick 7.0.8-60 Q16 x64 2019-08-10

Post by dana_w »

Hi fmw42,

I've tested your test image on both the Linux and Windows 10 systems. The -normalize function seems to work fine and the results are identical. I tried -auto-level and it seems to work as well and it duplicates what I get in The Gimp. So must be doing something wrong or there must be something about the image and version differences that I don't understand.

Thanks for the help and for forcing me to use a simple example :)
Post Reply