Jump to content
You must now use your email address to sign in [click for more info] ×

Selection Maths in Affinity Photo - how is it done


Recommended Posts

44 minutes ago, αℓƒяє∂ said:

Regardless of whether you make a feathered selection in a single step or make a solid selection and subsequently feather it, the fact remains that the pixels within the affected area end up being neither fully selected nor fully unselected.

But they are fully selected even when feathered. The feather radius defines the spacial extent of any effect applied to the selected pixels (assuming there are layers that fill them with color) but that is all it does. And as we all know & agree on, a pixel can have only one set of color & opacity bit values as an end result of whatever (if anything) that effect is applied to.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

34 minutes ago, R C-R said:

The feather radius defines the spacial extent of any effect applied to the selected pixels (assuming there are layers that fill them with color) but that is all it does.

We’re not talking about the application of a ‘Feather’ filter effect applied to the selected pixels, we’re talking about feathering of the selection itself, so I’m afraid I don’t see how the spatial extent of any effect is relevant to this discussion.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

18 minutes ago, αℓƒяє∂ said:

We’re not talking about the application of a ‘Feather’ filter effect applied to the selected pixels, we’re talking about feathering of the selection itself, so I’m afraid I don’t see how the spatial extent of any effect is relevant to this discussion.

Are we not are talking about the mathematics of adding, subtracting, or intersecting selections, however they are made, separate & apart from whatever we intend to do with them?

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

7 minutes ago, R C-R said:

Are we not are talking about the mathematics of adding, subtracting, or intersecting selections, however they are made, separate & apart from whatever we intend to do with them?

Yes, we are, but you seem to be sticking resolutely to the idea that we are only talking about adding or subtracting the whole numbers 0 and 1.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

2 minutes ago, αℓƒяє∂ said:

Yes, we are, but you seem to be sticking resolutely to the idea that we are only talking about adding or subtracting the whole numbers 0 and 1.

All I am trying to do is consider the mathematics of the selection process itself, which from what I can tell obeys the rules of boolean algebra.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

I have been reading this argument and I have a suggestion. I have argued above that selection is an abstract concept. You could take the Humpty Dumpty approach:

"When I use a word," Humpty Dumpty said, in rather a scornful tone, "it means just what I choose it to mean—neither more nor less." "The question is," said Alice, "whether you can make words mean so many different things." "The question is," said Humpty Dumpty, "which is to be master—that's all."

Alternatively, you could take the quantum approach. Just as Schroedinger's cat was either alive or dead or somewhere in between, then a pixel can be selected or not selected or somewhere in between.

Just a couple of thoughts.

John

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

This doesn't solve themathematical question, but it make me think of the way ID and QXP use masks (alpha channels) in a (PSD) TIFF file:

  • for long in QXP you can use greyscale mask to get transparency (important feature)
  • when ID use a greyscale mask (at least until CC2015 that I use), it's only able to read 2 states: selected of unselected, transforming this to a boring path selection without transparency.

@unni Did you test this with Gimp, and which is the more logical way to do this?

 

Link to comment
Share on other sites

@Wosven I have not used ID and QXP, so cant comment on that. In Gimp, I tested in an old portable version because I have not installed Gimp in the last few years. The present release is 2.10 and seems to have many good features but adjustment layers are expected only in version 3. When I did the test as per my first post in this thread, Gimp does the maths differently from AP and PS. In subtract and add, it does a straight arithmetic. When you subtract selection from itself, it goes full black. Add makes the result brighter and results above 255 are clipped to 255. Intersect of a selection with itself does nothing. I dont know whether the current version works differently because the portable version is about 7 years old !

My use of selections and alpha channels are limited to editing an image. I think alpha channels are used for printing application also or something related to that. I am trying to understand how greyscale image can be manipulated using selections, apply image, layer blend modes,etc. How selections can be made based on saturation, luminosity , color and then modified. How greyscale layer data can be moved around using the channel tab options between masks/pixel layers/individual channels/alpha channels etc. All these possibilities will help making a wide range of masks to suit different purposes. Mask is one most important part in editing and it is greyscale. So everything related to greyscale and masks have to be understood to the best possible extent. To get a clean understanding, the arithmetic or algorithm is the best but software companies may not publish them. To a large extent, we can work back by experiments and get a good insight or browse through various published papers and opensource repositories.  

 

Link to comment
Share on other sites

@unni

