[magick-users] spreading edge colors
Cedric Pinson
mornifle at plopbyte.net
Thu Jan 8 02:48:38 PST 2009
Hi Anthony,
I will try to answer inline because i am not sure i understand all details
I dont understand why you are saying what i did is pure luck :)
because i put the original alpha mask of the original image on the final
because i dont want the alpha mask changed in final image. Are you
saying that
my use of morphology is not correct to expand the ? in this case i will
understand.
Could you send me your circle_halves.png in order i test with it to see
the result
anyway if you have a morphology that dont touch the alpha mask it will
avoid me to extract
and copy the original image mask to the final alpha_mask.
Maybe i miss something, can you point me precisely where i am wrong ?
thank you for your helps and suggestion.
Cheers,
Cedric
Anthony Thyssen wrote:
> On Wed, 07 Jan 2009 21:01:13 +0100
> Cedric Pinson <mornifle at plopbyte.net> wrote:
>
> | Hi,
> |
> | Here the script i use it seems to work fine for all my cases right now,
> | i will try on futur data and tell if it works
> | for most cases
> |
> | #!/bin/bash
> | set -e
> | set -x
> | file=$1
> | filewithoutext=$(echo $1 | sed 's/.png//g')
> | name=$(basename $1 | sed 's/.png//g')
> | ./morphology -m grayscale -t erode -i 1 $file /tmp/${name}_0.png
> | convert $file -alpha extract /tmp/${name}_alpha.png
> | composite -gravity center $1 /tmp/${name}_0.png /tmp/${name}_2.png
> | convert /tmp/${name}_2.png /tmp/${name}_alpha.png -alpha off -compose
> | Copy_Opacity -composite ${filewithoutext}_final.png
> |
> I can see the results your script produces using my "circle_halves.png"
> test image. though there appears to be a couple of unusual extraneous
> pixels. in the results.
>
Could you send me your picture in order i test please
> However I would not depend on morphology from expanding (or contracting)
> the image mask as you are using it for. What should do is undefined,
> and in fact logically it is doing the oppisite of what it should be doing.
>
Yes that's why i dont use the result of alpha mask from morphology i use
the original
because i want the mask not changed. But maybe i miss something in this
line:
composite -gravity center $1 /tmp/${name}_0.png /tmp/${name}_2.png
> The fact that it does so is pure luck. I just submitted back to Fred
> a improved and about 7 times faster version of grayscale morphology,
> however it does not erode/dilate the transparency mask of the image!
>
It's better for sure
> I suggest you extract the alpha mask first, the dilate it separatally.
>
that's why i do or again maybe my composite line i miss something.
> ASIDE: the new version also has the interative blur spreading operator
> that I developed in the previous email.
>
> I'll include a copy of that script to you.
>
> Fred.... Please note there is a small change to the previous one so this
> version does at least preverse transparency in greyscale morphology. The
> previous one wiped out transparency rather than preserve it.
>
>
If i understand correctly you are saying is for this line:
composite -gravity center $1 /tmp/${name}_0.png /tmp/${name}_2.png
/tmp/${name}_0.png should not have the mask extended from morphology is
that correct ?
or did i miss other thing ?
Thank you
>
> Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
> -----------------------------------------------------------------------------
> Hello Sucker! All Games are Honest.
> All Games have a House Percentage.
> So Come on in and Have Fun -- (While We Prove It)
> -- Robert Hienlien, "Podkayne of Mars"
> -----------------------------------------------------------------------------
> Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
>
--
+33 (0) 6 63 20 03 56 Cedric Pinson mailto:mornifle at plopbyte.net http://www.plopbyte.net
More information about the Magick-users
mailing list