Jump to content
lusyo

Exported PNG & JPG are blurry

Recommended Posts

10 hours ago, MEB said:

Hi djburt,

You have to thank @MattP (from dev team) for spotting the dpi difference, not me.

Anyway, i'm glad to know this is working as intended.

 

Thanks MattP!

Share this post


Link to post
Share on other sites

The fact that I couldn't properly export a simple, cropped JPEG was driving me mad, so I spent the good part of today exporting and comparing all possible sorts of combinations of PNGs and JPEGs in order to avoid having to buy another app. This is what I found:

If you a) change the canvas size, and b) resize the image (thus resampling the image – resampling is a requirement when resizing) before exporting it, thus resampling the image twice (since resampling is also required during export), the result will be blurry. In simpler terms: canvas resize + image resize = blurry export.

If you a) change the canvas size, and b) leave the image unresized and unsampled until you export it (in which step resampling is required), the result will be sharp. In my example, when I chose Nearest Neighbour or Lanczos 3 (non-separable) during export it even became too sharp. If you need to resize the image, you can still do it in the export dialog. This has the added benefit of keeping the original image in its original size.

  • The result will be the same whether the original image is a JPEG or a PNG.
  • The result will be the same whether you change the DPI of the image or not.
  • The result will be the same whether the canvas size is changed before or after the resampling is done.
  • The result will be the same whether the exported image is of the same format as the original or not.

With my image, I found that these resampling combinations also kept the image sharp, but all other combinations made it either blurry or too sharp:

  • Bicubic before export + Nearest Neighbour during export
  • Bilinear before export + Nearest Neighbour during export
  • Lanczos 3 (separable) before export + Nearest Neighbour during export

Compare attached images:

original.jpg

  • Untouched, 300 DPI JPEG.

blurry.jpg

  1. Canvas enlarged 15 px on each side.
  2. Image resized to 72 DPI, which made the height adjust automatically from 4423 px to 1061.5 px.
  3. Height manually adjusted to 300 px before image resampled using the Bilinear (default) method.
  4. Image exported without size change using the Bilinear (default) resampling method.

The method above is the method that a lot of people seem used to from Photoshop. It has always produced sharp results in Photoshop for me.

sharp-with-compensated-size.jpg

  1. Canvas enlarged 15 px on each side.
  2. Image resized to 72 DPI, which made the height adjust automatically from 4423 px to 1061.5 px.
  3. Height manually adjusted back to 4423 px before image resampled using the Bilinear (default) method.
  4. Image resized from 4423 px to 300 px height in the Export dialog, then exported with Bilinear (default) resampling method.

sharp-without-compensated-size.jpg

  1. Canvas enlarged 15px on each side.
  2. Image resized to 72 DPI, which made the height adjust automatically from 4423 px to 1061.5 px.
  3. Image resampled without further height adjustment using the Bilinear (default) method.
  4. Image resized from 1061.5 px to 300 px height in the Export dialog, then exported with Bilinear (default) resampling method.

In the two small sharp images, the woman by the piano looks exactly the same even when zoomed in closely, but the text is a tiny bit smoother in the one without compensated size. I think which of these two alternatives is the best is a matter of preference from case to case.

blurry.jpg

original.jpg

sharp-with-compensated-size.jpg

sharp-without-compensated-size.jpg

Share this post


Link to post
Share on other sites
13 hours ago, johanna said:

I spent the good part of today exporting and comparing all possible sorts of combinations

So you say resample at export work but resample with image size command does not (unless combined with export resample)? Remarkable!
(Now devs should correct this problem, but meanwhile) if others will confirm this behaviour we should resample only at export.

Share this post


Link to post
Share on other sites

I have difficulty understanding your results, mainly because the various images are at different sizes which makes comparison awkward. Three out of four are really too small for proper examination.

Because what you are trying to do seems an interesting project, I will try to follow your procedures and see what I come up with.

I was intreagued that your forensic medicine laboratory was examining a grand piano.

