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

Vector graphics - 8/16bit?


Recommended Posts

Are layered vector graphics in AFPhoto (and AFDesigner) calculated, internally, at the same resolution as the document settings, or are they at 16bit and if relevant ... how are they built out when saving to an 8bit file?

 

If the answer is that a document set to 8bit will have the vector graphics at 8bit all through the process ... then should I convert my documents to 16bit, prior to the final stage of building out to an 8bit tiff for client delivery?

Grumpy, but faithful (watch out all you cats)

Link to comment
Share on other sites

I might be misunderstanding what you are asking, but vector graphics are resolution independent. Unlike raster (bitmapped) images, they are stored as a series of instructions that are used to render (draw) the object at the current pixel resolution, whatever that might be. If you export an Affinity document to a format like JPEG or TIFF that only supports raster images, vector objects will be converted to pixels at whatever pixel resolution you set for the document.

 

This web page is one of many that discusses the differences between various vector & raster image file formats.

 

Bit depth determines the color resolution of the 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

Hi R C-R.

 

I can ask this another way.  Is there any difference in AFPhoto or Designer, between vector graphics rasterised to tiff from a 16bit AFP/AFD file and/or an 8bit AFP/AFD file?  Or ... if there was an option in AFP to have a 4bit file, would gradient vector graphics output from a 4bit file to an 8bit tiff, display 4bit banding?  Just trying to establish at what point the calculation is made.

Grumpy, but faithful (watch out all you cats)

Link to comment
Share on other sites

Scaling a bit depth down can produce quite good results. The page R C-R refers to on bit depth does a good job showing what happens to a high bit depth is down sampled. Sampling up can be done, but the results are usually poor. The up-sampling routine has to add in data, typically creating a blurry image, and most likely banding where the data samples are to far apart for the interpolation routine. So, it is always best to work at the highest bit depth available.

 

You might like to read the wikipedia articles on the RGB color model, and the associated one on High Dynamic Range (HDR), which Affinity supports. I don't know if the gradients available for  vector fills are internally stored at the higher range, or are limited to the 24 bit schemes shown in the gradient dialogues.

 

As a by the way, the only system I ever saw that had 4 bit display was a Commodore VIC-20 that my uncle bought circa 1982.

iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb,  AMD Radeon R9 M290 2048 Mb

iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil

Huion WH1409 tablet

Link to comment
Share on other sites

Color resolution is determined by the bit depth of the source document. So for example, if you are working with an Affinity native format document set to RGB/8, the document has 8 bits to store color values for each of three color channels, plus one or more 8 bit alpha channels. The same is true at 16 bits per channel if you working on a document set to a 16 bit format like RGB/16.

 

What happens on export depends on the gamut of the color profile you use & the number of colors in the document. See for example what this article has to say about rendering intent & gamut for more about that.

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

Thanks for the explanations R C-R.  I've been working in digital imaging for almost 30 years and shooting digital since the 90s, so I have a reasonably good understanding of this stuff.

 

You raise an interesting point about colour profiles and I'd be interested to know how AFP handles them at output.  FWIW, colour profiles should not be altering colour.  Ideally they should simply be a 'sticker' that tells a colour profile aware application, what to do with a file.  This is why they can be used in a completely non-destructive way for working with colour.

 

By way of demonstrating this, your Mac (used to be) delivered with a number of Applescripts which could be used for for applying icc profiles to images.  Some of them will 'convert' to a specific colour space, whereas others will simply 'assign' the desired profile, without any loss of colour information, or any kind of conversion taking place.

Grumpy, but faithful (watch out all you cats)

Link to comment
Share on other sites

So, it is always best to work at the highest bit depth available.

 

This is the question really, i.e. ... is it?

 

