Skip to content

Moving imageops and similar functionality to the imageprocs crate #2238

@ripytide

Description

@ripytide

Tracking Table

Key

  • 🟥: Not yet in imageproc
  • 🟧: In imageproc but not yet released.
  • 🟪: Released in imageproc but still in image
  • 🟩: Deprecated in image
function status equivalent in imageproc
blur 🟪 filter::gaussian_blur_f32
crop 🟧 compose::crop (slightly different in that it returns an entirely new image vs returning a SubImage that does no processing)
crop_imm 🟥 cannot be moved as it returns a SubImage that does no processing, compose::crop can be used instead but returns a new image
filter3x3 🟧 filter::filter or filter::filter_clamped
flip_horizontal 🟧 compose::flip_horizontal
flip_horizontal_in 🟥 None
flip_horizontal_in_place 🟧 compose::flip_horizontal_mut
flip_vertical 🟧 compose::flip_vertical
flip_vertical_in 🟥 None
flip_vertical_in_place 🟧 compose::flip_vertical_mut
horizontal_gradient 🟥 None
interpolate_bilinear 🟧 Implemented but private and needs refactoring relevant issue
interpolate_nearest 🟧 Implemented but private and needs refactoring relevant issue
overlay 🟧 compose::overlay
overlay_bounds 🟥 Only makes sense as a helper function for overlay and replace so I don't see the point migrating this a public function
replace 🟧 compose::replace
resize 🟥 None
rotate90 🟧 geometric_transformations::rotate90
rotate90_in 🟥 None
rotate180 🟧 geometric_transformations::rotate180
rotate180_in 🟥 None
rotate180_in_place 🟧 geometric_transformations::rotate180_mut
rotate270 🟧 geometric_transformations::rotate279
rotate270_in 🟥 None
sample_bilinear 🟥 None
sample_nearest 🟥 None
thumbnail 🟥 None
tile 🟥 None
unsharpen 🟥 Nearly, filter::sharpen_gaussian exists but lacks the threshold parameter and doesn't work on color images relevant issue
vertical_gradient 🟥 None
colorops::brighten 🟥 None
colorops::brighten_in_place 🟥 None
colorops::contrast 🟧 contrast::stretch_contrast
colorops::contrast_in_place 🟧 contrast::stretch_contrast_mut
colorops::dither 🟥 None
colorops::grayscale 🟥 None
colorops::grayscale_alpha 🟥 None
colorops::grayscale_with_type 🟥 None
colorops::grayscale_with_type_alpha 🟥 None
colorops::huerotate 🟥 None
colorops::huerotate_in_place 🟥 None
colorops::index_colors 🟥 None
colorops::invert 🟥 None

Original Comment

At the moment the image crate has several image processing functions in
the imageops module which seems a bit strange to me as they look like
they would better belong in the imageproc crate. Is there a reason why
such functionality is in this crate, or is perhaps a holdover from long
ago?

I would be happy to do the work migrating/integrating the functionality
into imageproc if you'd like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    draftAdd if this issue includes suggested code, compares interfaces, preparses wording,etckind: APImissing or awkward public APIs, maintainer choicekind: dependency-trackedOriginating in a dependency; upstream tracking exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions