Brick Facade with Image Sampler

Hi, I’m trying to use this image sampler for my brick façade, the façade is 24.93 m x 23.44 m, I’m using this script that has the typical brick size and I need it to be that exact size, I did the math and I think I need 332 x 312 bricks per side if the height is 7.5 cm and the width 21 cm, anyone know what is the easiest way? I’m attaching the Script and the image I want to sample,

Image Sample (515.0 KB)
thank you.