Measuring 30x45cm, 12x18" is a common size for photo prints, art work and posters. The standard way to measure a print is by measuring width by height.
To get the best print result for 12x18", you'll need at least 864 x 1296px and ideally 3600 x 5400px.
If you are looking for a frame with a mat for an 12x18" photo, choose the 16x22" (40x55cm) frame. The mat will have an 12x18" (30x45cm) opening.