473,426 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,426 software developers and data experts.

How do you flip an image?

Hello,

I've been working on a simple Java platformer and I need some help with image manipulation. I'm looking for a way to flip (about the y-axis) the various player sprites I have depending on the direction of the player (left/right). I've tried a bunch of Google searches and they all seem to suggest the "AffineTransform" class but I'm really not sure how you use it. I don't just want to paint a flipped image to the screen but rather be able to generate a new "flipped image" from an existing image that I've loaded in. What I'm really looking for is a way to fill in this method body...

Expand|Select|Wrap|Line Numbers
  1. public Image flipImage(Image image1){
  2. //returns image1 flipped about the y-axis
  3. }
  4.  
Any help would be greatly appreciated!

Thanks for reading!
Aug 21 '10 #1
0 1074

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: 1 | last post by:
hi there i need a site where the client can upload an image every week, with a caption, (so pref use the php upload image function to provide a web based interface) and that then automatically...
2
by: RicercatoreSbadato | last post by:
I have to flip vertically a Bitmap. Is it possible with GDI+ and C#?
0
by: Mr. A | last post by:
I'm looking for a code to flip a window, like in the Tiger - Apple OS. I though of the following algorithm but I can get it implemented right: 1. Capture the window who is about to be flipped....
0
by: topdawg147 | last post by:
Whenever I rotate/flip a tiff image, the RawFormat changes from Tiff to MemoryBitmap. ' image format is tiff. imgSomePic.RotateFlip(RotateFlipType.Rotate180FlipNone) ' now image format is...
9
by: Mark Denardo | last post by:
This is related to another post I submitted, but I'll be more precise this time. I have a web page that contains an Image webcontrol that loads its image by: Image1.ImageUrl="<username>.jpg",...
6
by: RoseW | last post by:
This is a collection of images with its own style sheet to create the hover over the thumbnail and the larger image appears. http://www4.webng.com/chesleyhs/images/planting/Planting.html Narrow...
6
by: Francesco Moi | last post by:
Hi. I'd like to flip horizontally an image with JavaScript. Is it possible? Thank you very much.
2
by: as | last post by:
Hi folks, am a newbie in C++ world. Normally I use matlab more often. But right now I want to create a Rising Edge D Flip-Flop model which has two Digital inputs, i.e. INPUTDATA and a CLOCK. The...
5
by: Michael | last post by:
Hello all, how could I rotate a server side image in asp.net and show it in web page? Thanks.
6
by: shailendrab | last post by:
Hi, I have been trying to flip an image vertically before saving in disk in AVI format. I really dont know why i need to flip it first before saving, any idea? To do this currently i am...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.