One small formula turns '3.5 cm by 4.5 cm' into the pixel size an image actually needs.
Some application forms specify photo and signature sizes in centimetres, because the picture will be printed on an admit card or a certificate. Your image file, though, is measured in pixels. To bridge the two you also need a resolution, written as DPI, meaning dots (pixels) per inch.
If a form gives only centimetres and no DPI, the pixel size is not fixed by the form. Any reasonable resolution gives a file that prints at the right size.
There are 2.54 centimetres in an inch. To get pixels, divide the size in centimetres by 2.54 and multiply by the DPI.
For example, a width of 3.5 cm at 200 DPI is 3.5 divided by 2.54, which is about 1.378 inches, multiplied by 200, which gives about 276 pixels. A height of 4.5 cm at 200 DPI gives about 354 pixels.
Here are some commonly used sizes, rounded to the nearest pixel. 3.5 x 4.5 cm photo: 138 x 177 px at 100 DPI, 276 x 354 px at 200 DPI, 413 x 531 px at 300 DPI; 4.0 x 2.0 cm signature: 157 x 79 px at 100 DPI, 315 x 157 px at 200 DPI, 472 x 236 px at 300 DPI; 3.5 x 1.5 cm signature: 138 x 59 px at 100 DPI, 276 x 118 px at 200 DPI, 413 x 177 px at 300 DPI; 2.0 x 2.5 cm photo: 79 x 98 px at 100 DPI, 157 x 197 px at 200 DPI, 236 x 295 px at 300 DPI.
These are only illustrations of the arithmetic. Always use the sizes your own form states.
Higher DPI gives more pixels and a larger file, so if the form has a small file-size limit, choose a lower DPI. 200 DPI is a common middle ground: sharp enough to read and print, and small enough to fit most limits. If a form states the DPI, use exactly that.
If the file is still too big at the right pixel size, the problem is quality, not size. Lower the JPG quality, or use a tool that finds the highest quality that fits.
First crop the picture to the right shape, then resize to the pixel dimensions you calculated, then reduce the file size to the form's limit. Doing these steps in this order keeps the image sharp.
The resizer linked below handles the last step by searching for the best quality that fits your size limit, entirely in your browser.
Resize a photo to an exact size in KB
At 200 DPI it is about 276 by 354 pixels. At 100 DPI it is about 138 by 177 pixels, and at 300 DPI about 413 by 531 pixels.
Pixels = centimetres divided by 2.54, multiplied by DPI.
Only if the form states it. Otherwise the pixel size and the file size are what the portal checks.
Pixel size is only one factor. JPG quality also affects file size, so reduce quality or use a tool that fits a KB limit.