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

Paint by Numbers


smadell

Recommended Posts

I am attaching an Affinity Photo macro that turns a photo into a “Paint by Numbers” image. The attached file is a macros category, and should be imported through the “hamburger” menu at the top right of the Library panel. The category can also be imported into the iPad version of Affinity Photo, although there is one important limitation (more on this later).

When you use the macro, it creates a Group called “Paint by Numbers Effect.” All of the changes are inside of this group, so you can turn it on and off simply. Once you look inside the group, you will see multiple layers. From bottom to top, these are:

1) Original Image - Merge Visible

This is a “merge visible” version of your photo. It includes all of the editing you may have done up until that point.

2) Posterization Adjustment

This is a Posterize adjustment layer, and is meant to reduce the number of colors/tones used in the effect.

3) Outlines

This is a separate layer, created (in part) by using a Detect Edges filter. It provides outlines for the areas of color. This mimics the outlines that were present on the Paint by Numbers boards we used as kids.

4) Normalize Colors

This is a copy of the original Merge Visible image, and has its blend mode set to Color. This is used to reset the posterized colors to more natural ones.

5) Adjust Brightness & Contrast

This is a finishing adjustment, and can provide a better final effect.

* * * * * * * * * * * * * * * * * * * *

Once you click the macro, you will be presented with a default version of the effect. A dialog box allows you to set a number of parameters. As you change each of these parameters, the Paint by Numbers effect is updated. You are asked:

Posterize - How Many Colors?

The default value is 4, but values between 3 and 6 generally give good results. If your image is a portrait, judging the final result by looking at what the different values do to the subject’s face is a good idea.

Outlines - Adjust the Opacity

The default is 50%. Adjust this upward to make the outlines more prominent; adjust it downward to make the outlines less obvious. Set to 0 to make them go away entirely.

Finish - Adjust the Brightness

Finish - Adjust the Contrast

The default is 10% brightness, and 20% contrast. Adjust these up or down to give you final effect the desired finish.

When you click Apply, the effect is finalized. Obviously, you can manually change any of the settings after the fact. However, you should know that while the number of posterization levels for the image is non-destructive, the originally chosen number is also used to create the outlines, and this is a destructive change. Although you can change the posterization level after the fact, it is not advisable to do this. The outlines might no longer line up with the individual areas of color.

Also, for some reason, the iPad version of Affinity Photo handles the macro pretty well but will not allow you to change the number of posterization levels before finalizing the effect. It is baked in at 4 levels. You can change this after the fact, but (as above) the number of levels in your posterized image may not match your outlines very well.

Here is the macro in action. The original image is top left; the parameters dialog is shown in its default state, and then changed during the course of the macro; the final effect is shown top right

1294858774_PaintbyNumbers.thumb.jpg.c0984c6852a5aa374355269ef15a0f40.jpg

As always, I am one person with one computer and have not tested this in every possible scenario. Try it and, if you like it, keep it and enjoy it. This forum has provided me with so many good ideas and answers to questions; this macro is my attempt to “pay it forward.”

[Note: Credit where credit is due. I am indebted to Dave Straker, whose recent YouTube video gave me some excellent ideas for this macro. Dave’s channel is called “InAffinity,” and is a steady source of helpful information. Thanks, Dave!]

 

Paint by Numbers.afmacros

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

Interesting, works on iPad too but without a dialogue box. Simple matter to select the individual adjustment layers and change settings though.

Many Thanks 

M1 IPad Air 10.9/256GB   lpadOS 17.1.1 Apple Pencil (2nd gen).
Affinity Photo 1.10.5 Affinity Design 1.10.5 
Affinity Publisher 2, Affinity Designer 2, Affinity Photo 2 and betas.

Official Online iPad Help documents (multi-lingual) here: https://affinity.https://affinity.help/ 

 

Link to comment
Share on other sites

  • 8 months later...
  • 9 months later...

There are easier ways to do that. Try this:

1) Posterize adjustment - this will simplify the areas of color

2) Detect edges

3) Invert

4) Threshold adjustment - set the slider as desired.

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

please i need some help, the files with .macros will not import? usually when it is zip i can extract it,  but how do i change it to the file format  .macro? What program will extract this for windows 7?    i found the answer. 

Edited by Paul Ehrat
i found the answer,
Link to comment
Share on other sites

Paul...

Do NOT try to change the file extension - it will not work. You can import the macros (as a macro "category") into the Library panel. There are 2 different kinds of macro files - (i) a single macro, exported from the Macro panel; and (ii) a macro category (which can include 1 or multiple macros) exported from the Library panel. The former has a file extension of .afmacro and the latter has an extension of .afmacros . Yes, it is a subtle difference and it confuses a lot of folks; perhaps Serif should have chosen extensions that were more dissimilar.

The bottom line. The Paint by Numbers.afmacros file can be imported from the Library panel.

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

  • 1 month later...

Thank you for your compliment, @Carlo58. I’m quite happy that you’re enjoying it.

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

  • 4 months later...

Thanks for this nice little helper. 

AMD Ryzen 7 5700X | INTEL Arc A770 LE 16 GB  | 32 GB DDR4 3200MHz | Windows 11 Pro 23H2 (22631.3296)
AMD A10-9600P | dGPU R7 M340 (2 GB)  | 8 GB DDR4 2133 MHz | Windows 10 Home 22H2 (1945.3803) 

Affinity Suite V 2.4 & Beta 2.(latest)
Better translations with: https://www.deepl.com/translator  
Interested in a robust (selfhosted) PDF Solution? Have a look at Stirling PDF

Life is too short to have meaningless discussions!

Link to comment
Share on other sites

  • 1 year later...

Hi, @EmilyTheG. Welcome to the forum.

It looks to me that your link opens a commercial site that will convert a photo into a physical canvas, pre-printed with outlines and "numbers" corresponding to a set of paints that the purchaser then applies to create a paint-by-numbers canvas. Obviously, the macro I attached is something entirely different.

Although the end result is designed to look similar to an actual Paint by Numbers canvas, this is a software rendition only. I have no idea how the "Custom Paint by Numbers" people get their photos processed and turned into canvases. My way seems like a lot less work, though!

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

Link to comment
Share on other sites

  • 7 months later...

I hope you find this fun, @dinkocroley. Once you’ve used the macro a bit, you should consider posting one or more of your results. I, for one, would really enjoy seeing what you were able to create.

Affinity Photo 2, Affinity Publisher 2, Affinity Designer 2 (latest retail versions) - desktop & iPad
Culling - FastRawViewer; Raw Developer - Capture One Pro; Asset Management - Photo Supreme
Mac Studio with M2 Max (2023}; 64 GB RAM; macOS 13 (Ventura); Mac Studio Display - iPad Air 4th Gen; iPadOS 17

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.