As usual, we've shot multiple camera samples with each of the two phones and we've prepared crops to highlight the differences in image quality. The full resolution shots are also available for your inspection.
Field of View (FoV) is quite important for every camera - it measures how much you can fit into the shot. The HTC One shoots 16:9 photos and they are expectedly wider than the 4:3 shots of the Sony Xperia Z. Surprisingly, the Xperia can't make up for that in the vertical direction, so in general you'll be able to fit more into an HTC One photo than an Xperia Z photo.
We've included the effective FoV of the Xperia Z when shooting in Burst mode (at 9.6MP resolution), too.
Resolution is the other major consideration. We have two very different resolutions here, 13MP and 4MP, a difference of just over 3 times. For the first couple of crops we upscaled the HTC One photos - that makes them softer, but doesn't throw away fine detail (as downscaling the Xperia Z shots would).
The top of the first crop gives us a glimpse of the captured detail and the bottom at color rendering. Despite the major difference in resolution, the total resolution isn't too different. The Sony Xperia Z obviously has an advantage here but its noise reduction algorithms have diminished it quite obviously.
The HTC One does much better with color rendering, painting a pretty accurate picture, while the Xperia Z oversaturates the colors.
Moving on to crop #2. We picked things with very fine detail like the white railing, but also letters. The railing is a hands-down victory for the Sony Xperia Z, as the HTC One simply doesn't have the resolution to show the individual vertical bars.
It gets worse though, even the big letters are nearly illegible due to the noise in the image. Smaller letters in the bottom half of the crop are completely illegible in the HTC One photo, especially the ESPRIT logo, which virtually disappeared. The Sony Xperia Z does a much better here.
For the third crop, we downscaled the Xperia Z image to 4MP, because we knew you were going to ask us to try that too. This is an unfair comparison as it throws out some of the fine detail in the Xperia shot, but it's relevant as most photo sharing results in downsampling of your images.
The HTC One photos still show a good deal of noise in them - so much for those big "UltraPixels" improving image quality.
An interesting thing we noticed is that Sony seems to have messed up the image processing of the Xperia Z quite badly. The Normal mode produces shots that are looking worse than the ones captured in Burst mode at 9.6MP resolution. This is why we included the Burst shot FoV above.
Normal processing has super aggressive and quite clumsy noise suppression algorithm which smears out the foliage and the roof tiles, while making the purple fringing around the white windows more visible. It does remove some of the noise though.
Burst shot seems to skip this processing and while the shots are slightly grainier, the foliage in the tree looks much better and you get much more detail in the fire escape and roof tiles.
To recap, Burst mode gives you better per-pixel detail because it doesn't process the images as much. An Xperia Z camera without the heavy-handed post-processing would have been much further ahead of the HTC One compared to the Xperia Z camera with the current software.
Burst shot is a stop-gap measure (you lose resolution, FoV, touch focus) until Sony pushes out an update to fix things (fingers crossed).
You can view the full-resolution shots we used for the crops:
And also check out our Photo quality compare tool:
We also tried out the HDR feature of the two phones, which can be quite helpful for contre-jour photos and cloudy days . We used downscaled Xperia Z photos here too as we care more about the dynamic range than fine detail.
The HTC One is very quick in capturing HDR photos and the result show decent improvement in the shadows and moderate improvement in the highlights, but a little too flat images. The Sony Xperia Z HDR mode had little effect on both the final image had better contrast.
Check out the samples we used for the HDR crop too:
Another thing we tried was the sweep panorama. Both phones seem to use a video-based solution since the vertical resolution is about 1080. The HTC One showed some stitching issues, but most noticeable is the poor handling of the well-lit areas. The Sony Xperia Z's panorama didn't complete a 360 degree arc, but handled bright areas and stitching better (the color is off though).
Winner: Sony Xperia Z. The color rendering and HDR could have been better, but if Sony tweaks its image processing algorithms, the Xperia Z can put out some pretty good shots. Even as things stand now though, it has an advantage over the HTC One.
The HTC One enjoys a wider FoV, better color accuracy HDR, but the low 4MP resolution limits the resolved detail and image noise eats further into it.