Jump to content
danmerey

[By Design] Merge Down Layers in AF corrupts/blures image in some cases: example attached, solution offered

Recommended Posts

"… at best the help topic seems incomplete, lacking important details about the scope of these options."

This seems to be a problem with many of the help topics - not giving enough information about what options actually do.  Things like "make your choice from the drop down menu", when you have no idea what the options actually mean, is not really very helpful!

(Sorry for going a bit OT.)

Share this post


Link to post
Share on other sites
36 minutes ago, >|< said:

When a corner handle of a Pixel object is dragged and snapped to pixel alignment on one document axis, the handle often must be pixel-misaligned on the other document axis because the default behaviour when scaling a Pixel object via a corner handle is to preserve aspect ratio.

As I am sure you know, the Move Tool aspect ratio default behavior can be changed in Preferences > Tools in the "Move Tool Aspect Constrain" menu, & the shift, CTRL/CMD, & Alt modifier keys can also affect this, as can the W/H lock in the Transform panel, so there are many ways pixel-misalignment can occur, with or without the toolbar constraints enabled.

I don't expect the "Force Pixel Alignment" help topic to explain all this in detail, but I do think it could at least mention that there are circumstances where the alignment constraints do not apply, perhaps with links to other topics that go into the details.


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites
47 minutes ago, PaulEC said:

This seems to be a problem with many of the help topics - not giving enough information about what options actually do.  Things like "make your choice from the drop down menu", when you have no idea what the options actually mean, is not really very helpful!

(Sorry for going a bit OT.)

I don't think it is OT at all. The built-in help & its online counterpart are intended to be the primary source of documentation for the app, supplemented by the official video tutorials & (if purchased) the workbook. So it should cover just about everything somewhere in one or more of the topics. That it does not is one of the few gripes I have with the apps.

As it is, users have to either learn by doing or by posting to these forums & sifting through a lot of topics & replies, or both. It gets the job done eventually but it is far from ideal.


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites
8 minutes ago, >|< said:

Yes, I know that. I was explaining why the misalignment was happening in a specific circumstance which baffled you.

That did not baffle me. As I said, what bothers me is how unhelpful the help topic is in this respect.


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites
13 hours ago, R C-R said:

What are you trying to merge this with?

The correct position and dimension of selected objects and the wrong position and dimension after the objects was merge.

Share this post


Link to post
Share on other sites

Despite the goodwill of Danmerey to recenter the thread on the initial question by opening a new thread, this thread has already got out of control. It's a failure :(. It's discouraging. Cos it deals about a specific "bug". On a nominal, fundamental function. That ruins 

  • So far, no one has pointed a good functional reason (if there's one, it's time to lay it down) for the merging function to work has it does, damaging the quality of the image.
  • And there is a simple technical way to make it work as it should (I'm eager to read the arguments of someone for whom the current behavior must prevail. Really. I want to understand).

I suggest to close this thread (or to let it live for those who want to deal with peripherical subjects) and to open a definitive third one using the initial posts. The aim of this third thread would be strictly :

Why does the merge currently gives a shity result whereas there is a simple way to make work as it should ? 

So answers in this new thread shouldn't in any case be technical but functional : "there is a good reason fro the merge function to work as it does, cos if it would achieve the result you want in this thread you would lost the capacity to ????" 

   

Share this post


Link to post
Share on other sites
6 minutes ago, olivierlafitte said:

a nominal, fundamental function

I think you mean “a named, fundamental function”. The word “nominal” refers to something which exists in name only (e.g. “a nominal difference”) or something which is insignificantly small (e.g. “a nominal sum of money”), so your “fundamental function” is quite the opposite of “nominal”.


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

Thx :).

I'm French. "Nominal" in French means in some case "common". Ex "Nominal use case" vs "Alternative use case". I though it could be used this way in English. I know the limitations of my English mays lead sometimes to incomprehensible sentence ...  

Share this post


Link to post
Share on other sites

Hi all,

I'm not entirely sure why you have created a duplicate thread with the exact "issue". 

This has already been explained the thread you linked,  and again here.

