Page 1 of 1

ImageMagick with Preview

Posted: 2019-06-05T06:41:03-07:00
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

Re: ImageMagick with Preview

Posted: 2019-06-05T06:48:21-07:00
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.

Re: ImageMagick with Preview

Posted: 2019-06-05T22:30:06-07:00
by Flokker
I'm on ubuntu. Is there no preview Funktion in IM?

Re: ImageMagick with Preview

Posted: 2019-06-05T22:58:14-07:00
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.

Re: ImageMagick with Preview

Posted: 2019-06-05T23:00:14-07:00
by fmw42
Imagemagick has a GUI with X11 on Linux.

Re: ImageMagick with Preview

Posted: 2019-06-06T02:57:11-07:00
by Flokker
You mean the command display? This is not want im searching for.

Re: ImageMagick with Preview

Posted: 2019-06-06T09:15:11-07:00
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.

Re: ImageMagick with Preview

Posted: 2019-06-06T12:59:52-07:00
by Flokker
Do you mean the command 'display'? How can i open the image with x11?

Re: ImageMagick with Preview

Posted: 2019-06-06T16:03:36-07:00
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.

Re: ImageMagick with Preview

Posted: 2019-06-07T20:31:08-07:00
by muccigrosso
It works fine with XQuartz on my Mac. Use display, then left-click the image to get the menu.

Re: ImageMagick with Preview

Posted: 2019-06-07T21:12:13-07:00
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?

Re: ImageMagick with Preview

Posted: 2019-06-08T15:26:30-07:00
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.

Re: ImageMagick with Preview

Posted: 2019-06-08T16:37:57-07:00
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.