Canon EF 40mm f/2.8 STM
Image Qualityshow all test shots
Note: the test shots for each of the image quality tests can be compared directly amongst all tested lenses. Within the test box click on "Choose lens to compare with..." to add a lens to the comparison. Then use your mouse to hover over the lens thumbnails. If all those test shots are a little too overwhelming consider clicking on "hide all test shots" above this paragraph.
Sharpness / Resolution
The EF 40mm f/2.8 STM is a very sharp lens. The resolution doesn't increase much with higher f-stops but it's already very high straight from f/2.8. On a fullframe camera the resolution is about the same as with the EF 50mm f/1.8 II but not quite as good as with the EF 50mm f/1.4 USM (all compared at the same f-stop). Nonetheless in regard to sharpness the EF 40mm f/2.8 STM is a real performer.
The image sensor of APS-C cameras usually has a much higher pixel density which requires even better optics. Some lenses cannot achieve the required resolution and render softer images on those cameras. However if you use the EF 40mm f/2.8 STM on an APS-C camera the results are simply outstanding. The resolution exceeds that of the EF 50mm f/1.8 II and EF 50mm f/1.4 USM on APS-C bodies by far and is roughly on par with the EF-S 60mm f/2.8 Macro USM.
The EF 40mm f/2.8 STM shows slight barrel distortions when used with a fullframe camera and they are even slighter with APS-C cameras. The level of distortion is so low that you are unlikely to see them in actual images. In this test the lens performs much better than the EF 50mm f/1.4 USM and still better than the EF 50mm f/1.8 II.
Crop from top of image (downsized)
Crop from bottom of image (downsized)
Color Errors Transverse Chromatic Aberrations
In focused parts of the image the EF 40mm f/2.8 STM shows noticeable color fringes on high-contrast borders towards the corners of the image. This type of color error cannot be helped with stopping down but the test shots are best compared amongst different lenses at f/8 where the influence of other color errors is minimal.
The EF 40mm f/2.8 STM's color fringes have about the same intensity as with the EF 50mm f/1.4 USM which is not too bad but quite noticeable. The EF 50mm f/1.8 II on the other hand shows almost no color fringes in focused parts of the image.
Beauty of blurred image parts Bokeh and Axial CA
Canon use 7 aperture blades to create an evenly round aperture shape for the EF 40mm f/2.8 STM. Out-of-focus parts of the image will therefore have a pleasantly smooth appearance. Even very high f-stops have nicely shaped apertures. Compare with the EF 50mm f/1.4 USM and especially with the EF 50mm f/1.8 II to see how well the EF 40mm f/2.8 STM's aperture is shaped (since the maximum aperture is usually perfectly round make sure to compare at a different f-stop).
Of course smooth background blur is only part of what makes out-of-focus areas of the image appealing. The other part is whether or not color fringes occur (and at what level). In that regard the EF 40mm f/2.8 STM's performance is only mediocre. While it easily outperforms the low-cost kit lens EF-S 18-55mm f/3.5-5.6 IS II (compared at similar focal lengths and apertures) its color fringes are unfortunately more intense than those of the EF 50mm f/1.8 II and other lenses. Note that this type of color error can be reduced by stopping-down and from around f/8 it is hardly noticeable.
Curvature of the focal plane Field Curvature
While the EF 40mm f/2.8 STM is pretty well centered in the sense that focusing on the left image border will also render the right image border perfectly in-focus it unfortunately expresses some serious curvature of the focal plane. That means that a focus on either of the image borders will render the center of the image out-of-focus (and vice versa). - Well, of course not completely out-of-focus but let's say it will not be in perfect focus. The reason for that is that the lens's focal plane is curved rather than straight as it should be. Whether or not this will be visible in actual pictures depends a lot on the subject you are shooting and of course on the in-focus range. Since stopping-down increases the in-focus range it will help you counteract the curvature effects and - even better - if you use the lens with an APS-C camera (where the smaller sensor captures only an inner crop of the image) you will not notice any curvature of the focal plane.
Again, curvature is only an issue in certain circumstances and even some really high-end lenses (such as the EF 24-70mm f/2.8L USM) have been known to show significant curvature.
Corner Shadow Vignetting
The EF 40mm f/2.8 STM shows intense corner shadows when used at maximum aperture. While stopping-down to f/5.6 helps to reduce them you cannot completely get rid of them no matter how high an f-stop you choose. The lens performs a lot worse than the EF 50mm f/1.4 USM or EF 50mm f/1.8 II (compare at same apertures) and it even has some corner shadow when used with an APS-C camera (of course not quite as intense). The good news is that many users aren't really bothered by corner shadow because it can be used creatively and - if needed - you can get rid of it fairly easy in post (modern cameras can also correct for "vignetting" in-camera).