ImageMagick with Preview

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
Flokker
Posts: 17
Joined: 2018-07-15T00:32:10-07:00
Authentication code: 1152

ImageMagick with Preview

Post by Flokker »

Hi,

i have a little bit complicated question and i hope i can explain what i want.

i have a lot of comic books scanned and want to crop and resize them to be readable on my tablet. at the moment i use xnview with batch mode, but rotation results in a bad text quality and at the moment there is no option to use a better "resize method". i do the same options to all input files in this order: rotate, crop, auto-crop. if necessary i rotate the image. if auto-crop has cropped all parts around the box i don't use crop, if auto-crop doesn't work correctly (sometimes there are some 'dots' on the paper so that auto-crop thinks this is a part of the image, it stops cropping at that 'dot') i use crop only to crop at this side. here the 'live preview' is very helpful because i can increase the crop value and see when its enough. if the 'dot' is cropped auto-crop works correctly.

can i do the same with image magick? i know there isn't a gui. is there any other way to do this? i imagine something like one preview windows where i see the input file and an other window where i can edit the three options (rotation, crop, auto-crop). when i change something the preview is also changed. if all is ok i click i go to the next image, if it fits with the same settings i go to the next and so on. then i save the cropped and rotated images.

flokker
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: ImageMagick with Preview

Post by snibgo »

What is your platform? On Windows 8.1, I can run a command like ...

Code: Select all

magick in.png -rotate {blah blah...} out.png
... and open out.png in a viewer sush as Microsoft Photo Viewer. When I re-run the command with different options, the viewer automatically refreshes the image on the screen.

This is a feature of Windows, not ImageMagick.
snibgo's IM pages: im.snibgo.com
Flokker
Posts: 17
Joined: 2018-07-15T00:32:10-07:00
Authentication code: 1152

Re: ImageMagick with Preview

Post by Flokker »

I'm on ubuntu. Is there no preview Funktion in IM?
Flokker
Posts: 17
Joined: 2018-07-15T00:32:10-07:00
Authentication code: 1152

Re: ImageMagick with Preview

Post by Flokker »

Other idea. Can i create a little GUI only to edit the options Rotation, crop and autocrop? Wen something is changed IM creates a New file. As you porposed i could open the New files in an extra image viewer. The image viewer should then reload the image every time the image is changed.

I think the major Problem is the GUI. I'm thinking about doing this with yad or zenity. But i have not enough experience with both programs.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick with Preview

Post by fmw42 »

Imagemagick has a GUI with X11 on Linux.
Flokker
Posts: 17
Joined: 2018-07-15T00:32:10-07:00
Authentication code: 1152

Re: ImageMagick with Preview

Post by Flokker »

You mean the command display? This is not want im searching for.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick with Preview

Post by fmw42 »

Once the image is displace on X11, you can click on it and it will open a GUI to do more processing. Is that what you want. If not, then I do not have any other suggestions. You can create an entry in your delegates.xml file to display an image with some other viewer.
Flokker
Posts: 17
Joined: 2018-07-15T00:32:10-07:00
Authentication code: 1152

Re: ImageMagick with Preview

Post by Flokker »

Do you mean the command 'display'? How can i open the image with x11?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick with Preview

Post by fmw42 »

Use display, then click on the image. I do not recall which button as Mac no longer supports X11 and it does not work any more in XQuartz. But I think X11 on Linux is still available.
muccigrosso
Posts: 64
Joined: 2017-10-03T10:39:52-07:00
Authentication code: 1151

Re: ImageMagick with Preview

Post by muccigrosso »

It works fine with XQuartz on my Mac. Use display, then left-click the image to get the menu.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick with Preview

Post by fmw42 »

muccigrosso wrote: 2019-06-07T20:31:08-07:00 It works fine with XQuartz on my Mac. Use display, then left-click the image to get the menu.
You are correct. My mistake. I had not used that in a while. What I have trouble with is getting coordinate measurement features that used to exist. But perhaps I do not recall the key options to use along with the right mouse button to initiate that mode. Does it work for you?
muccigrosso
Posts: 64
Joined: 2017-10-03T10:39:52-07:00
Authentication code: 1151

Re: ImageMagick with Preview

Post by muccigrosso »

fmw42 wrote: 2019-06-07T21:12:13-07:00
muccigrosso wrote: 2019-06-07T20:31:08-07:00 It works fine with XQuartz on my Mac. Use display, then left-click the image to get the menu.
You are correct. My mistake. I had not used that in a while. What I have trouble with is getting coordinate measurement features that used to exist. But perhaps I do not recall the key options to use along with the right mouse button to initiate that mode. Does it work for you?
I never do this, but a little experimentation:
  1. Right-click alone gets me a short list of shortcuts.
  2. Option-right-click gets me a new window with 3x magnification and as long as I don't let go, I can move around the image with it. The coords of the pixel under the cursor are given in the new window.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: ImageMagick with Preview

Post by fmw42 »

Option-right-click gets me a new window with 3x magnification and as long as I don't let go, I can move around the image with it. The coords of the pixel under the cursor are given in the new window.
That is what I cannot get to work. Perhaps I have a shortcut involving option- that interferes.
Post Reply