Bug 417158 - Halftone Filter has artifacts with an object on a transparent layer
Summary: Halftone Filter has artifacts with an object on a transparent layer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Filters (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-04 17:23 UTC by Ahab Greybeard
Modified: 2021-02-13 12:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Halftone filter problem stages (866.39 KB, image/png)
2020-02-04 17:23 UTC, Ahab Greybeard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ahab Greybeard 2020-02-04 17:23:23 UTC
Created attachment 125670 [details]
Halftone filter problem stages

SUMMARY
This is seen with the 4.2.0 and onwards appimages and the Feb 03 4.3.0 prealpha appimage git 8e38e39
It does not happen with the krita 4.1.7 appimage.

If an object is painted on a transparent paint layer and then the Halftone filter is applied, there are minor artifacts around the edges of the resulting image and then major artifacts which are revealed after layer visibility is toggled.

The attached image, halftone-bugs.png, shows sub-images a,b,c,d which illustrate this.

STEPS TO REPRODUCE
1. Draw an object such as shown in a) on a transparent paint layer.
2. Apply Filter -> Artistic - Halftone and wait for the on-screen image to be processed.
3. Note that the result is as shown in b) with local artifacts around the edges.
4. Note that the layers docker thumbnail for the layer shows major artifacts as in c).
5. Toggle the layer visibility.
6. Note that the major artifacts are now part of the layer as shown in d) and seem to correspond to the right and lower edges of a content bounding box.

OBSERVED RESULT
This happens if the anti-aliasing option of the halftone filter is on or off.
It happens if graphics acceleration and/or instant preview are on or off.

It does not happen if the object is on a solid colour layer.

EXPECTED RESULT
No artifacts

SOFTWARE/OS VERSIONS
Krita

 Version: 4.3.0-prealpha (git 8e38e39)
 Languages: en_GB, en, en, en_GB, en
 Hidpi: true

Qt

  Version (compiled): 5.12.5
  Version (loaded): 5.12.5

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.19.0-6-amd64
  Pretty Productname: Debian GNU/Linux 10 (buster)
  Product Type: debian
  Product Version: 10

OpenGL Info
 
  Vendor:  "NVIDIA Corporation" 
  Renderer:  "GeForce GTX 750 Ti/PCIe/SSE2" 
  Version:  "4.6.0 NVIDIA 418.74" 
  Shading language:  "4.60 NVIDIA" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

Hardware Information

  GPU Acceleration: auto
  Memory: 16039 Mb
  Number of Cores: 8
  Swap Location: /tmp

Current Settings

  Current Swap Location: /tmp
  Undo Enabled: 1
  Undo Stack Limit: 18
  Use OpenGL: 1
  Use OpenGL Texture Buffer: 1
  Use AMD Vectorization Workaround: 0
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 360
  Use Backup Files: 1
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Use Win8 Pointer Input: 0
  Use RightMiddleTabletButton Workaround: 0
  Levels of Detail Enabled: 1
  Use Zip64: 0

Display Information
Number of screens: 2
	Screen: 0
		Name: DVI-D-1
		Depth: 24
		Scale: 1
		Resolution in pixels: 1280x1024
		Manufacturer: Dell Inc.
		Model: DELL 1704FPV-
		Refresh Rate: 60
	Screen: 1
		Name: DVI-D-0
		Depth: 24
		Scale: 1
		Resolution in pixels: 1280x1024
		Manufacturer: Dell Inc.
		Model: DELL 1704FPV-
		Refresh Rate: 75
Comment 1 Ahab Greybeard 2020-02-04 17:36:27 UTC
Clarification Note:
With 4.1.7, the minor artifacts at the edges do happen. The major artifacts do not happen.
Comment 2 wolthera 2020-02-17 14:47:03 UTC
Confirming this.
Comment 3 Halla Rempt 2020-02-17 14:56:16 UTC
Dmitry recently changed something in the bounds calculation -- maybe that was it? Or the edge handling of the convolution painter...
Comment 4 wolthera 2020-08-22 10:04:35 UTC
This should be resolved with the new halftone filter by Deif Lou? I don't recall if that got backported to 4.3, though.
Comment 5 Ahab Greybeard 2020-08-22 18:33:10 UTC
This has been fixed in the new Halftone filter which is in the Aug 22 5.0.0 prealpha (git 3ecf7a6) appimage and also the Aug 13 build of that one.

The new Halftone filter is not in the Aug 21 4.4.0 alpha (git ba852b2) appimage.

Setting to REPORTED.
Comment 6 Halla Rempt 2021-02-13 12:41:20 UTC
I just checked and the new filter is in the krita/4.3 stable branch (from which we make 4.4...) now, and the problem is gone.