Jump to content

Photo is currently unusable because merging layers (even non-overlapping ones) blurs the whole document.


Recommended Posts

I was copying & pasting some patches onto an image and noticed that it had gotten very blurry. So I started undoing each paste and merge-down, and watched the document gradually become un-blurred.

There's something very wrong with Photo's layer-merge operation. I had cropped sections from two screen shots and pasted them side-by-side into a document. Merging these two non-overlapping layers blurred both of them. Thus I don't see how Photo is currently usable, since any export to a standard format requires merging layers.

I have attached the original document, before/after stills of the blurring, and a screen grab of it happening in Photo 1.9.3 under Mac OS 11.2.3.

 

degraded.png

MergeDegrades.afphoto

Link to post
Share on other sites

I’m sure I’ve seen a previous discussion about this. I think it’s to do with the layers not all being aligned to the pixel grid.

Alfred online2long.gif
Affinity Designer/Photo/Publisher for Windows 1.9.2 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.9.2 • Designer for iPad 1.9.2 • iPadOS 14.4.2 (iPad Air 2)

Link to post
Share on other sites

Interestingly, if you never merge anything in Photo and then export directly, the exported file does not appear to be blurred. But if you merge any layers while working, even a little pasted-in patch, you permanently degrade the entire composition.

So... I would still say Photo is unusable at the moment.

Link to post
Share on other sites
9 hours ago, Stokestack said:

Interestingly, if you never merge anything in Photo and then export directly, the exported file does not appear to be blurred. But if you merge any layers while working, even a little pasted-in patch, you permanently degrade the entire composition.

So... I would still say Photo is unusable at the moment.

Looks like this only happens with 'Merge Down' and not with 'Merge visible'. Am I wrong?

(iMac 2017, 16 GB RAM, Intel Iris Plus Graphics 640 1536 MB, MacOS 10.14.6 Mojave)

Link to post
Share on other sites
9 minutes ago, Stokestack said:

I don't know; didn't try that. That wouldn't really be a workaround though.

Until the bug will be fixed, it is already a workaround, I think. By the way, I have never used 'Merge Down', always only 'Merge Visible', so I have never noticed the bug before.

(iMac 2017, 16 GB RAM, Intel Iris Plus Graphics 640 1536 MB, MacOS 10.14.6 Mojave)

Link to post
Share on other sites

I don't feel like rasterizing the numerous text layers I typically have, so no... it's not.

Not having "merge down" also means you can't incrementally build areas (of pasted-together patches, for example) and then consolidate them when you're happy with them, before moving on to the next area.

Link to post
Share on other sites
4 hours ago, Puck said:

Until the bug will be fixed, it is already a workaround, I think. By the way, I have never used 'Merge Down', always only 'Merge Visible', so I have never noticed the bug before.

 

1 hour ago, Stokestack said:

I don't feel like rasterizing the numerous text layers I typically have, so no... it's not.

Not having "merge down" also means you can't incrementally build areas (of pasted-together patches, for example) and then consolidate them when you're happy with them, before moving on to the next area.

When all of the layers are visible, how is ‘Merge Visible’ different from ‘Merge Down’? :/

Alfred online2long.gif
Affinity Designer/Photo/Publisher for Windows 1.9.2 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.9.2 • Designer for iPad 1.9.2 • iPadOS 14.4.2 (iPad Air 2)

Link to post
Share on other sites
1 hour ago, Alfred said:

When all of the layers are visible, how is ‘Merge Visible’ different from ‘Merge Down’? :/

I think that Merge Down takes the Selected Layer and the one under it and gives you one merged layer instead of two separate. Merge Visible gives you a New Layer with everything in it and keeps the other layers intact.

Say you have a document with three layers, the top one is selected Merge Down gives you a document with two layers, Merge Visible gives you four layers

MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.6

Affinity Designer 1.9.3 | Affinity Photo 1.9.3 | Affinity Publisher 1.9.3 | Beta versions as they appear.

Link to post
Share on other sites

Exactly. A typical use case would be:

1. You want to take a screen shot of a computer UI to use it in an existing composition. But it's too tall to fit on the screen at once, so you have to take one screen shot, scroll down, and take another.

2. You open, copy, and paste (or just place) one of the partial screen shots into your composition.

3. You open the other partial screen shot, paste it into your composition and align it with the first to complete the UI, and merge it down onto the first. Now you have a complete image of the UI as one layer, to be moved and resized freely in your composition.

There are many, many other situations where I want to paste some small image fragment over a layer and then merge it down onto that layer once it's positioned correctly. I'm surprised that people have been laboring without realizing they could do this with Merge Down.

Link to post
Share on other sites
  • Moderators

Hi all,

What you see is somehow expected. First, your pixel layer are not using integer values. So, when you merge down, things will shift slightly and will be blurred, because the merged layer will now be pixel aligned. Second, your images have different DPI values. If you want to have "clean" pixel layers when you merge down, you would need to make sure you have the same DPI for whet you merge down, and that your image Position/size are using whole pixels. You can rasterise the layers before you merge down and this will ensure they are all correct :) 

