Scaling Stylized Parameters

The size of an image will sometimes affect how other parameters are applied. In the case of Pixellate, Gaussian Blur or Halftone the size of an image will influence the visual effect of these three parameters.

Take these two images, for example:

300px image with blur
sandbox-demo
900px image with blur
sandbox-demo

Even if they have the same blur value, the blur parameter affects both of these images differently,

The value of the blur parameter must be scaled appropriately to achieve an identical blur effect between both images.

How to Scale

You can approach this with a bit of math. We can start with the two images with different aspect ratios. They both have blur=25, but the blur effect looks more pronounced on the left image because of the dimension difference.

Image with blur applied
sandbox-demo
New aspect ratio requiring blur
sandbox-demo

Step 1

The first step would be to get the total dimension for each image.

Image #1: 650 h * 250 w = 162500
Image #2: 250 h * 900 w = 225000

Step 2

Next, we can divide the total dimension of image two by image 1 to get the ratio of the size difference.

225000 / 162500 = ~1.38

Step 3

Finally, we can multiply our original blur value by the ratio we received in step 2.

25 * 1.38 = ~34.5

The Finished Result

After you receive your scaled-up blur value, you can apply it to your second image and see that the amount of blur between them is now the same.

Image with blur applied
sandbox-demo
Scaled blur
sandbox-demo

Using this method, you can ensure that your images have a uniform effect no matter the dimensions or aspect ratio of your images.