In a nutshell: If your layer's position and size values are not integer numbers, they will become blurry. When you Rasterise before the Merge operation, the pixels are "forced" to integer values, and the "Merge" operation does not produce a blurry result. 

I have closed this issue as "By design". 

Thanks,

Gabe. 

Share this post


Link to post
Share on other sites
6 hours ago, GabrielM said:

In a nutshell: If your layer's position and size values are not integer numbers, they will become blurry. When you Rasterise before the Merge operation, the pixels are "forced" to integer values, and the "Merge" operation does not produce a blurry result. 

In a nutshell: they are NOT blurry before merge, so they shouldn't be blurry after merge.

6 hours ago, GabrielM said:

I have closed this issue as "By design". 

Seems like you don't understand your own product. Worst support ever

Share this post


Link to post
Share on other sites
10 hours ago, GabrielM said:

Hi all,

I'm not entirely sure why you have created a duplicate thread with the exact "issue". 

This has already been explained the thread you linked,  and again here.

In a nutshell: If your layer's position and size values are not integer numbers, they will become blurry. When you Rasterise before the Merge operation, the pixels are "forced" to integer values, and the "Merge" operation does not produce a blurry result. 

I have closed this issue as "By design". 

Thanks,

Gabe. 

Dear @GabrielM

By saying the above you imply that if a layer's position and or dimensions are integer numbers then all is well. This is not true. 

The problem is not exclusive to non-pixel aligned/partial pixel objects. ANY pixel layer, even a pixel perfect layer, that is not in it's exact creation size will affect a merge.
Yes rasterizing will force a merge to work, but there is no way of knowing by the numbers if it's needed. So that means, unless you can keep track of what you've done to perhaps dozens, or more, objects, every single pixel layer, pixel aligned or not has to be rasterized first??

Pixel perfect. This is by design? (the mp4 compression is a little much.... but you will see) (info panel is set to show 3 decimal places)
(imho this is just the tip of the iceberg here. There is more to discuss.)

@danmerey I get you.

 

Share this post


Link to post
Share on other sites
6 hours ago, danmerey said:

In a nutshell: they are NOT blurry before merge, so they shouldn't be blurry after merge.

First, your layer (Layer1) is blurry before the merge (even in your integer-aligned version). However, it is more blurry after the merge, which we should try to explain.

I don't completely understand why is more blurry, and I will attempt to explore that. First, though it may be irrelevant, I do not understand how you created that image. Removing the layer effect on Layer1 leaves mostly an outline, and the color overlay then brings out a lot of otherwise hidden detail. I'd be interested in knowing where that detail came from. And I wonder if it's somehow relevant. I also wonder if the color overlay is somehow relevant (though I suspect the issue is really the background layer in your original file).

Next, let's consider the background layer, which appears to be a standard white pixel layer, except in your file it has a non-integer pixel origin and a non-integer pixel size. That's odd. I'm also curious what you did to create it, and (given the hidden detail in Layer1) whether the background started out as a simple white layer or whether there's something hidden in it, too. More on that later at the *** below.

To continue the exploration, I have prepared two simpler versions of your file. (All files are prepared in the 1.7 Beta of Photo.)

In this one ( blurring0-both-layers-pixel-aligned.afphoto ) I have aligned Layer1 to the pixel grid, and I have aligned the background layer to the pixel grid, and I have changed the background layer to be an integer pixel size.

In this one ( blurring0-both-layers-pixel-aligned-and-background-rasterized.afphoto ) I have, in addition, rasterized the background layer.

If I do a Merge Down on Layer1 in the first file it becomes more blurry.

If I do a Merge Down on Layer2 in the second file it does not become more blurry. So the rasterization affected something in the background layer. I'm not sure what, given that all the pixels appear white and the layer is properly aligned and sized.

*** So, I created my own file (  no-blurring.afphoto  ) with white background layer, and put your Layer1 on top of it. It has different dimensions than yours, so one has to zoom in further to look at it. Sorry. I then

  1. Merged Layer1 down. No added blur. I undid that, and
  2. I changed the background so it is not properly aligned to the grid, and does not have an integer size. I merged Layer1 down. Again, no added blur.

So, I conclude there is something unique about your background layer other than its odd size and placement.