Link to post
Share on other sites

Thanks, but that doesn't make sense. The underlying image doesn't move and doesn't change its DPI. Pasting a tiny patch over 100 square pixels in the corner of a 4K image should not blur the entire thing. And it certainly shouldn't blur the entire image more and more with every paste and merge, since (based on your comment) the image will be "pixel-aligned" after the first merge and shouldn't require it again.

I don't know where you're seeing the DPI of a layer, but they were both captured from the same screen region and I don't think they were resized. So their DPI should be identical.

Also, if this shifting and blurring were necessary, it would occur when you exported a flattened image as well. But it doesn't.

And finally: I've never had this problem in Photoshop.

Link to post
Share on other sites
  • Moderators
9 hours ago, Stokestack said:

Also, if this shifting and blurring were necessary, it would occur when you exported a flattened image as well. But it doesn't.

Not exactly. Merge down and Rasterise are 2 different operations with different backend pipelines. Rasterise will "bake" the pixels you see on screen into the final result. While Merge down will merge the selected layer into the bottom one, keeping the bottom's DPI. So, if those 2 images have different DPI values, things will shift (become blurry). This is expected. 

9 hours ago, Stokestack said:

I don't know where you're seeing the DPI of a layer, but they were both captured from the same screen region and I don't think they were resized. So their DPI should be identical.

With the move tool selected you will see it in the context toolbar. 

Link to post
Share on other sites

Thanks for the reply. Your hypothesis doesn't turn out to be true. I deleted one layer, leaving a single-layer document. I then copied a small rectangular region of that layer, pasted it, and merged down. The entire document blurred.

People are unknowingly degrading their images further and further in the process of doing operations that should be non-destructive to any pixels outside the domain of definition for them. Things shouldn't even be blurred within the DOD, let alone thousands of pixels away.

Link to post
Share on other sites
On 4/27/2021 at 3:59 AM, Stokestack said:

Your hypothesis doesn't turn out to be true. I deleted one layer, leaving a single-layer document. I then copied a small rectangular region of that layer, pasted it, and merged down. The entire document blurred.

And was that single-layer properly aligned with the document pixel grid? If not, when you merged it would blur.

Please try it by starting with a new, single-layer document, and see if it behaves the same. If so, please provide your sample .afphoto document.

I do not see the behavior you have described.

-- Walt

Windows 10 Home, version 20H2 (19042.685),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop (2021-04-06):  32GB memory, Intel Core i7-10750H @ 2.60GHz
, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU
Affinity Photo 1.9.2.1035 and 1.9.4.1048 Beta   / Affinity Designer 1.9.2.1035 and 1.9.4.1048 Beta  / Affinity Publisher 1.9.2.1035 and 1.9.2.1024 Beta

Link to post
Share on other sites
8 hours ago, walt.farrell said:

And was that single-layer properly aligned with the document pixel grid? If not, when you merged it would blur.

As it turns out, yes. "Force pixel alignment" appears to be on by default; or at least it is on my system for all new documents.

Even if it hadn't started out that way, after a merge it would be aligned with the pixel grid, would it not? Therefore, further down-merges (without moving the underlying layer) would not continue to degrade it. But they do.

I've provided a document that demonstrates the problem, created in a very simple and commonplace sequence of steps. I don't see any point in nancing around creating a document just-so, in order to see if the problem doesn't happen then. That doesn't help anyway, because this application would still be degrading our work with no warning in an unknown variety of use cases.

Thanks for your reply.

Screen Shot 2021-05-03 at 3.43.36 PM.png

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

I've provided a document that demonstrates the problem, created in a very simple and commonplace sequence of steps. I don't see any point in nancing around creating a document just-so, in order to see if the problem doesn't happen then. That doesn't help anyway, because this application would still be degrading our work with no warning in an unknown variety of use cases.

But @Gabe has explained the issue with the original document you provided. You two layers in it. One with a DPI of 165 and the other with 166. Merging down is going to cause issues due to the mismatched DPI even if the alignment to the pixel grid is correct. Further, the document DPI is 144, which probably also contributes to your issue.

 

-- Walt

Windows 10 Home, version 20H2 (19042.685),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop (2021-04-06):  32GB memory, Intel Core i7-10750H @ 2.60GHz
, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU
Affinity Photo 1.9.2.1035 and 1.9.4.1048 Beta   / Affinity Designer 1.9.2.1035 and 1.9.4.1048 Beta  / Affinity Publisher 1.9.2.1035 and 1.9.2.1024 Beta

Link to post
Share on other sites

These are screen shots, taken seconds apart. I have no idea what rounding error has produced a DPI mismatch of 1.

Regardless, as I noted in reply to Gabe: After the first merge-down, the "adjustment" has been done. But copying and pasting from the same layer onto itself (and thus same DPI) continues to degrade the image. You can even take the file I provided and delete one layer entirely and work on just one. It continues to blur without the DPI conflict.

