mkayi Posted June 24, 2022 Share Posted June 24, 2022 Hi, I have a layer which is smaller than canvas and document size. How can I easily expand this layer to the canvas size without transforming its contents, i.e. I do not want to scale the pixels up. Quote Link to comment Share on other sites More sharing options...
NotMyFault Posted June 24, 2022 Share Posted June 24, 2022 How do you define “expand without transforming”? filling transparent area with a color or pattern? Add fill layer below current layer. using the edge pixels repeatedly to fill the area?depends on shape (rectangular / irregular) other Intentions? Please explain. Quote 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. Link to comment Share on other sites More sharing options...
Old Bruce Posted June 24, 2022 Share Posted June 24, 2022 26 minutes ago, mkayi said: Hi, I have a layer which is smaller than canvas and document size. How can I easily expand this layer to the canvas size without transforming its contents, i.e. I do not want to scale the pixels up. Is this layer a Pixel, an Image or a Curve Layer? Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | 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 More sharing options...
v_kyr Posted June 24, 2022 Share Posted June 24, 2022 1 hour ago, mkayi said: I have a layer which is smaller than canvas and document size. How can I easily expand this layer to the canvas size without transforming its contents, i.e. I do not want to scale the pixels up. For pixel/image layers create a new pixel layer, move it below the smaller pixel layer, select both and merge visiable. - For vector layers that doesn't make much sense, for those just reposition the contents position wise where you want it to be (aka no scaling) then. Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
mkayi Posted June 24, 2022 Author Share Posted June 24, 2022 Hi It is a raster/pixel layer. I define this functionality by means of referring to other image manipulation software where I basically always managed to find a one-click menu item which did that. It basically is what v_kyr suggests doing and I will try that. Just spent a few moments trying to find that button and it's probably non-existent, so I will try the workaround and report back. Thanks for the replies Quote Link to comment Share on other sites More sharing options...
smadell Posted June 24, 2022 Share Posted June 24, 2022 If you have a pixel layer that is smaller than the canvas size, you really can’t enlarge the pixel layer to the size of the canvas without scaling it up. What you really need to do is shrink the canvas to the size of the pixel layer. If the pixel layer is surrounded by empty (transparent) space, try just choosing Clip Canvas from the menu. I forget what menu it’s on, but it should do what you’re after. Quote Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17 Link to comment Share on other sites More sharing options...
mkayi Posted June 25, 2022 Author Share Posted June 25, 2022 1 hour ago, smadell said: If you have a pixel layer that is smaller than the canvas size, you really can’t enlarge the pixel layer to the size of the canvas without scaling it up. What you really need to do is shrink the canvas to the size of the pixel layer. If the pixel layer is surrounded by empty (transparent) space, try just choosing Clip Canvas from the menu. I forget what menu it’s on, but it should do what you’re after. No. I need to bring the layer up to canvas size. The canvas has a fixed size I need for printing and for some strange reason the fully transparent edges of my too small layer show up as tiny hair width lines in the image preview which is making me suspicious of it showing up in print. In other software, if this happens I'd bring the layer up to canvas size and all's well. Quote Link to comment Share on other sites More sharing options...
v_kyr Posted June 25, 2022 Share Posted June 25, 2022 3 hours ago, mkayi said: It is a raster/pixel layer. As I said try to merge visable your layer with a new empty pixel one, so the resulting merged layer should have the whole canvas size! Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
NotMyFault Posted June 25, 2022 Share Posted June 25, 2022 5 hours ago, v_kyr said: As I said try to merge visable your layer with a new empty pixel one, so the resulting merged layer should have the whole canvas size! This doesn’t worked (I tried). Affinity always immediately removes transparent edges from any pixel layer (move tool / transform panel shows actual size). if you want a pixel layer of canvas size, you need to fill at least one pixel at every edge with a non-transparent color. Of course, the non-transparent pixels can be even outside the visible canvas, and the edges inside the canvas could be fully transparent. Simple merging down to an empty pixel layer does not work. But this discussion misses one important point: the result may need to be exported, and as we know, the export functions has its own will how to deal with transparent edge pixels (may surprise you). v_kyr 1 Quote 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. Link to comment Share on other sites More sharing options...
NotMyFault Posted June 25, 2022 Share Posted June 25, 2022 Alternative approaches: create a fully opaque backfill layer, and merge down to that layer Or create a fill layer with minimal alpha value (1/255). This will result in a an almost transparent edge, to keep the pixel layer in canvas size. You may create an levels adjustment layer which corrects the alpha values from 1 to 0 again. The handling of transparent pixels in Affinity has been discussed intensively in this forum (e.g. deleting rgb values for zero alpha, exporting from artboards vs. exported size), as it does not meet expectations of users for certain workflows, or how other Apps deal with alpha channel. Quote 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. Link to comment Share on other sites More sharing options...
v_kyr Posted June 25, 2022 Share Posted June 25, 2022 4 hours ago, NotMyFault said: create a fully opaque backfill layer, and merge down to that layer Or create a fill layer with minimal alpha value (1/255). This will result in a an almost transparent edge, to keep the pixel layer in canvas size. You may create an levels adjustment layer which corrects the alpha values from 1 to 0 again. Seems those would need at least >= 1% opacity otherwise they wouldn't be taken into account by merging down. Capture-merge.mov A custom sizeable 1% transparent rect (with the size of the layer, or as needed) to merge with will do equally here. NotMyFault 1 Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2 Link to comment Share on other sites More sharing options...
Old Bruce Posted June 25, 2022 Share Posted June 25, 2022 13 hours ago, mkayi said: The canvas has a fixed size I need for printing and for some strange reason the fully transparent edges of my too small layer show up as tiny hair width lines in the image preview which is making me suspicious of it showing up in print. The problem is the edge of the pixel layer, not the size of it. Perhaps the edges are on not integer pixel x, y coordinates. Perhaps it is a different ppi/dpi from the document. Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | 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 More sharing options...
walt.farrell Posted June 25, 2022 Share Posted June 25, 2022 14 hours ago, mkayi said: I need to bring the layer up to canvas size. The canvas has a fixed size I need for printing and for some strange reason the fully transparent edges of my too small layer show up as tiny hair width lines in the image preview which is making me suspicious of it showing up in print. In other software, if this happens I'd bring the layer up to canvas size and all's well. How did you get that layer into your document (detailed steps, please). Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. iPad: iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1 Link to comment Share on other sites More sharing options...
iconoclast Posted June 25, 2022 Share Posted June 25, 2022 As far as I see, to merge the image layer to another pixel layer doesn't give the wanted result. But if you nest the image layer to a document sized vector shape (to the bottom right of that layer), it becomes the child layer of the curve layer. Think that should work. Another solution is to convert the image layer into curves, double click on the image and drag each corner point (node) to the related corner of the image. It's a bit weird, I confess, I'm surprised that this feature is missing, but it seems to work this way. Probably this feature is missing because you don't need it in most cases. E.g. if you need to clone parts of the image to outside the edges of the layer, it will automatically be expanded in AfPhoto. Quote Link to comment Share on other sites More sharing options...
mkayi Posted June 25, 2022 Author Share Posted June 25, 2022 Hi guys, thanks for all the effort, I will try to answer all the questions about more details. I had a photo which I did some pre-editing on and when I was happy I copied several layers and pasted them into a DIN A1 document to work on composing several elements. I did check and indeed the source document is on 180 dpi while the target document is on 300 dpi. Like I mentioned, I had this effect of hairline edges in other apps, too, but there was always a way to expand the layer to canvas size without any transformation/scaling etc. on the contents of the expanding layer - it just added transparency, IIRC. Merging with another transparent or filled layer did not help the hairlines. I created a random vector shape with the pen tool which created a curve layer. I then made the offending image layer a child of that curve layer, but the hairline still shows up. 52 minutes ago, iconoclast said: Another solution is to convert the image layer into curves, double click on the image and drag each corner point (node) to the related corner of the image. How do I convert an image layer into curves in Affinity Photo? I wasn't aware AP could do that. I keep using Inkscape for that. However: dragging the corner points sounds as if this would result in scaling the contents of the image layer up and I do not want that to happen. So, what should I do now? Also, not directly related to my actual problem at hand, I just noticed: is there supposed to be an easy way to add a curve layer other than just picking up the pen tool and clicking away, because I could not find a menu item or button to add a vector/curve layer. But mainly, I am still looking for a way to make the hairline go away. Can I rescale/resize the image layer to 300 dpi? Do I need to go back to the source document, rescale that to 300 dpi and copy/paste once more? I am a bit loathe to go that route, because I worked on that layer a bit more in the target document. Thanks again for your efforts! I do appreciate that. Quote Link to comment Share on other sites More sharing options...
iconoclast Posted June 25, 2022 Share Posted June 25, 2022 To convert an image into curves in AfPhoto doesn't mean something like Autotracing. It is only the frame that becomes converted, as far as I see. You find the option if you right click on the image, in the context menu. And this doesn't scale the image, because you only drag the corner nodes of the image frame. I'm not sure if it is intended this way, because it is a bit laborious and looks a bit strange at first, but it seems to work. I think I would prefer my first solution anyway. Quote Link to comment Share on other sites More sharing options...
Old Bruce Posted June 25, 2022 Share Posted June 25, 2022 The Hairlines are the problem. Get rid of them and it won't matter what the size of the pixel layer is. Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | 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 More sharing options...
mkayi Posted June 25, 2022 Author Share Posted June 25, 2022 58 minutes ago, Old Bruce said: The Hairlines are the problem. Get rid of them and it won't matter what the size of the pixel layer is. Well, how? Quote Link to comment Share on other sites More sharing options...
mkayi Posted June 25, 2022 Author Share Posted June 25, 2022 1 hour ago, iconoclast said: I think I would prefer my first solution anyway. If you mean making the layer with the hairline edge the child layer of a curve layer, I tried that and it did not get rid of the hairline, I am afraid Quote Link to comment Share on other sites More sharing options...
Old Bruce Posted June 25, 2022 Share Posted June 25, 2022 17 minutes ago, mkayi said: Well, how? 22 hours ago, mkayi said: I have a layer which is smaller than canvas and document size. You would need to post this layer in a document. Otherwise I would have to try and guess at what the layer is made of, how it is made etc. A major waste of time. Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.0 | Affinity Photo 2.4.0 | Affinity Publisher 2.4.0 | 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 More sharing options...
mkayi Posted June 25, 2022 Author Share Posted June 25, 2022 40 minutes ago, Old Bruce said: You would need to post this layer in a document. Otherwise I would have to try and guess at what the layer is made of, how it is made etc. A major waste of time. Yes, I understand that I think re-pasting from a rescaled source document solved the hairline problem (which was my actual problem - I inquired about expanding layer to canvas size, because in previous Apps I used, whenever I encountered hairlines of layers smaller than the canvas, expanding the layers to canvas size solved that quickly and I now know there is no such functionality in AP). I re-pasted the layer after I set the source document to 300 dpi, readjusted the size of the layer and a few masks that affected this layer and now it seems to be gone. Thank you, everybody, I would not have thought to check the dpi resolution in the source image. Quote Link to comment Share on other sites More sharing options...
iconoclast Posted June 25, 2022 Share Posted June 25, 2022 It's not clear to me where the hairline comes from. Are you sure that it is made of pixels? Not a guideline or something like that? Probably Old Bruce is right and it would be better to have a look at the file. Quote Link to comment Share on other sites More sharing options...
mkayi Posted June 25, 2022 Author Share Posted June 25, 2022 well, by now I can't really tell as it is gone, fortunately. I had created no guidelines. Also, the hairlines were only visible when zoomed out (but reliably). Now, they're gone, so I would say that it definitely had to do with pasting a layer with a different resolution. Quote Link to comment Share on other sites More sharing options...
iconoclast Posted June 25, 2022 Share Posted June 25, 2022 Do you mean white hairlines that only appear at the top and the left side of the image? In this case it would be only a sort of display error that appears related to certain zoom factors. These hairlines shouldn't appear e.g. with a zoom factor of 100% or 200%. However, they are not really there. Quote Link to comment Share on other sites More sharing options...
mkayi Posted June 25, 2022 Author Share Posted June 25, 2022 No, I mean hairlines which corresponded to the top and bottom edges of my layer. But good to know about that display error though. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.