Jump to content
VolkerMB

JPEG: Exported file shows unwanted lines across the picture

Recommended Posts

Hi there!

When I export the attached image to JPEG, I am left with a vertical blackish line across the exported image - at least at zoom leves. To replicate the issue:

  1. Open attached .afphoto-file
  2. Export it via FILE -> EXPORT to JPEG by setting width to 1050px and quality to anything between 75 and 100. The resampling method is irrelevant.
  3. Use any browser or image viewer to display the exported file at 150%

The blackish line appears to be the border of a layer element although the layer has no border (set to 0px and transparent).

Any ideas/work arounds how to avoid this?

Best,
Volker

mm_foto-1-medium.afphoto

Share this post


Link to post
Share on other sites

This isn't a bug.

There's a darkened vertical line along the left edge of the masked Pixel object because the object is horizontally misaligned with the document pixel grid, which is resulting in the mask being resampled and its left edge becoming anti-aliased, in addition to the Pixel object itself being resampled and its left edge becoming anti-aliased. The resampling is also causing a slight loss in sharpness of the image of the man, by the way. The Pixel object's X origin is at 1852.759339 px.

Solution: select the Pixel object and change its X origin to 1853 px.

In future, use Force Pixel Alignment to ensure objects get snapped to the document pixel grid. Also, you can change the display precision of numeric values in the app preferences to help you notice slight misalignments.

 

Share this post


Link to post
Share on other sites

Zoom to a level where you can see the line on your screen
Select the erase brush and on the pixel layer erase the line
Then export the file


Due to the ongoing Brexit negotiations, punctuation, spelling and grammar will be used sparingly until further notice.

Share this post


Link to post
Share on other sites
2 hours ago, carl123 said:

Zoom to a level where you can see the line on your screen
Select the erase brush and on the pixel layer erase the line
Then export the file

It would be better to learn what is causing the problem and how to avoid it.

 

Share this post


Link to post
Share on other sites

Hi owenr,

sounds like a clever idea. Unfortunately: It does not work. I already had "force pixel alignment" and "move by whole pixel" switched on. Additionally I corrected the position of the layer and the mask manually, but the exported file is still rendered with a blackish vertical line...

@carl123: The line is not visible in Affinity Photo. Here everything looks just fine. The line occurs in the exported jpeg (or png or tiff) only.

"Sad, so sad", Trump would say... (just kidding)

Anyway, thanks for your efforts.

Best,
Volker

Share this post


Link to post
Share on other sites
20 minutes ago, VolkerMB said:

Hi owenr,

sounds like a clever idea. Unfortunately: It does not work. I already had "force pixel alignment" and "move by whole pixel" switched on. Additionally I corrected the position of the layer and the mask manually, but the exported file is still rendered with a blackish vertical line...

It's not just an idea, and it definitely works (and I checked with your file), so I don't know where you went wrong.

One thing to note, though, is that "Move by whole pixels" will maintain an object's misalignment with the document pixel grid, instead of helping already misaligned objects become snapped to the pixel grid.

20 minutes ago, VolkerMB said:

@carl123: The line is not visible in Affinity Photo. Here everything looks just fine. The line occurs in the exported jpeg (or png or tiff) only.

It is also visible in your AP document at some zoom levels.

 

Share this post


Link to post
Share on other sites

I do not think this is a pixel positioning problem, even with whole pixels I still see the line, I also see it in your corrected upload

Add an outer shadow effect to the pixel layer , max out out all 3 sliders, (especially the Intensity slider) you clearly see the shadow coming from the line on the left hand side of the image (there is also one at the top)

There be pixels there, erase them


Due to the ongoing Brexit negotiations, punctuation, spelling and grammar will be used sparingly until further notice.

Share this post


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

I do not think this is a pixel positioning problem, even with whole pixels I still see the line, I also see it in your correct upload

It is a positioning problem. I've fixed it by snapping the Pixel object to the document pixel grid in the document I posted a few minutes ago.

 

 