John


Windows 10, Affinity Photo 1.7 and Designer 1.7, (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Share this post


Link to post
Share on other sites

I have just run your procedures on an image that has been lurking on my PC for many years. After the various resizings, I ended up with three 300px images. Far too small to make any useful comparisons.

This is the original image: colonOriginal.thumb.png.3e109cc53143698b38e8a4634e606266.png

This has followed the Blurry procedure: colonBlurry.png.e1ac84ee02b1d2e80ec82a95e8b3cf4a.png

This is the Sharpen with Compensation: colonSharpWithC.png.564716f3d0a0bf439978668bbe7c1c2d.png

This is the Sharpen without Compensation: colonSharpWithoutC.png.91d418a20931f4d3a722b513cb0125cb.png

Just for good measure, I took my original and resized to 300px (ignoring the dpi) and using Lanczos Separable: colonLanczos.png.4006ef6f17d95d0531fe13bc32795f86.png

I may run my own trials to create final images of a size that can be compared.

John


Windows 10, Affinity Photo 1.7 and Designer 1.7, (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Share this post


Link to post
Share on other sites

@johanna, I have just seen your post on embedding fonts from a pdf. This would eplain why your output files are so small.

John


Windows 10, Affinity Photo 1.7 and Designer 1.7, (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Share this post


Link to post
Share on other sites
3 hours ago, John Rostron said:

I was intreagued that your forensic medicine laboratory was examining a grand piano.

They must have decided that it offered the potential for some key evidence! :P


Alfred online2long.gif
Affinity Designer 1.7.0.367 • Affinity Photo 1.7.0.367 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.7.0.135 • Affinity Designer for iPad 1.7.0.9 • iOS 12.3.1 (iPad Air 2)

Share this post


Link to post
Share on other sites

 

3 hours ago, Fixx said:

So you say resample at export work but resample with image size command does not (unless combined with export resample)? Remarkable!
(Now devs should correct this problem, but meanwhile) if others will confirm this behaviour we should resample only at export.

I think both resample methods work, but resampling twice gives a blurry export when combined with altering the canvas size. And because both resizing the image before export and exporting require resampling, resizing the canvas + resizing the image + exporting = blurry image.

My test image is supposed to be a thumbnail on a website. It's not supposed to be readable, but it's supposed to not look awkward. I can at least myself clearly see the difference between the blurry one and any of the sharp ones, small as they are, and so can my client, who's now happy with the sharper image. All is well and I can continue to use Affinity Photo for exports of this kind.

By the way, the ad is for a medical research fund. A person gave their grand piano to the fund so that the fund could sell it and use the income to sponsor a lot of awesome medical work. The placement of the piano in the lab is of course just meant to grab the reader's attention. :)

Share this post


Link to post
Share on other sites

Hey... I know this is a fairly old post. But I think I just solved at least my version of this issue.

I was simply trying to create a Facebook banner (820px x 312px). Simple high res background, my transparent vector logo, and a few lines of simple text. Every time I would go to export, no matter what format I tried, no matter what I changed regarding the DPI, etc., my text and logo was always pixelated and super unprofessional.

After reading on here that it may have had something to do with me using my 2015 MacBook Pro 15" Retina, I started looking for any and all Retina-themed options/toggles. I found one that did the trick.

In Export Persona, Slices, Export Preset, choose "Retina PNG-24" (instead of "Single PNG-24").

This resulted in two options for exported files, I chose the "x2" option, and now my image looks beautifully crisp and perfect. I did not have to rasterize anything or convert anything in the design itself.

I believe this is a similar fix to one I saw earlier in this thread, advising to bump things up to a 200% view, but I didn't want to redesign anything, and now this is working perfectly. Not sure if you can tell a difference in these graphics (depending on what kind of screen you're viewing on), but I SURE can; and I am very happy to have found an easy solution to this.

Hope this helps anyone who may be struggling with the same issue I had.

Cheers!

background.png

background@2x.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×