Since most of us work non-destructively these days (I have always done so) by using layers in pixel editors, nothing is actually applied to the image until you 'output' it for use somewhere.  The image itself is just sitting there.  All the edits are on layers and are only applied to the screen preview, which is a jpeg/png.  So, since working in 16bit doubles files size and seriously slows the computing ... is there any difference in AFPhoto, to working in 8Bit (apart from the actual file itself) and then switching to 16bit prior to final output?

Grumpy, but faithful (watch out all you cats)

Link to comment
Share on other sites

All the edits are on layers and are only applied to the screen preview, which is a jpeg/png.

FWIW, the screen preview is neither JPEG nor PNG, both of which are file formats using compression. What you see in Affinity is an uncompressed screen render, which depending on zoom level may come from mipmaps stored in the native format file.

 

The difference between 8 & 16 bit for exports will depend in part on the color profile, as explained in the Cambridge in Colour article -- note in particular what it says about how the different rendering intents can & usually do make this a destructive process.

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 was under the impression that working w. higher bit depths was generally a good idea because digital sensors would provide a better sampling at the higher bit depth for dark image areas. That way, detail might be brought out of shadow. 

 

If one knows from the start that the final output will be limited, then I would suppose it doesn't hurt to work within those limits. 

 

So far, I haven't noticed major slow downs unless I'm working w a few thousand vectors, or trying to paint w. brushes at 1500 px. But I'm not involved in production at this point, and so loosing a few minutes here and there is not crucial.

iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb,  AMD Radeon R9 M290 2048 Mb

iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil

Huion WH1409 tablet

Link to comment
Share on other sites

FWIW, the screen preview is neither JPEG nor PNG, both of which are file formats using compression. What you see in Affinity is an uncompressed screen render, which depending on zoom level may come from mipmaps stored in the native format file.

 

The difference between 8 & 16 bit for exports will depend in part on the color profile, as explained in the Cambridge in Colour article -- note in particular what it says about how the different rendering intents can & usually do make this a destructive process.

 

 

 

Interesting that the screen preview is uncompressed.

 

Regarding the Cambridge in colour article.  He is simply not raising the question.  You may like to take a look at an old friend's site.  Joe has built colour processes at the application level in the past.  He built this system for his own use, which uses icc profiles for non-destructive colour editing.  As I explained previously, you can 'convert' to a colour space, or you can 'assign' a profile.  A profile is essentially just a 'sticker' which says what space the file should be treated as being in.  You can swap these around quite happily with no effect on the image data itself ... unless of course, the app you're using is actually converting each time ... hence why I'd like to know how AFPhoto handles this.

 

(Edit : for some reason the link wasn't published.  Should be ok now).

Grumpy, but faithful (watch out all you cats)

Link to comment
Share on other sites

I was under the impression that working w. higher bit depths was generally a good idea because digital sensors would provide a better sampling at the higher bit depth for dark image areas. That way, detail might be brought out of shadow. 

 

If one knows from the start that the final output will be limited, then I would suppose it doesn't hurt to work within those limits. 

 

So far, I haven't noticed major slow downs unless I'm working w a few thousand vectors, or trying to paint w. brushes at 1500 px. But I'm not involved in production at this point, and so loosing a few minutes here and there is not crucial.

 

Higher bit depth at capture is essential, because you want as much data as you can get.  There are differences of opinion about whether or not there is any actual difference between 12bit and 14bit raw data, but in the end ... 14bit isn't going to be worse, is it?   :)   There are many shenanigans involved in calculating these things too, i.e. 2+2=5.

 

I'm experiencing slow downs with large brushes, well, large for a pixel editor.  My old imaging app can happily swish a 20,000 pixel brush back and forth across a 500Mp image ... in real time.

Grumpy, but faithful (watch out all you cats)

Link to comment
Share on other sites

A profile is essentially just a 'sticker' which says what space the file should be treated as being in.  You can swap these around quite happily with no effect on the image data itself ... unless of course, the app you're using is actually converting each time ...

A color profile is more than a 'sticker.' The Cambridge in Colour article explains what happens during the color conversion process, which is quite relevant when you export the file & any gamut mismatch occurs. From the article (emphasis added):

Another distinction is that perceptual does not destroy any color information — it just redistributes it. Relative colorimetric, on the other hand, does destroy color information. This means that conversion using relative colorimetric intent is irreversible, while perceptual can be reversed. This is not to say that converting from space A to B and then back to A again using perceptual will reproduce the original; this would require careful use of tone curves to reverse the color compression caused by the conversion.

 

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

A color profile is more than a 'sticker.' The Cambridge in Colour article explains what happens during the color conversion process, which is quite relevant when you export the file & any gamut mismatch occurs. From the article (emphasis added):

 

Don't think I can explain it any more clearly ... but I'll try.  You can convert or assign.  These are not the same.

Grumpy, but faithful (watch out all you cats)

Link to comment
Share on other sites

Don't think I can explain it any more clearly ... but I'll try.  You can convert or assign.  These are not the same.

 

With that, I think you have answered your own question.  ;)

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

Well, you lost me there.  :huh:

I thought your question was "Is there any difference in AFPhoto or Designer, between vector graphics rasterised to tiff from a 16bit AFP/AFD file and/or an 8bit AFP/AFD file?"

 

So try doing that, both assigning & converting various color color profiles to the tiff export. Reopen the exported files & see if you can get the same colors back as in the original.

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

Sorry R C-R, I don't understand what you're saying.  I'm asking about the point at which a resolution independent graphic is converted to a bit depth. This has nothing to do with colour profiles.

 

Is it calculated at the point of export, regardless of document bit depth, or is it dependent on chosen document bit depth?

Grumpy, but faithful (watch out all you cats)

Link to comment
Share on other sites

I'm asking about the point at which a resolution independent graphic is converted to a bit depth. This has nothing to do with colour profiles.

I am completely confused by this. Bit depth determines the number of colors possible in the document. It has nothing to do with the document's pixel resolution or its dimensions.

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

Indeed.  But equally, the number of colours in a file, has nothing to do with the colour space that you have 'assigned' to that file.  If your file has only black and white, then it will 'look' identical in any colour space you assign to it.  You will only ever see changes in a file which you 'convert' to and from different colour spaces, if it contains colours that lie outside one or other of those spaces.

 

Bit depth is important for resolution independent graphics, because although they 'should' in theory be absolutely fine in 8bit, they are in fact more 'fragile'.  So, if AFPhoto is performing all its internal operations in 16bit (which I expect it is) then a vector graphic output from and 8bit file, will be 16bit right up until the point at which it is rendered in 8bit and so should be okay.  If, on the other hand, an 8bit document has already decided that a vector graphic is only in 8bits, then I'm concerned that at some stage during the working process, those bits are not enough.  So I beg the question ... is it better to switch to 16bit, prior to output, so that you are in effect 'forcing' AFP to re-calculate the vector elements, or does in make no difference?

Grumpy, but faithful (watch out all you cats)

Link to comment
Share on other sites

You set the bit depth during export, using one of the TIFF presets for 8, 16, or (in the Export persona only) 32 bit color spaces.

 

That has nothing to do with how a vector object is stored or manipulated in the app, which of necessity must be using something greater than short integer values or 16 bit math to achieve the necessary precision & range of values possible for vector objects.

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

Thanks for the info. 

 

Perhaps I'm experiencing a problem with the way that AF is making gradients.

 

Here is a comparison from AFPhoto, AFDesigner and a very old app.  I made black to white vector gradients at roughly 5000 pixels wide.  I imported them into Apple Pages (which does a wonderful job of smoothing gradients) and this is what I see.  Top one, inside the red line is AFPhoto.  Directly beneath and pretty much aligned shows that AFDesigner is identical.  Then underneath with the blurred edges is the old app one.

 

Pages is unable to smooth Affinity gradients, but the other one is very smooth.

 

 

 

AffinityGradients.png

Grumpy, but faithful (watch out all you cats)

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.