Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@AlsoSomeoneElse
Copy link
Collaborator

This PR adds tools to flip the image horizontally/vertically to the image editor

@AlsoSomeoneElse AlsoSomeoneElse added the new feature Used to mark PRs that add new feature(s) label Nov 4, 2025
@Override public void mouseDragged(MouseEvent e) {
}

public void flipImage(BufferedImage image) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of manually processing pixels, you could use negative size to flip it:

g2d.setComposite(AlphaComposite.Clear);
g2d.fillRect(minX, minY, width, height);
g2d.setComposite(AlphaComposite.SrcOver);
g2d.drawImage(image.getSubimage(minX, minY, width, height), minX + width, minY, -width, height, null);

(untested code, just a concept)

It may also make sense to put the whole processing in the process method itself looking at how other tools are coded

@KlemenDEV KlemenDEV marked this pull request as draft November 4, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature Used to mark PRs that add new feature(s)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants