Page 2 of 3
Re: workflow: resize, watermark, caption
Posted: 2018-02-20T15:29:19-07:00
by emax
I have a small problem with the watermark generation.
Under linux, evrything is fine, see
picture here.
Under windows, the watermark has a somewhat brighter background, see
picture here.
In both cases, I used the same command (linux grammar below which needs a quote before the emphasis):
Code: Select all
convert input/20090925_141905.JPG -resize 800 \( -size 800x100 -background none -font Arial -fill white -gravity center caption:Watermark -shade 240x40 \) -gravity south -compose overlay -composite -append output/20090925_141905.JPG
Any ideas?
Re: workflow: resize, watermark, caption
Posted: 2018-02-20T15:41:12-07:00
by Bonzo
In windows you do not need to escape the ( ) so use ( ) not \( \)
See
Windows usage
Re: workflow: resize, watermark, caption
Posted: 2018-02-20T15:50:06-07:00
by emax
Yes, that's what I meant: I have posted the Linux-Grammar. Under Windows, there are no such backslashes.
Re: workflow: resize, watermark, caption
Posted: 2018-02-21T02:07:49-07:00
by snibgo
What versions of IM do you use?
For debugging, I suggest you insert "+write tmp.png" just before the close parentheses in each command. Post the results here. (Ensure we can see the png image, not a conversion to jpg.)
Re: workflow: resize, watermark, caption
Posted: 2018-02-21T02:24:30-07:00
by emax
Ok, will try it, thanks!
Re: workflow: resize, watermark, caption
Posted: 2018-02-21T04:44:50-07:00
by emax
Here ist the
windows result.
And this is the
linux result.
Re: workflow: resize, watermark, caption
Posted: 2018-02-21T05:01:37-07:00
by snibgo
We can see the differences are in the alpha channel. The Windows version has partial transparency. In fact, alpha seems to be a copy of the gray values.
snibgo wrote:What versions of IM do you use?
Re: workflow: resize, watermark, caption
Posted: 2018-02-21T08:08:30-07:00
by emax
Under Linux: 6.9.7-4
Under Windows: 7.0.7-22
These are different, even in the major version number. I'd like, however, to have this independant. Should be feasable: I consider imageMagick a professional tool which can yield consistenst results.
Re: workflow: resize, watermark, caption
Posted: 2018-02-21T08:55:32-07:00
by snibgo
So, ...
Code: Select all
convert -size 800x100 -background none -font Arial -fill white -gravity center caption:Watermark -shade 240x40 out.png
... has a bad result in the alpha channel, on v7.0.7-22.
The same behaviour occurs on v7.0.3-6. The cure is to ensure the "-shade" applies to only the RGB channels:
Code: Select all
-channel RGB -shade 240x40 +channel
Re: workflow: resize, watermark, caption
Posted: 2018-02-21T09:18:40-07:00
by emax
IT WORKS!
You're the MagickMaster !!
I'll be back as soon as my tool is 'ready for rollout' !
PS: I must admit, that I only understood part of what you've done. But anyway, I've got a little more understanding than I had before. Thank you, this was great help!
Re: workflow: resize, watermark, caption
Posted: 2018-02-21T09:43:22-07:00
by snibgo
Good stuff.
emax wrote:I must admit, that I only understood part of what you've done.
I used two tricks. The first was to narrow down which part of your command caused the difference. The second was to remember that in v6 many operations apply only to RGB channels by default, but v7 generally
includes the alpha channel by default. So if a command in v6 gives the correct alpha but v7 doesn't, this is likely to be the problem, and the cure is to explicitly limit the action to the RGB channels.
Re: workflow: resize, watermark, caption
Posted: 2018-02-21T11:10:17-07:00
by emax
Nice explanation, hope I'll remember it.
My tool is ready. You can
download it here, runs under Linux and Windows (win 7 tested). Handbook included though completely in German. But should be a big deal to understand. Start that thing and look - if you want.
Greets,
Edgar
Re: workflow: resize, watermark, caption
Posted: 2018-02-24T14:23:19-07:00
by emax
I have updated the link in the previous post as there ist an improved version now. This link will stay in the future and always point to the latest version.
Re: workflow: resize, watermark, caption
Posted: 2018-02-24T14:56:33-07:00
by Bonzo
I have just given it a quick test with default settings - I need to translate some of the buttons.
One comment is the watermark is difficult to see on a dark/black backgrounds.
Anyway it is looking good.
Re: workflow: resize, watermark, caption
Posted: 2018-02-24T17:10:42-07:00
by emax
Thank you for the feedback!
The watermark is a thing to improve, right. Maybe I'll provide an extra setting "light/medium/strong" in the app in another update. And I am thinking about a multi-language version, but this is a diligence matter ...
Another extra could be a choice to sharpen the image optionally: none,light,medium,strong or so. Not the full blown IM capabilities since my focus is not on perfection but on easy application.
I will be back here at the latest when I need help with the watermark improvements.