And finally: I started this document by right-clicking on one of the screen shots and saying, "Open with..." If there's a DPI issue, Photo created it without my involvement.

Affinity Photo can't be trusted to maintain image quality. Period.

Link to post
Share on other sites
21 minutes ago, Stokestack said:

You can even take the file I provided and delete one layer entirely and work on just one. It continues to blur without the DPI conflict.

You still have a DPI conflict. The document DPI is 144. The DPI of your layer is 165 or 166, depending on the layer you choose.

You need to avoid causing that DPI discrepancy, I think.

22 minutes ago, Stokestack said:

And finally: I started this document by right-clicking on one of the screen shots and saying, "Open with..." If there's a DPI issue, Photo created it without my involvement.

So, after Opening (at 144 DPI) you didn't do anything like adjusting the size of the document and the size of the existing Background layer, perhaps making it smaller, so there was room on the page for a second screenshot? I suspect you did, and that in that process you set the layer DPI to a different value than the document DPI, and that's what's causing your problem.

-- Walt

Windows 10 Home, version 20H2 (19042.685),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop (2021-04-06):  32GB memory, Intel Core i7-10750H @ 2.60GHz
, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU
Affinity Photo 1.9.2.1035 and 1.9.4.1048 Beta   / Affinity Designer 1.9.2.1035 and 1.9.4.1048 Beta  / Affinity Publisher 1.9.2.1035 and 1.9.2.1024 Beta

Link to post
Share on other sites
10 hours ago, walt.farrell said:

You still have a DPI conflict. The document DPI is 144. The DPI of your layer is 165 or 166, depending on the layer you choose.

Then the degradation shouldn't have occurred yet. If you're saying that merging requires a resampling to match the document DPI, it should happen once. Why would it happen over and over again?

10 hours ago, walt.farrell said:

So, after Opening (at 144 DPI) you didn't do anything like adjusting the size of the document and the size of the existing Background layer,

Nope. I resized the canvas. I save image resizing until the final step.

Link to post
Share on other sites
5 hours ago, Stokestack said:

Then the degradation shouldn't have occurred yet. If you're saying that merging requires a resampling to match the document DPI, it should happen once. Why would it happen over and over again?

I'm not sure, but that's part of why I think you have more work to do in showing us exactly what you did, and documenting the exact steps that you took. You might also be able to spot the exact problem point, now that you know more about some of the fine points that can play a role in what you're seeing.

5 hours ago, Stokestack said:

I resized the canvas.

Using Document > Resize Canvas, or some other method?

-- Walt

Windows 10 Home, version 20H2 (19042.685),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop (2021-04-06):  32GB memory, Intel Core i7-10750H @ 2.60GHz
, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU
Affinity Photo 1.9.2.1035 and 1.9.4.1048 Beta   / Affinity Designer 1.9.2.1035 and 1.9.4.1048 Beta  / Affinity Publisher 1.9.2.1035 and 1.9.2.1024 Beta

Link to post
Share on other sites
12 hours ago, walt.farrell said:

I'm not sure, but that's part of why I think you have more work to do in showing us exactly what you did, and documenting the exact steps that you took. You might also be able to spot the exact problem point, now that you know more about some of the fine points that can play a role in what you're seeing.

I neither have "more work to do" nor do I know any more about any of these "fine points." None of those "fine points" has held up to testing or logic. Pixel-snapping turned out to be on, and the mismatched layer DPI has also been eliminated as an issue by copying from and to the same layer. Nor does the document-DPI hypothesis explain multiple degradations.

Quote

Using Document > Resize Canvas, or some other method?

That's the only method I know, so that's what I used.

It doesn't matter how I arrived at this document. It was created entirely in Photo from Mac screen-shot PNGs. The observed behavior shouldn't happen. Affinity engineers have the file and they can step through their code with it. I've done plenty of work and entertained more than enough excuses.

Link to post
Share on other sites

You're doing something to cause the DPI mismatch, and I suspect it's that mismatch that is causing the problem you've noticed.

If you can't figure out what you're doing that causes the mismatch, then perhaps someone else can if you describe your processes completely, or perhaps you can provide a video.

If we figure out what causes the DPI mismatch, and if the DPI mismatch is the problem, then we're closer to figuring out of there's a bug or if you need to change your process.

-- Walt

Windows 10 Home, version 20H2 (19042.685),
   Desktop: 16GB memory, Intel Core i7-6700K @ 4.00GHz, GeForce GTX 970
   Laptop (2021-04-06):  32GB memory, Intel Core i7-10750H @ 2.60GHz
, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU
Affinity Photo 1.9.2.1035 and 1.9.4.1048 Beta   / Affinity Designer 1.9.2.1035 and 1.9.4.1048 Beta  / Affinity Publisher 1.9.2.1035 and 1.9.2.1024 Beta

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.