[Solved] -edge option change results in versions

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
richard_nikon
Posts: 4
Joined: 2016-01-08T07:00:04-07:00
Authentication code: 1151

[Solved] -edge option change results in versions

Post by richard_nikon »

Hi !

After all, sorry about my english, it's not my native language.

This it's my original image, the idea it's save toner and don't print the black blocks of text inverted this way:

Image
http://i.imgur.com/hSnIzcH.png

In Ubuntu 10.04.3 LTS ( ImageMagick V 6.6.4-8 2010-10-01 Q16 ) I use this command:

$ convert -edge 1 -negate ejemplo_ori.png ejemplo_v6.6.4-8.png

And I have this result image:

Image
http://i.imgur.com/qD9jTqd.png

What I want and it's correct for my purpose, don't mind that the titles are in outline, if all the text was plain, that would be great, but this it's an acceptable way.

Now I try this same command in a Ubuntu 14.04.3 LTS ( ImageMagick 6.7.7-10 2014-03-06 Q16 ) , exactly the same comand:

$ convert -edge 1 -negate ejemplo_ori.png ejemplo_v6.7.7-10.png

But, surprisingly not have the same result... It was this:

Image
http://i.imgur.com/1fclKof.png

What is NOT correct... What happens ?

The most accurate I found was this command, that works o both versions, but it's not exactly what I want:

$ convert -negate -edge 1 -negate ejemplo_ori.png ejemplo_v6.7.7-10_2.png

Result:

Image
http://i.imgur.com/5Nfn0Jj.png


I need all the text in plain mode and without the black/grey background... If someone knows another way, you are welcome to tell me.


Please, I wait for some benevolent soul....
Thank you in advance.
Last edited by richard_nikon on 2016-01-08T12:01:00-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: -edge option change results in versions

Post by fmw42 »

There have been changes and bug fixes in IM over time. You may be on a version with a bug. I get your desired result using this command (note the input image is right after convert, as it should in proper IM 6 syntax).

Code: Select all

convert hSnIzcH.png -edge 1 -negate result.png
If this fails on your systems, then those versions of IM have bugs and should be avoided by an upgrade.

I tested using IM 6.9.3.0 Q16 Mac OSX
richard_nikon
Posts: 4
Joined: 2016-01-08T07:00:04-07:00
Authentication code: 1151

Re: -edge option change results in versions

Post by richard_nikon »

fmw42 wrote:There have been changes and bug fixes in IM over time. You may be on a version with a bug. I get your desired result using this command (note the input image is right after convert, as it should in proper IM 6 syntax).

Code: Select all

convert hSnIzcH.png -edge 1 -negate result.png
If this fails on your systems, then those versions of IM have bugs and should be avoided by an upgrade.
Hi fmw42 , thank you for your answer.

To my sorrow, the result it's the same.

I can't upgrade IM on this OS, a new version of IM needs to upgrade another packages ( like dpkg ) and other libraries. May be I can try to install an oldest version.

Is another way of doing what I want ?

Thanx again!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -edge option change results in versions

Post by fmw42 »

6.7.7.10 was not a good version of IM. IM was undergoing some major changes. I would then agree that you should try a downgrade if you cannot upgrade.
richard_nikon
Posts: 4
Joined: 2016-01-08T07:00:04-07:00
Authentication code: 1151

Re: -edge option change results in versions

Post by richard_nikon »

fmw42 wrote:6.7.7.10 was not a good version of IM. IM was undergoing some major changes. I would then agree that you should try a downgrade if you cannot upgrade.
Ok! While I wait for others answers, I will try to downgrade.

Thank you again for your time.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -edge option change results in versions

Post by fmw42 »

try this

Code: Select all

convert hSnIzcH.png -morphology edge diamond:1 -negate result.png
or

Code: Select all

convert hSnIzcH.png -morphology edgein diamond:1 -negate result.png
or

Code: Select all

convert hSnIzcH.png -morphology edgeout diamond:1 -negate result.png
richard_nikon
Posts: 4
Joined: 2016-01-08T07:00:04-07:00
Authentication code: 1151

Re: -edge option change results in versions

Post by richard_nikon »

YES! The second it's the winner!!!

$ convert ejemplo_ori.png -morphology edgein diamond:1 -negate result_2.png

Image

Thank you SO MUCH! You save my day!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: [Solved] -edge option change results in versions

Post by fmw42 »

Glad to hear it worked.
Post Reply