Jump to content

PHOTO – How to set background color for jpeg export

Recommended Posts

On Affinity Photo I want to export an entire black image to a 3x3 square of slices. As this square is bigger than original image, 8 exported slices  but the center's one have extra pixels. When I exported slices, these extra pixels are white. I want them to be black. I tried many tricks without success: change background color of image, add a square below the image and fill it with black... No success. Extra pixels are always white. Is there a way to achieve this goal?

Original image




Mosaic of slices




As you can see, extra background is white.




Top left slice


Share this post

Link to post
Share on other sites

In Export Persona click onto the small triangle beside the slice. For file format choose JPEG. In the upper tab export options click onto the field beside background color and hoose black color. Do this for every slice.

Does this work in the way you want?

Background Slice.png

MacBook Pro Retina, 15", Mitte 2015 | 2,8 GHz Intel Core i7 | 16 GB RAM | 512 GB SSD | macOS Mojave 10.14.5
Affinity Photo 1.7.1 | Affinity Designer 1.7.1 | Affinity Publisher 1.7.1

Share this post

Link to post
Share on other sites

Hi @Dominique

I may have misunderstood what you want but assuming I got that right, this alternative approach should work & may be something you want to consider for future projects:

Note: From what you posted, I gather for this file you want what amounts to a 3240 px x 3240 px image (3 x 1080 in each direction) exported into 9 equally sized 1080 x 1080 px JPEG file slices. (I am assuming the 1080 x 1076 "bande4" slice is not the size you actually want for that slice.)

  1. For safety's sake & just because I like to keep things as non-destructive as possible, create a snapshot of the original image. It's optional, but it never hurts.
  2. Using Document > Resize Canvas & the center anchor point, set the canvas size to 3240 px x 3240 px.
  3. Using the Rectangular Marquee Tool, make a selection that encloses all of the non-black parts of the image & invert it.
  4. Using the Flood Fill Tool set to black & 100% tolerance, fill the selection, which should leave you with an all black background surrounding the colored image.
  5. Deselect the selection & switch to the Export Persona.
  6. Create the nine 1080 x 1080 px slices. This was for me by far the most tedious part but using a combination of the Transform panel to set the sizes & snapping to get all of them lined up, it only took a minute or so.
  7. Export the nine slices & you are done,

The attached Mosaic of slices.afphoto (history included) is an example of this approach, using a scaled up version of the 704 × 712 JPEG file from your first post. Because it was scaled up it is more pixelated than what I assume is your full sized file, but it should be good enough to demonstrate what I did.


Affinity Photo 1.7.1, Affinity Designer 1.7.1, Affinity Publisher 1.7.1; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo & Affinity Designer for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post

Link to post
Share on other sites

Reminds me that I once made a quick turnaround image slice (and companion merge back) tool for such image splitting into same sizes purposes, since a friend needed this for Instagram image presentations or the like. - Can be handy if one has to do such things very often and repeatedly.



One can find a bunch of such tools on the net.

☛ Affinity Designer 1.7.1 ◆ Affinity Photo 1.7.1 ◆ OSX El Capitan

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