Sorry for misleading you with a comment that was more related to two ways of thinking I found similar to 2 apps using greyscale alpha channels.

(I think the best way is QXD's one).

---

The question was about how you think add/substract/etc. since I use a lot of masks/alpha channels and never thought about how it should be done.

Using differents apps doesn't give the same results and it's usefull to know why and what to expect.

Link to comment
Share on other sites

1 hour ago, unni said:

Mask is one most important part in editing and it is greyscale.

Affinity's pixel masks are not really greyscale images. Instead, they are a type of alpha channel. They can be displayed as greyscale images to better visualize their effects or for convenience while modifying them in isolation, but they have no actual greyness because they only affect the opacity of whatever they mask, not its color or greyness.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

10 hours ago, R C-R said:

Affinity's pixel masks are not really greyscale images.

You should read about this and think about why we can have a selection and easily see it in a color (show as mask), and use brushes to add/substract to your selection. Selections you can convert in masks in a click.

Short and French versions:

Long ago it was only used as in bitmap B&W: white = transparency, black = opacity. GIF work in the same way but instead of white color, you give the information about which color to use as transparency.

The use of greyscale (the most contrasted colors available) is logical to represent this state of opacity to transparency.
We use it a lot in document, with the ability to color a greyscale image like we did coloring B&W bitmap years ago.


When we did more duotone documents, I added differents alpha channel for different parts of an image, for later import this in my document. I dupplicated the image depending of the number of alpha channel to select and color different parts if the image. This way, the next year I only had to change spot color to get the same image in a fake duotone without having to modify the image (this way, we created CMYB files using only 2 channels, and told the printer which Pantone to use with which channel). With this technique, we could mix colors, and when selecting 2 complementary colors, blending them in different % give use a 3rd color near black, and sometimes another 4th near grey, that once printed gave the illusion of four-color document.

 

Yes, mask are greyscale images, and we copied, pasted a lot and used selection to modify those masks in PS, and that's why the different way to use or modify them in Affinity's apps is one of the first things we notice.

Link to comment
Share on other sites

3 hours ago, Wosven said:

The use of greyscale (the most contrasted colors available) is logical to represent this state of opacity to transparency.

From the Wikipedia Grayscale article:

Quote

In photography, computing, and colorimetry, a grayscale or greyscale image is one in which the value of each pixel is a single sample representing only an amount of light, that is, it carries only intensity information.

It is because the intensity of each pixel can be encoded using a single numeric value, as can its opacity, that it is logical to represent opacity as a greyscale image.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

9 hours ago, R C-R said:

From the Wikipedia Grayscale article

Thanks for the link, but I understand what is greyscale images or I don't know what I did those last 20+ years at work :D

But since you needed more info about masks and alpha channel that use them I provided links so you would better understand about this discussion. So yes, in fine we're ok about greyscale use for selecting and masking and that it is usually shown as a greyscale(or redscale ???)  image when displaying the selection or the mask to work on it in different ways. :)

Link to comment
Share on other sites

4 hours ago, Wosven said:

Thanks for the link, but I understand what is greyscale images or I don't know what I did those last 20+ years at work :D

Then I am puzzled why you would write that greyscale has the most contrasted colors available, which is true neither photometrically nor perceptually. Greys are just neutral or achromatic colors ("colors without color"). :S

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

3 hours ago, R C-R said:

greyscale has the most contrasted

Since it's the use of white to black colors (and all the grey between) and it's what is used for showing mask and alpha channel, and when working in black and white images we select a Greyscale (Niveaux de gris) profile.

Perhaps you've got lighter and darker colors, but I only heard of this by one of our humorist who was mocking some add for a laundry detergent washing "Plus blanc que blanc !" (more white than white) :D

Link to comment
Share on other sites

7 hours ago, Wosven said:

Perhaps you've got lighter and darker colors, but I only heard of this by one of our humorist who was mocking some add for a laundry detergent washing "Plus blanc que blanc !" (more white than white) :D

I don't really know of a good way to compare the "colorless colors" of greys to the colors of colored objects ... but I do know that "more white than white" light is actually blue, caused by so called "optical brighteners" that fluoresce when exposed to UV light. Go figure. O.o

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

12 hours ago, Wosven said:

I'll use it when I'll be able to buy a pen of this color  ;)

Here ya go: 1738251169_bluehilighter.jpg.e91326d66dc13fbf856a835535eb0e7d.jpgxD

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.