Forums Login/signup

Horizontal flip

+Pie Number of slices to send: Send
What's a simple way to flip an Image along the vertical or horizontal? I've searched high and low and surprised to find that I can't find something short and compact.

Thanks,
Edward.
+Pie Number of slices to send: Send
Use trigonometry to determine the correct width/height, using transparency to prevent the black area.

+Pie Number of slices to send: Send
Thanks Koilraj but I think you may have misinterpreted the question. I was looking for a way to mirror an image.
+Pie Number of slices to send: Send
Hi,

Following code contains a function that will take a BufferedImage and return a BufferedImage that is horizontally flipped:



If you are looking at vertically flipping an image, checkout the snippet below:



Hope this helps.
+Pie Number of slices to send: Send
Here is some old code I found on the web a long time ago. It works for an Icon. It should also work for an image but I have never tested it:

Hey! Wanna see my flashlight? It looks like this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders


reply
reply
This thread has been viewed 4137 times.
Similar Threads
Top Scrollbar for div element
do i have to submit all the time
how to reverse an image?
Clustering
Jython / Python Flipping the top half and bottom half horizontally
More...

All times above are in ranch (not your local) time.
The current ranch time is
Jul 28, 2025 21:44:36.
close