Share this post


Link to post
Share on other sites

Hi owenr,

great work - thanks again. When I export your edited file the vertical line has vanished. But only at the layer position of "x: 1853px". At "x: 1850px" the vertical line reappears in the exported file. So I get more and more conviced it is a bug of some sort...

@carl123: Will try that. However, masking a pixel layer in order to simply change the background shouldn't involve so much extra magic, should it? (Not you fault, I know).

Share this post


Link to post
Share on other sites

I have downloaded your corrected version and added an outer shadow and reuploaded it

Do you not see the shadow on the left and top side being caused by pixels at the left and top edges of the image?

Erase those pixels and the shadow disappears

 

shadow2.afphoto


Due to the ongoing Brexit negotiations, punctuation, spelling and grammar will be used sparingly until further notice.

Share this post


Link to post
Share on other sites

 

13 minutes ago, carl123 said:

I have downloaded your corrected version and added an outer shadow and reuploaded it

Do you not see the shadow on the left and top side being caused by pixels at the left and top edges of the image?

Erase those pixels and the shadow disappears

 

shadow2.afphoto

Volker has tried the corrected file I uploaded and found that it does not produce the problematic dark line in an export!

I don't see the point in adding shadows to force a display artifact to appear now.

 

Share this post


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

At "x: 1850px" the vertical line reappears in the exported file. So I get more and more conviced it is a bug of some sort...

But 1850 works for me without a line appearing in the export. 

Please post your 1850 document so I can check what's happening to it.

Share this post


Link to post
Share on other sites
10 minutes ago, owenr said:

Volker has tried the corrected file I uploaded and found that it does not produce the problematic dark line in an export!

I don't see the point in adding shadows to force a display artifact to appear now.

If I  export your "corrected" file at a reduced width of 4000px the line is still there

This is not a whole pixel positioning problem


Due to the ongoing Brexit negotiations, punctuation, spelling and grammar will be used sparingly until further notice.

Share this post


Link to post
Share on other sites
4 minutes ago, carl123 said:

If I  export your "corrected" file at a reduced width of 4000px the line is still there

This is not a whole pixel positioning problem

It certainly is only a positioning problem when the document is exported at 100% scale.

A reduced size export can contain the dark line because of Affinity's strategy of building a scaled export (which also affects the zoomed document display) but Volker hasn't said that he is exporting at a reduced size.

 

Share this post


Link to post
Share on other sites
5 minutes ago, owenr said:

Yes, that's understandable because of Affinity's strategy of building a scaled export (which also affects the zoomed document display) but Volker hasn't said that he is exporting at a reduced size.

This is getting silly

Just delete the stray pixel line at the left-hand side of the image and the problem is solved no matter what size you export at

You cannot expect someone to keep trying to reposition the image if they want to export it at different sizes in the future


Due to the ongoing Brexit negotiations, punctuation, spelling and grammar will be used sparingly until further notice.

Share this post


Link to post
Share on other sites
5 minutes ago, carl123 said:

This is getting silly

Just delete the stray pixel line at the left-hand side of the image and the problem is solved no matter what size you export at

You cannot expect someone to keep trying to reposition the image if they want to export it at different sizes in the future

There is no need to do repeated repositioning for different scales of export.

After snapping the misaligned Pixel object to the pixel grid once, deselect all objects and then do a Merge Visible; a new composited Pixel object is placed at the top of the stack. That composite will have been created at full scale and will contain no dark line and the document can be exported at any scale without problem.

 

Share this post


Link to post
Share on other sites

...it is getting too complicated for me... However, merging did the trick. I should have thought about it way earlier.

Again, thanks for all your ideas and efforts.

Share this post


Link to post
Share on other sites
49 minutes ago, VolkerMB said:

...it is getting too complicated for me... However, merging did the trick.

@VolkerMB, the merge alone would still create a slight dark line. It is important that the Pixel object is first correctly aligned with the pixel grid and then a good merge can be made.

 

 

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

×