Adalbertus Posted March 25, 2019 Share Posted March 25, 2019 We are often working with many various photos in a specific way. Often performed operation, after the whole process of photo editing is adding border.Let's say, that border have to be 40px at each direction for 800px image. I have created a macro with using FX Outline option - maybe there are better ways to do it? Change Document properties - uncheck the Transparent background in the Document menu. Enable the Outline FX effect. Set radius to some pixel value... and this it's strange, because it must be 39px to get proper width of 880px for bordered image from 800px image. 40px is resulting in 882px image. Why is that? Set FX Outline colour to white. Clip Canvas. Is there an option to change a default colour of the document background, or it must be white? White is good for us for now, but it's good to know Next question is a little different, but also is close to our specific workflow with these photos.Is there a way to clip a photo as described below? We have a product photo with the white(or other), solid background. We choose some option to crop the image to content with ignoring pixels of the the background. Result is: Cropped solid background to the pixels of the product - It detects solid colour around the different pixels of the product accumulated at the middle of the document. For example, we have such option in Gimp: Image > Crop to Content. Quote Windows 7 | Intel Xeon E5450 | GeForce GT 730 | 8 GB RAM Link to comment Share on other sites More sharing options...
firstdefence Posted March 25, 2019 Share Posted March 25, 2019 59 minutes ago, Adalbertus said: Is there an option to change a default colour of the document background, or it must be white? White is good for us for now, but it's good to know Add a Fill Layer: Layer > New Fill layer and change it to whatever colour you like Aldabertus Quote iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 (Please refrain from licking the screen while using this forum) Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions Link to comment Share on other sites More sharing options...
Staff Callum Posted March 25, 2019 Staff Share Posted March 25, 2019 1 hour ago, Adalbertus said: Is there a way to clip a photo as described below? We have a product photo with the white(or other), solid background. We choose some option to crop the image to content with ignoring pixels of the the background. Result is: Cropped solid background to the pixels of the product - It detects solid colour around the different pixels of the product accumulated at the middle of the document. For example, we have such option in Gimp: Image > Crop to Content. Hi Adalbertus, Unfortunately there is no way to crop like this in Affinity I'm afraid. Thanks C Quote Please tag me using @ in your reply so I can be sure to respond ASAP. Link to comment Share on other sites More sharing options...
firstdefence Posted March 25, 2019 Share Posted March 25, 2019 You could kind of do it in reverse and unclip to content. Basically this creates a rectangle, moves it to the back, increases the dimensions of it by 80px horizontally and width wise from the centre and unclips it to show the border, this can then be coloured or a pattern added for a funktastic effect lol! In the macro you can adjust the width to suit. Variable Border.afmacro Quote iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 (Please refrain from licking the screen while using this forum) Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions Link to comment Share on other sites More sharing options...
John Rostron Posted March 25, 2019 Share Posted March 25, 2019 I'm not sure what you are after, but I just tried this: I created a blank canvas with a white fill layer. Added some content to this canvas with limits away from the edges. Flatten the document. Flood-fill the outer white area and delete it. Clip to Canvas. This removes the edges leaving the added content. John Quote 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 More sharing options...
Adalbertus Posted March 25, 2019 Author Share Posted March 25, 2019 2 hours ago, firstdefence said: Add a Fill Layer: Layer > New Fill layer and change it to whatever colour you like Aldabertus Ok, word of explanation Yes, I know that I can use that, and Pixel layer as well. It just had to be a quick test macro - mostly to check all ways to do that task Disabling the transparent background instead of playing with layers, had just one goal - to be a fast option in the search the way for the proper canvas resizing. My main question was: Quote I have created a macro with using FX Outline option - maybe there are better ways to do it? The Outline was for me the simplest way to configure it in Macro tool. And by the way.... I was just curious, did the white background colour, which is showed after disabling the Transparent background function, is hidden somewhere or did it depends on some other tool. 1 hour ago, John Rostron said: I'm not sure what you are after, but I just tried this: I created a blank canvas with a white fill layer. Added some content to this canvas with limits away from the edges. Flatten the document. Flood-fill the outer white area and delete it. Clip to Canvas. This removes the edges leaving the added content. John Yes, John, Your approach is good, when You have time to do such operations. Our main goal is to do it fast as possible. We don't know what canvas will be needed - it would require calculations based on the image size and more precision to achieve desired effect.Simply, our goal is: Load some photo (there may be regular graphics/photos with solid background, or there may be some png files with transparency.) Edit it if needed. Crop to content. Add border along with the fill - both have to be in same colour. Export. Next image... I have created other macro, more complex (but still basic) and allowing to further work with the project. Still using the Outline FX. If we have prepared, cropped to content image, we can play the macro: Enable the Outline FX effect - to be able to resize canvas according to pixel value of this tool by using clip canvas option. Set radius to some pixel value... and this still it's strange, because it must be 39px to get proper width of 880px for bordered image from 800px image. 40px is resulting in 882px image. Why is that? Set FX Outline colour to any colour. Add pixel layer. Clip Canvas. Fill the pixel layer with any colour. Move the pixel layer below the product image. Select first layer with the photo of the product. Disable the FX Outline. Border_40px.afmacro Quote Windows 7 | Intel Xeon E5450 | GeForce GT 730 | 8 GB RAM Link to comment Share on other sites More sharing options...
Adalbertus Posted March 25, 2019 Author Share Posted March 25, 2019 1 hour ago, Callum said: Hi Adalbertus, Unfortunately there is no way to crop like this in Affinity I'm afraid. Thanks C We have made a test with macro to achieve that. We have used: Wand Tool with the Tolerance at 1% Delete selected background Deselect Clip canvas Result is just the product image without background cropped to content. cut.afmacro Quote Windows 7 | Intel Xeon E5450 | GeForce GT 730 | 8 GB RAM Link to comment Share on other sites More sharing options...
Adalbertus Posted March 25, 2019 Author Share Posted March 25, 2019 2 hours ago, firstdefence said: You could kind of do it in reverse and unclip to content. Basically this creates a rectangle, moves it to the back, increases the dimensions of it by 80px horizontally and width wise from the centre and unclips it to show the border, this can then be coloured or a pattern added for a funktastic effect lol! In the macro you can adjust the width to suit. Variable Border.afmacro Thanks for your effort, but it seems, that You have created this macro on a Mac version, right? Our test result of Your macro You can see on the attached screenshot - something went wrong, and OS incompatibility may be the reason. But in spare time we'll try to repair this. Quote Windows 7 | Intel Xeon E5450 | GeForce GT 730 | 8 GB RAM Link to comment Share on other sites More sharing options...
HVDB Photography Posted March 25, 2019 Share Posted March 25, 2019 Here is a download link of a set of macros for inside or outside borders with variable width and colour choice to use with a flattened image/ document https://forum.affinity.serif.com/applications/core/interface/file/attachment.php?id=76754 Just test it out ... See attachment for the actions I took to add the outside border. Adalbertus and marciomendonsa 2 Quote Affinity Photo 2.3.1 Laptop MSI Prestige PS42 Windows 11 Home 23H2 (Build 22631.3007) - Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz 2.00 GHz - RAM 16,0 GB Link to comment Share on other sites More sharing options...
Adalbertus Posted March 25, 2019 Author Share Posted March 25, 2019 24 minutes ago, HVDB Photography said: Here is a download link of a set of macros for inside or outside borders with variable width and colour choice to use with a flattened image/ document https://forum.affinity.serif.com/applications/core/interface/file/attachment.php?id=76754 Just test it out ... See attachment for the actions I took to add the outside border. Works well. Thanks for a macro and for the clear description! It seems that Affinity macros are really neat! Just need to spend more time with them HVDB Photography 1 Quote Windows 7 | Intel Xeon E5450 | GeForce GT 730 | 8 GB RAM 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.