Skip to content

Row pitch for ImageView and ImageViewMut #56

@RunDevelopment

Description

@RunDevelopment

Motivation

  • I want decode_rect and Decoder::read_surface_rect to take an ImageViewMut to make the APIs simpler.
  • This also allows adding a crop API
  • This makes encode and decode more general.

Description

Add a row pitch field/parameter for the both ImageView and ImageViewMut.

The main problem that comes with this is that most de/encoder implementation needs to be updated. They currently all assume that row_pitch = width * bytes_per_pixel. This is especially true for compressed formats, which have optimized paths where we can directly pass the image buffer to the reader/writer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions