Midtone Mask

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

Re: Midtone Mask

Post by fmw42 »

Those are only for Unix. I do not know if there is a Windows display, but have heard users mention IMdisplay or something like that. Other windows users should be able to help or perhaps see http://www.imagemagick.org/Usage/windows/

Getting coordinate readout is also available for Unix systems by clicking on the image after displaying with display, show:, x:. All these rely upon X11 being installed and available to IM. It would show in the Delegate list when doing convert -version.

As a windows user, you also could install Cygwin (unix environment for windows).

I do not recall you saying what version of IM and platform you are using!
afre
Posts: 57
Joined: 2014-01-22T15:02:53-07:00
Authentication code: 6789

Re: Midtone Mask

Post by afre »

Believe imdisplay.exe is in the Windows binary. Last time I checked, it doesn't have all the features of display.

Sorry about that—I'm using IM built using snibgo's instructions (cygwin):

Code: Select all

Version: ImageMagick 6.9.0-9 Q32 x86_64 2015-03-04 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo fftw fontconfig freetype fpx jbig jng jpeg lcms ltdl lzma pangocairo png rsvg tiff webp x xml zlib
There's two possibilities I can think of: 1. My config needs modification. 2. I'm missing a dependency in Cygwin.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Midtone Mask

Post by fmw42 »

The "x" in your list seems to imply that X11 is installed. That is what I have on my Mac delegate list.

But I do not know if display or show: or x: should work under Cygwin on Windows or not. Perhaps snibgo can comment.

Code: Select all

Version: ImageMagick 6.9.1-1 Q16 x86_64 2015-04-05 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC Modules
Delegates (built-in): bzlib cairo fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms lqr ltdl lzma openexr png ps rsvg tiff webp x xml zlib
Are you typing your convert commands in the Cygwin or Windows terminal?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Midtone Mask

Post by snibgo »

To quickly display an image file in Windows, just type the name of the file. This will run whatever program you have associated with that file type. I use Microsoft Photo Viewer. Possible alternatives include IM's display, Gimp, Irfanview etc.

I don't use X. I don't know if it is available under Windows.

With the pre-compiled Windows binary...

Code: Select all

convert rose: show:
convert rose: win:
... will both run IM's display. I don't use it.
snibgo's IM pages: im.snibgo.com
afre
Posts: 57
Joined: 2014-01-22T15:02:53-07:00
Authentication code: 6789

Re: Midtone Mask

Post by afre »

fmw42 wrote:Getting coordinate readout ... by clicking on the image after displaying
Opening every image and jotting down the coordinates is tedious. Would this be possible (in Unix)? 1) Display image. Ask for user input via mouse. 2) Retrieve coordinates of pixel location/region. 3)Close image display. Continue script with new info.
snibgo wrote:To quickly display an image file in Windows, just type the name of the file.
I already do that; however, it gets messy very quickly when dealing with multiple windows.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Midtone Mask

Post by snibgo »

You can easily do this in any script language with any image editor (eg Gimp):

1. Run a script with an image filename.

2. The script makes a copy of the image, and runs the image editor with that copy, and waits for the editor to finish.

3. Users crops the image (eg in Gimp, "rectangle select tool", menu "Image", "Crop to selection"). Users saves the image and exits the editor.

4. The script searches for the cropped saved image in the original image. This gives the coordinates.

With more development work, a script within the editor (eg Python-Fu in Gimp) can probably eliminate the need to save the crop and do the search.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Midtone Mask

Post by fmw42 »

There are numerous jquery/javascript cropping and/or coordinate readout tools. Search Google. You can also try one that user Bonzo created at http://www.rubbleimages.com/Distort.php or something simpler that I was working on.
afre
Posts: 57
Joined: 2014-01-22T15:02:53-07:00
Authentication code: 6789

Re: Midtone Mask

Post by afre »

To follow up, I found out how to use X in Windows: start X server then do commands in xterm.
ImageMagick 7.0.7-25 Q16 x64 2018-03-04 · Cipher DPC HDRI Modules OpenMP · Windows 7
Post Reply