I'd be interested in comments that you or @GabrielM (or anyone else) might have to help explain this.


-- Walt

Windows 10 Home, version 1903 (18362.145), 16GB memory, Intel Core i7-6700K @ 4.00Gz, GeForce GTX 970
Affinity Photo 1.7.0.367 and 1.7.1.390 Beta   / Affinity Designer 1.7.0.367 and 1.7.1.390 Beta  / Affinity Publisher 1.7.0.384 Beta

Share this post


Link to post
Share on other sites
15 minutes ago, walt.farrell said:

First, your layer (Layer1) is blurry before the merge (even in your integer-aligned version). However, it is more blurry after the merge, which we should try to explain.

Jeez, it's not blurry, did you even watch video in the thread or check my *.afphoto file? It's called antialiasing or just some pixels with transparency and have nothing with corrupring/blurring image after merge. Also check video on the previous answer from @JimmyJack, there's no blur at all, because there's no antialiasing. Though image become blurred after the merge.

15 minutes ago, walt.farrell said:

I do not understand how you created that image

How about to read the thread first? I mean, it's not that hard, right? I'll give you a tip, it's in the first message:

>> To get "bugged" layer you can resize existing normal layer and it becomes corrupted for future merges

Don't want to offend anyone here, but I'm tired of explaining simple things to people, who doesn't want to understand and to developers who don't give a f*ck about their own product. That's so furstrating. I was so happy that I found something instead of Photoshop and now I see how crappy support is. Or does Support should be so and it's "By Design", huh?

Share this post


Link to post
Share on other sites
1 minute ago, danmerey said:

> To get "bugged" layer you can resize existing normal layer and it becomes corrupted for future merges

I did that to my background layer, and the merging works just fine.

