Jump to content
You must now use your email address to sign in [click for more info] ×

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

1666443077_Capturedcran2019-02-1722_03_27.jpg.d93ab9828cd4171d008f664b0a795f09.jpg

 

 

Mosaic of slices

816039959_Capturedcran2019-02-1722_03_37.thumb.jpg.5307520c68661aa4434e24e7dd9497d1.jpg

 

Slices

As you can see, extra background is white.

1441636912_Capturedcran2019-02-1722_03_48.jpg.327cc15101f9135425c35a3a53f87faa.jpg

 

 

Top left slice

bande1.thumb.jpg.2912a99adc6473b32576a58e46845e82.jpg

Link to comment
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

Affinity Photo V2.3.0 | Affinity Designer V2.3.0 | Affinity Publisher V2.3.0

Mac Studio M2 Ultra | 128 GB RAM | 1 TB SSD | macOS Ventura 13.6 | EIZO CS2740 4K UHD
MacBook Pro Retina, 15", Mitte 2015 | 2,8 GHz Intel Core i7 | 16 GB RAM | 512 GB SSD | macOS Monterey 12.6.6

Link to comment
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.

 

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
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.

bild1.jpg.4418dfb4d2c9de9a703f94a461c6a12d.jpg

bild3.jpg.26a869db63d5753146218b0eff545e64.jpg

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

☛ 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

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.