Page 1 of 1

[Solved] -edge option change results in versions

Posted: 2016-01-08T07:23:25-07:00
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.

Re: -edge option change results in versions

Posted: 2016-01-08T11:22:21-07:00
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

Re: -edge option change results in versions

Posted: 2016-01-08T11:27:53-07:00
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!

Re: -edge option change results in versions

Posted: 2016-01-08T11:32:50-07:00
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.

Re: -edge option change results in versions

Posted: 2016-01-08T11:37:55-07:00
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.

Re: -edge option change results in versions

Posted: 2016-01-08T11:43:03-07:00
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

Re: -edge option change results in versions

Posted: 2016-01-08T12:00:41-07:00
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!

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

Posted: 2016-01-08T13:00:36-07:00
by fmw42
Glad to hear it worked.