Skip to content

Feature proposal: handling tileable images #427

Description

@vpenades

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

Description

I was wondering if there's any provision for handling tileable images... I know that brushes are tileable by default, but in most processors, image tiling/wrapping is simply not supported.

For example, let's say I have an image (texture) I know it's tileable, and I want to apply a gaussian blur with radius 5. The current behavior is that processed pixels close to a boundary would not take in account the pixels of the opposite boundary. The resulting image, when tiled, would show a noticeable sharp seam between tile limits.

Tipically when texture/tiling has an enumeration like this:

WrapModes:

  • None
  • WrapX
  • WrapY
  • MirrorX
  • MirrorY

Activity

  1. antonfirsov commented on Jan 11, 2018

    @antonfirsov
    Member

    @vpenades interesting proposal, but really not easy to implement because of the cross-library architectural impact it brings. Might be a candidate feature for 2.0, but with our current focus, I'm afraid it's a bit off the radar, unless someone from the community takes care of it.

    But we really want to hear the voice of the users, so anyone else having interest in this, please vote/leave your comments! :)

  2. changed the title [-]handling tileable images[/-] [+]Feature proposal: handling tileable images[/+] on Jan 11, 2018
  3. JimBobSquarePants commented on Jan 11, 2018

    @JimBobSquarePants
    Member

    I'd say it only affects only the convolution based processors so theoretically shouldn't be too big a deal. That said a PR would be most welcome.

  4. antonfirsov commented on Jan 11, 2018

    @antonfirsov
    Member

    It probably also affects drawing.

  5. JimBobSquarePants commented on Jan 11, 2018

    @JimBobSquarePants
    Member

    You reckon? I don't think any of the drawing stuff really cares about edge pixels. I could be wrong though, it's not an area I've looked at in a while.

  6. tocsoft commented on Jan 11, 2018

    @tocsoft
    Member

    Only thing that could be effected in drawing is the ImageBrush and that already tiles the fill image.

  7. antonfirsov commented on Jan 11, 2018

    @antonfirsov
    Member

    Supporting tiling would mean to me that we need to support "cross boundary" drawing in a way like this:
    image

    Black lines represent image the boundary, the green hearth represents a single shape drawn by ImageSharp.Drawing.

    I view this as a complex feature set based on managing virtual coordinate systems.

  8. tocsoft commented on Jan 11, 2018

    @tocsoft
    Member

    no don't think we would need to/should support that scenario. It would be trivial to just draw the shape yourself with applying a transform the make it offset to each side.

  9. added this to the Future milestone on May 30, 2018
  10. JimBobSquarePants commented on Apr 25, 2022

    @JimBobSquarePants
    Member

    Fixed with #2060

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions