How to use applyFilter?

Post here if you need help using Actiona
Post Reply
minx
Posts: 11
Joined: 24 Jan 2021, 20:51

How to use applyFilter?

Post 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
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: How to use applyFilter?

Post 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/
minx
Posts: 11
Joined: 24 Jan 2021, 20:51

Re: How to use applyFilter?

Post 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:
francois
Posts: 456
Joined: 18 Oct 2010, 10:33
Location: France

Re: How to use applyFilter?

Post 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
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: How to use applyFilter?

Post 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.
iban
Posts: 1
Joined: 03 Mar 2021, 13:38

Re: How to use applyFilter?

Post 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
eureka
Posts: 204
Joined: 08 Mar 2016, 22:18

Re: How to use applyFilter?

Post 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
francois
Posts: 456
Joined: 18 Oct 2010, 10:33
Location: France

Re: How to use applyFilter?

Post 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
Post Reply