(And, by the way, how about lightening up a bit. I am tempted to believe that you're right that something unexpected is happening, but it needs more research.)


-- Walt

Windows 10 Home, version 1903 (18362.145), 16GB memory, Intel Core i7-6700K @ 4.00Gz, GeForce GTX 970
Affinity Photo 1.7.0.367 and 1.7.1.390 Beta   / Affinity Designer 1.7.0.367 and 1.7.1.390 Beta  / Affinity Publisher 1.7.0.384 Beta

Share this post


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

Pixel perfect. {...} There is more to discuss.

Isn't there always more to discuss? :S

One of those things is that I cannot duplicate your results. Maybe that is because I had to guess about canvas size, dpi, & (probably most significant of all) the placement of the eyes & mouth in the top layer. I took the placement & size of the two layers from your video, so that much should be the same. I was also careful to pixel-align the eyes & mouth (so there was no anti-alias blurring in that layer prior to doing the  Merge Down).

Anyway, this is the Transform panel after the merge (pixel decimal places set to 3):
29492366_Xformpanelpostmerge.jpg.242ebaac5d203976e5f9a0cd8a93763b.jpg
And merge visible?.afphoto is the file prior to the merge. I would be interested in seeing if others get the same or different results after doing the Merge Down.

EDIT: I just tried misaligning the eyes & mouth in the top layer (so there is visible anti-aliasing when zoomed in on it):
711042036_toplayereyesmouthanti0-aliased.jpg.14df94ef921288833795c4986f29f83b.jpg

The results of the Merge Down this time are exactly the same (same x, y, w, & h as shown above), except of course the face retains the pixel blend around the eyes & mouth.

So whatever is going on to change the pixel alignment in the video by @JimmyJack is something I can't duplicate. maybe if he can post the .afphoto file I could, but I can't without more info about how it was created.


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites
28 minutes ago, walt.farrell said:

I did that to my background layer, and the merging works just fine.

I'd like to see that.

23 minutes ago, R C-R said:

Isn't there always more to discuss? :S

One of those things is that I cannot duplicate your results. Maybe that is because I had to guess about canvas size, dpi, & (probably most significant of all) the placement of the eyes & mouth in the top layer. I took the placement & size of the two layers from your video, so that much should be the same. I was also careful to pixel-align the eyes & mouth (so there was no anti-alias blurring in that layer prior to doing the  Merge Down).

None of that matters. All that matters is if the PIXEL layer to be merged into has been resized.

Your file with resized red rectangle. Still pixel perfect. Now try and merge.

merge visible_jj.afphoto

Share this post


Link to post
Share on other sites
3 minutes ago, JimmyJack said:

None of that matters. All that matters is if the PIXEL layer to be merged into has been resized.

Well, what does matter in your "changed the size" layer is that it was not resized proportionally, so its x & y axis dpi's are not the same (& not even multiples of each other or evenly divisible by the same factor):
220008578_changedthesizedpi.jpg.ae2989ded8e136a03e1eb73b7b30775f.jpg

So I think it is a bit much to expect a merge (of any kind) to keep everything un-blurred & aligned 'pixel perfectly.' In fact, try using an integer pixel sized square brush to draw anything on it. Even a 10 x 10 pixel square brush will produce anti-aliased edges, even with "Force Pixel Alignment" enabled. I don't think there is any way to avoid that, at least unless Affinity Photo is rejiggered to support arbitrarily sized non-square pixels.


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites
3 minutes ago, JimmyJack said:

I'd like to see that. 

Thanks. In trying to construct a set of instructions to let you see that using the file I posted, I also found that it blurred when the bottom layer is not pixel-aligned. Sorry.


-- Walt

Windows 10 Home, version 1903 (18362.145), 16GB memory, Intel Core i7-6700K @ 4.00Gz, GeForce GTX 970
Affinity Photo 1.7.0.367 and 1.7.1.390 Beta   / Affinity Designer 1.7.0.367 and 1.7.1.390 Beta  / Affinity Publisher 1.7.0.384 Beta

Share this post


Link to post
Share on other sites
35 minutes ago, R C-R said:

Well, what does matter in your "changed the size" layer is that it was not resized proportionally, so its x & y axis dpi's are not the same (& not even multiples of each other or evenly divisible by the same factor):

What? Please try these things first. It doesn't matter. Multiple by 4 if you want. Or use a square.

I moved the sides individually to keep it pixel perfect, because resizing this particular rectangle proportionally would leave partial pixels.

35 minutes ago, R C-R said:

So I think it is a bit much to expect a merge (of any kind) to keep everything un-blurred & aligned 'pixel perfectly.' In fact, try using an integer pixel sized square brush to draw anything on it. Even a 10 x 10 pixel square brush will produce anti-aliased edges, even with "Force Pixel Alignment" enabled. I don't think there is any way to avoid that, at least unless Affinity Photo is rejiggered to support arbitrarily sized non-square pixels.

Again, try it. Use anything you want. Use two boxes 400 px separated by 100 px. Shrink one down to 100 px (still separated by 100 px). Merge.
Why is the resulting layer 601 px high? If you don't think this has large implications for imagery, I don't know what to say.

Share this post


Link to post
Share on other sites
28 minutes ago, JimmyJack said:

Again, try it. Use anything you want. Use two boxes 400 px separated by 100 px. Shrink one down to 100 px Still separated by 100 px. Merge.
Why is the resulting layer 601 px high?

Thing is, when I try that the result is 600 px high. I think I did as you suggested but it would be a lot easier to know if I am getting everything right if you uploaded example files that had the two layers set up as you want prior to the merge.

BTW, I have & continue trying a bunch of different things to try to duplicate what you & others have described, but as long as everything is aligned on pixel boundaries and the dpi is either single valued or evenly divisible pairs, I can't do it. It isn't for lack of trying.


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites
19 minutes ago, R C-R said:

I think I did as you suggested but it would be a lot easier to know if I am getting everything right if you uploaded example files that had the two layers set up as you want prior to the merge.

I can do that. But not at the moment.

 

59 minutes ago, walt.farrell said:

Thanks. In trying to construct a set of instructions to let you see that using the file I posted, I also found that it blurred when the bottom layer is not pixel-aligned. Sorry.

Okay. I'm not sure which file I should be looking at. Regardless, I need to install the latest beta I guess. I can do that. But not at the moment.

Share this post


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

Regardless, I need to install the latest beta I guess.

Are you testing with a beta or the retail Affinity Photo app?


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

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

×