Jump to content

Recommended Posts

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?

  1. Change Document properties - uncheck the Transparent background in the Document menu.
  2. Enable the Outline FX effect.
  3. 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?
  4. Set FX Outline colour to white.
  5. 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?

  1. We have a product photo with the white(or other), solid background.
  2. We choose some option to crop the image to content with ignoring pixels of the the background.
  3. 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.
 


Windows 7 | Intel Xeon E5450 | GeForce GT 730 | 8 GB RAM

Share this post


Link to post
Share on other sites
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 :D


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo, Publisher Beta 1.7.0.140, Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad2 iOS 9.35 B|  

Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
Share on other sites
1 hour ago, Adalbertus said:


Is there a way to clip a photo as described below?

  1. We have a product photo with the white(or other), solid background.
  2. We choose some option to crop the image to content with ignoring pixels of the the background.
  3. 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

Share this post


Link to post
Share on other sites

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

Screen-Shot-2019-03-25-at-11-49-52.png


iMac 27" Late 2015 Fully Loaded, iMac 27" Mid 2011 both running High Sierra 10.13.6 - Affinity Designer/Photo, Publisher Beta 1.7.0.140, Illustrator CC, Inkscape, Blender, Sketchup, Pepakura Designer, MTC, Pixelmator & Pixelmator Pro + more... XP-Pen Artist-22E, - iPad2 iOS 9.35 B|  

Instagram & Flickr - Affinity Designer (ADe) Tutorials - Affinity Photo (APh) Tutorials - Public Domain Images

Share this post


Link to post
Share on other sites

I'm not sure what you are after, but I just tried this:

  1. I created a blank canvas with a white fill layer.
  2. Added some content to this canvas with limits away from the edges.
  3. Flatten the document. 
  4. Flood-fill the outer white area and delete it.
  5. Clip to Canvas.

This removes the edges leaving the added content. 

John


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

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

Share this post


Link to post
Share on other sites
2 hours ago, firstdefence said:

Add a Fill Layer: Layer > New Fill layer and change it to whatever colour you like Aldabertus :D

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:

  1. I created a blank canvas with a white fill layer.
  2. Added some content to this canvas with limits away from the edges.
  3. Flatten the document. 
  4. Flood-fill the outer white area and delete it.
  5. 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:

  1. Enable the Outline FX effect - to be able to resize canvas according to pixel value of this tool by using clip canvas option.
  2. 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?
  3. Set FX Outline colour to any colour.
  4. Add pixel layer.
  5. Clip Canvas.
  6. Fill the pixel layer with any colour.
  7. Move the pixel layer below the product image.
  8. Select first layer with the photo of the product.
  9. Disable the FX Outline.

Border_40px.afmacro


Windows 7 | Intel Xeon E5450 | GeForce GT 730 | 8 GB RAM

Share this post


Link to post
Share on other sites
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:

  1. Wand Tool with the Tolerance at 1%
  2. Delete selected background
  3. Deselect
  4. Clip canvas

Result is just the product image without background cropped to content.

cut.afmacro


Windows 7 | Intel Xeon E5450 | GeForce GT 730 | 8 GB RAM

Share this post


Link to post
Share on other sites
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

Screen-Shot-2019-03-25-at-11-49-52.png

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.

test.thumb.jpg.b2395c1bf73337930ae1e7db9c658aea.jpg


Windows 7 | Intel Xeon E5450 | GeForce GT 730 | 8 GB RAM

Share this post


Link to post
Share on other sites

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.
 

Outside border.jpg


Affinity Photo 1.6.5.123  &  1.7.0.293 bèta

Windows 10 Home v 1809 (build 17763.437) - 64 bit processor - AMD A4-5000 APU with Radeon HD Graphics  1.50GHz - RAM 8,00 GB
Calibrated Monitor (Datacolor Spyder5 Pro)

 

Share this post


Link to post
Share on other sites
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.
 

Outside border.jpg

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 ;)


Windows 7 | Intel Xeon E5450 | GeForce GT 730 | 8 GB RAM

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×