Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add qt6 rgbSwap method #107

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions crates/cxx-qt-lib/src/gui/qimage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ mod ffi {
/// Returns the enclosing rectangle (0, 0, width(), height()) of the image.
fn rect(self: &QImage) -> QRect;

/// Swaps the values of the red and blue components of all pixels, effectively converting an RGB image to an BGR image.
#[cfg(cxxqt_qt_version_major = "6")]
#[rust_name = "rgb_swap"]
fn rgbSwap(self: &mut QImage);

/// Returns a copy of the image scaled to a rectangle with the given width and height according to the given aspectRatioMode and transformMode.
fn scaled(
self: &QImage,
Expand Down
Loading