Jump to content

What exactly is the point of "rasterize and trim"?


Recommended Posts

One of the most infuriating experiences that I had early on with Affinity Photo was "nothing happens". By a stroke of luck, I discovered the infamous "rasterize and trim" command which was completely new to me but I guess is a Photopshop equivalent.

Now, I just use it when stuff won't work, but I would appreciate an explanation of why it is necessary and what is its proper use.

Link to comment
Share on other sites

A rather too common cause of “nothing happens” is that you’re trying to do something to an ‘Image’ layer but it only works on a ‘Pixel’ layer. Affinity Photo is unfortunately quite inconsistent in its handling of such situations: sometimes it will rasterize the layer automatically, sometimes it will tell you it needs to be rasterized, and sometimes (you guessed it!) nothing happens.

The ‘Trim’ function permanently removes unwanted parts of the document layer. For example, if you crop a picture the cropping is non-destructive, but ‘Rasterize & Trim’ will effectively render the crop destructive.

Edited by Alfred
Pedantic correction!

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

Link to comment
Share on other sites

45 minutes ago, Alfred said:

The ‘Trim’ function permanently removes unwanted parts of the document.

<pedanterie/>The ‘Trim’ function permanently removes unwanted parts of the layer.</pedanterie>

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

3 hours ago, Alfred said:

A rather too common cause of “nothing happens” is that you’re trying to do something to an ‘Image’ layer but it only works on a ‘Pixel’ layer. Affinity Photo is unfortunately quite inconsistent in its handling of such situations: sometimes it will rasterize the layer automatically, sometimes it will tell you it needs to be rasterized, and sometimes (you guessed it!) nothing happens.

The ‘Trim’ function permanently removes unwanted parts of the document layer. For example, if you crop a picture the cropping is non-destructive, but ‘Rasterize & Trim’ will effectively render the crop destructive.

The indefatigable Alfred to the rescue! Seriously, that explains to me why I have never come across this problem in the 3 previous decades of using photo software. I still don't really get the difference between pixel and image layers, but I'm learning to live with it.

Link to comment
Share on other sites

I think of them like this.

  • Image Layer is like a container, it holds the pixels that make up the image. It's like having a glass or translucent covering. You can't get to those pixels to really manipulate them.
  • Pixel Layer is having the protective image cover removed. Now you can manipulate those pixels.

Rasterizing an Image Layer is removing the protective covering.

Affinity Photo 2.5..; Affinity Designer 2.5..; Affinity Publisher 2.5..; Affinity2 Beta versions. Affinity Photo,Designer 1.10.6.1605 Win10 Home Version:21H2, Build: 19044.1766: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz, 3301 Mhz, 6 Core(s), 12 Logical Processor(s);32GB Ram, Nvidia GTX 3070, 3-Internal HDD (1 Crucial MX5000 1TB, 1-Crucial MX5000 500GB, 1-WD 1 TB), 4 External HDD

Link to comment
Share on other sites

Rasterize and trim has its uses beyond converting image layers.

First, it has two functions combined:

  1. rasterize will convert any layer type into a pixel layer (vector shapes, text, image layers, fill layers, groups etc). If the layer has child layers, these will be „factored in“. Layers below or above will stay untouched.
  2. Trim will permanently remove everything from the layer which is invisible outside its outer edge, no matter if hidden by use of (pixel) mask layers, vector shapes or curves used for masking, or clipping paths. To the displeasure of some users, you cannot get trim without rasterize. (Using Layer>Geometry does not count here. It works only for curves and has some limitations).

In your example, a simple „rasterize“ will do the trick, as normally nothing needs to be trimmed when converting image layers.

Side note: Again to the displeasure of many users, Affinity lacks a „autotrace“ function to vectorize pixel layers into vector / curve layers.

Could you explain why you rate rasterize & trim infamous? For me it is both essential and works just fine.

One thing what is really missing is the ability to rasterize and trim multiple layers at once (but keeping them as separate layers).

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

2 minutes ago, NotMyFault said:

One thing what is really missing is the ability to rasterize and trim multiple layers at once (but keeping them as separate layers).

And I would like to be able to just use a shape like a Die Cutter/ Cookie Cutter. Slice through all layers discarding what is outside. All the layers so trimmed would still be whatever they were to start with, Raster, Image, Curve etc.

Mac Pro (Late 2013) Mac OS 12.7.6 
Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

36 minutes ago, Old Bruce said:

And I would like to be able to just use a shape like a Die Cutter/ Cookie Cutter. Slice through all layers discarding what is outside. All the layers so trimmed would still be whatever they were to start with, Raster, Image, Curve etc.

In your dreams! Slicing through ordinary raster and vector layers should be doable, but I don’t see how an ‘Image’ layer could remain the same type if you’re messing about with it at the pixel level.

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

Link to comment
Share on other sites

50 minutes ago, NotMyFault said:

One thing what is really missing is the ability to rasterize and trim multiple layers at once (but keeping them as separate layers).

... It would also be practical, if Crop could be execute destructively (option on Context Toolbar). Now you have to Crop, and then all the layers gradually trimmed.

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.5.2636 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.4317.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.4317.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

7 minutes ago, Alfred said:

... but I don’t see how an ‘Image’ layer could remain the same type if you’re messing about with it at the pixel level.

Brute Force and Damn the Torpedoes. Think of it as the nuclear option with quite a bit of MAD. Or it could be coded to toss up a notice saying the Image Layers must be rasterized first.

Mac Pro (Late 2013) Mac OS 12.7.6 
Affinity Designer 2.5.5 | Affinity Photo 2.5.5 | Affinity Publisher 2.5.5 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

Thanks for this topic, y'all, and your answers.  I was just trying to figure out how to "flatten" (?) the layer effects, such as a color overlay, into a pixel layer.  And it turns out that "rasterize and trim" worked just how i needed it to.   I tried it because you started us off, Paul Martin, by saying that you use that command as a fallback when things won't work... it saved me from posting my own separate question.  Cheers!

Link to comment
Share on other sites

14 hours ago, Ron P. said:

I think of them like this.

  • Image Layer is like a container, it holds the pixels that make up the image. It's like having a glass or translucent covering. You can't get to those pixels to really manipulate them.
  • Pixel Layer is having the protective image cover removed. Now you can manipulate those pixels.

Rasterizing an Image Layer is removing the protective covering.

Yes, that helps, thank you. Just wonder what the point is to having Image if you can't change it.

Link to comment
Share on other sites

13 hours ago, NotMyFault said:

Could you explain why you rate rasterize & trim infamous? For me it is both essential and works just fine.

Being used to older software (Serif Photoplus) which made no distinction between Image and Pixel, I simply couldn't see the point of an extra factor to handle before you could start editing the picture. I may be wrong, but I can't recall any reference to raterize and trim in the tutorials.

Link to comment
Share on other sites

10 hours ago, allenbham said:

Thanks for this topic, y'all, and your answers.  I was just trying to figure out how to "flatten" (?) the layer effects, such as a color overlay, into a pixel layer.  And it turns out that "rasterize and trim" worked just how i needed it to.   I tried it because you started us off, Paul Martin, by saying that you use that command as a fallback when things won't work... it saved me from posting my own separate question.  Cheers!

The best bit about the forum is that people know about all sorts of details that the Help system simply doesn't recognise. Which is probably just how it should be!

Link to comment
Share on other sites

25 minutes ago, Paul Martin said:

Being used to older software (Serif Photoplus) which made no distinction between Image and Pixel, I simply couldn't see the point of an extra factor to handle before you could start editing the picture. I may be wrong, but I can't recall any reference to raterize and trim in the tutorials.

Then this tutorial might be worth to view:
https://affinity.serif.com/en-us/tutorials/photo/desktop/video/365012457/

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

42 minutes ago, Paul Martin said:

I may be wrong, but I can't recall any reference to raterize and trim in the tutorials.

If the workflow does not require the destructive Trim, then there is no reason to do it, so there is probably no need to mention it in the tutorials (although there are certainly some). Affinity's efforts to conduct operations as non-destructively as possible also result in files being larger than might be expected.

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.5.2636 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.4317.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.4317.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

3 hours ago, Paul Martin said:

Just wonder what the point is to having Image if you can't change it.

The meaning of the Image layer is that the image/container still contains full image information, which is mapped to the existing pixel raster for display only. Therefore, if you change the parameters of this image (size, position, rotation), the original image information will always be used, which will be recalculated according to the new parameters for display - called non-destructive operations.
However, if you rasterize, this image is recalculated according to the specified parameters, and the original information is lost - called destructive operation. So if you change the parameters of this image (size, position, rotation), then the missing information must always be calculated, which leads to the gradual destruction of the image quality.
https://affinity.help/photo/English.lproj/pages/Layers/layerImage.html

 

P.S. This requirement would be useful for better use of the Image layer. This would preserve the advantage of the container, but at the same time the possibility of using raster information for other (still non-destructive) operations.

 

Edited by Pšenda

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.5.2636 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.4317.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.4317.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

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.