Page 1 of 1

How to use applyFilter?

Posted: 25 Jan 2021, 06:20
by minx
I am trying to use `applyFilter` on an Image.

Have tested with various, but for example:

Code: Select all

var x = img.applyFilter("Negative" /*, {
	filerChannels: "r,g,b,a"
}*/);
img.saveToFile(test-filter.jpg);
x.saveToFile('test-x-filter.jpg');
img.saveToFile(test-filter.png');
x.saveToFile('test-x-filter.png');
Have tried to use options, save return, save "original", save as jpg, png, ... etc., but filters does not show on end result.

What am I doing wrong here?

Running as code by:

Code: Select all

actextec -c script_name
Have tested with two versions:

Actiona Executer version 3.9.2, script version 1.1.0

3.10 does not show version by --version on actexec, but actiona say:

Actiona 3.10.1, script 1.1.0

Re: How to use applyFilter?

Posted: 26 Jan 2021, 17:18
by eureka
Most of the discussions are in French forum. Perhaps post there for an answer?
I have not found applyFilter in my searching.

https://www.freecodecamp.org/news/getti ... 9a0899b3f/

Re: How to use applyFilter?

Posted: 26 Jan 2021, 21:50
by minx
eureka wrote: 26 Jan 2021, 17:18 Most of the discussions are in French forum. Perhaps post there for an answer?
I have not found applyFilter in my searching.
Wish I knew French :wink:

I use Google translate on the French forum to read but can not ask or answer. I once started to learn, but did not get very long, too many projects :lol:

Re: How to use applyFilter?

Posted: 27 Jan 2021, 09:25
by francois
I tested "Negative" and it doesn't work.
Note that 'applyFilter' works for other parameters, for example "Sharpen".

See : https://wiki.actiona.tools/doku.php?id= ... pplyfilter

Filter
Image filters.
Values


ConvolutionFilter: the convolution filter
GaussianBlur: a gaussian blur
Defocus: blurs the image
Highlight: highlight the image
Sharpen: sharpens the image
SharpenMore: sharpens the image
SharpenEvenMore: sharpens the image
EdgeDetect: edge detection filter
BigEdge: edge detection filter (thicker edges)
Emboss: embosses the image (no color preservation)
EmbossColor: embosses the image (color preservation)
Negative: negates a color channel
RemoveChannel: remove a color channel
Punch: distorts the image

Re: How to use applyFilter?

Posted: 27 Jan 2021, 10:54
by eureka
I use Google translate on the French forum to read but can not ask or answer.
Neither am I bi-lingual. But you have found that Francois (moderator) helps to bridge discussions.
I use Deepl.com to understand discussions and attempt short replies in French.
But embedded Actionscript2 snippets can be understood.

Re: How to use applyFilter?

Posted: 03 Mar 2021, 13:49
by iban
Un peu avancé sur le sujet :
  • c'est le numéro du filtre qu'il faut indiquer et non pas son nom, par exemple 12 à place de "Negative"

Code: Select all

var x = img.applyFilter(12, { filterChannels: 'rb' });
  • l'option filterChannels fonctionne avec le filtre Negative mais impossible de l'utiliser avec removeChannel, quelque soit la valeur j'ai une erreur

Re: How to use applyFilter?

Posted: 04 Mar 2021, 10:34
by eureka
I continue to learn more about this very useful tool. Here is the documentation I found by searching wiki.

https://wiki.actiona.tools/doku.php?id= ... pplyfilter

Re: How to use applyFilter?

Posted: 04 Mar 2021, 12:00
by francois
It is better to go to this link :
https://wiki.actiona.tools/doku.php?id= ... core:image

English documentation is more up to date