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

⭐ How to edit bitmap fill in Affinity Designer 2


Recommended Posts


I want to share how to edit bitmap fill, how to extract image from an object with bitmap fill.

I have an old project in which I used bitmap fiil, but the bitmap itself was lost. I needed to edit the bitmap itself (found a bug in a complex texture). I know that Affinity Designer 2 doesn't have this feature officially, nor did the first version. I recently came up with a way that worked: 

  1. Copy the object with bitmap fill to a new file, so that the canvas is larger than the object.
  2. Export the document. Select SVG, and check that nothing needs to be compressed: tab Advanced → Rasterize → Nothing.  Uncheck all the boxes in this tab (example of settings on the attached image).
  3. After that you will get a large SVG file with the bitmap texture encoded in bitmap64 format.
  4. Open the SVG file in a text editor that can open large files (Notepad++ is good for Windows). 
  5. Copy the huge set of characters between quotation marks that starts with something like:
    data:image/jpeg;base64,...
    This is your encoded bitmap in text format.
  6. Google any decoding service by searching for “base64 image decode”
  7. Paste the copied text into the text field of the service, click decode, click save image. Congratulations, you have the original bitmap!
  8. Edit it and apply it to your object as a new bitmap.

Done!

svg_export.png

Link to comment
Share on other sites

1 hour ago, vovkasolovev said:

I want to share how to edit bitmap fill, how to extract image from an object with bitmap fill.

• In what way do you edit the bitmap fill with your workflow?
• Can't I just export the object with bitmap fill with "Area: Selection" as an image file, and, if desired, adjust the fill attributes "Aspect ratio", "Extend" and "Quality" before export?

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

15 minutes ago, thomaso said:

In what way do you edit the bitmap fill with your workflow?

In list item number 8. You can do it any way you want, such as in a pixel persona.

 

16 minutes ago, thomaso said:

Can't I just export the object with bitmap fill with "Area: Selection" as an image file, and, if desired, adjust the fill attributes "Aspect ratio", "Extend" and "Quality" before export?

You can, as long as there's nothing extra there. I described it this way to avoid all the complicated cases when there are effects, masks, etc. on the object.

Link to comment
Share on other sites

1 hour ago, vovkasolovev said:

In list item number 8.

There you may edit just any image, not necessarily a bitmap fill, right?

1 hour ago, vovkasolovev said:

You can, as long as there's nothing extra there. I described it this way to avoid all the complicated cases when there are effects, masks, etc. on the object.

Isn't it still simpler & faster to hide/deactivate unwanted layer attributes & nested (!) items before image export as "Selection Only" … than to go the way via SVG export + code editing / copying / converting with the help of two additional apps?

Bildschirmfoto2024-08-20um14_55_58.jpg.57f85d7afa7e8cd3820a28b1ae7fb247.jpg

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

You just don't get the whole idea.
The way you write you don't get the original bitmap fill image, which could be rotated and distorted by the fill transformation. 
The point is to get the original undistorted bitmap. Not just exporting an object with a fill.
.

Link to comment
Share on other sites

49 minutes ago, vovkasolovev said:

The point is to get the original undistorted bitmap.

FWIW, you can reset a distortion like stretching and shearing with a double-click on a handle. To reset rotation press the Shift key and get it snap at a horizontal position. Select "Zero" from the "Extend" menu to reset Wrap/Mirror/Repeat.

"Only" regarding original size there is no interface option and it gets difficult unfortunately if you have to remember or can estimate only. Then a quality setting of 'Nearest' may help to detect a displayed size where the image is not upscaled (~ upsampled pixels not visible).

Indeed, an unknown original size for export maybe a reason not to choose this method of a reset via Fill Tool interface.

However, I am not successful with your method regarding size AND distortion. I tried two websites, the first didn't work (no decoding but auto-reset), the second offers the distorted image only and in the pixel dimensions of the Affinity bitmap fill container object, but not of the original image size.

Bildschirmfoto2024-08-20um18_10_31.thumb.jpg.8cd32dd61b5a61839ec3ae3981d25b2f.jpg

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

6 hours ago, vovkasolovev said:

2. Export the document. Select SVG, and check that nothing needs to be compressed: tab Advanced → Rasterize → Nothing.  Uncheck all the boxes in this tab

It appears that the setting "Rasterize: Nothing" leads to a nearly empty SVG (589 Byte):

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="3508px" height="2481px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g transform="matrix(1.51576,0,0,0.861004,301.077,450.617)"><rect x="340" y="421" width="1237" height="992" style="fill:rgb(128,128,128);fill-opacity:0;"/></g></svg>

4 hours ago, vovkasolovev said:

I described it this way to avoid all the complicated cases when there are effects, masks, etc. on the object.

An HSL adjustment for instance needs to get deactivated in the Layers Panel before export the entire page or document, unless it appears in the resulting output:

Bildschirmfoto2024-08-20um18_51_13.jpg.8d11873eaa1160ac00b5f69b2a687cc5.jpg

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

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.