Flip in image in JavaFX
Hi,
I'm new to JavaFX (but have 7 years of experience in Java and J2EE). I'm trying to flip an image horizontally. I don't mean rotate but flip like a mirror. For example:
Should turn into:
Thanks
Stage
title: "Demo"
width: 500
height: 500
scene: Scene
content:
ImageView
x: 10, y: 10
image: Image
url: "{__DIR__}people.png"
width: 120, preserveRatio: true
ImageView
x: 10, y: 150
image: Image
url: "{__DIR__}people.png"
width: 120, preserveRatio: true
scaleX: -1
ImageView
x: 160, y: 10
image: Image
url: "{__DIR__}people.png"
width: 120, preserveRatio: true
scaleY: -1
ImageView
x: 160, y: 150
image: Image
url: "{__DIR__}people.png"
width: 120, preserveRatio: true
scaleX: -1
scaleY: -1
}Edited by: PhiLho on Apr 11, 2009 11:55 AM
Similar Messages
-
I have an envy all in one, how do i flip the image to print on a transfer.
Trying to print on a t-shirt transfer and i need to flip the image. I don't seem to find the right setting.
Hi,
Normally you can flip from application(s) before send to the printer. Please also check this:
http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&dlc=en&docname=bpu02032&lc=en&product=61561
Regards.
BH
**Click the KUDOS thumb up on the left to say 'Thanks'**
Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem. -
Update image in JavaFX Applet with JavaScript
Need help!
Is'it posible to reload/update/change image in JavaFX Appet Image object via javascript?
Thanx.Yes, it is possible.
Not directly, but JS can call functions in JavaFX, like it can in plain Java. -
Why can you flip an image in Photoshop, but not Cmera RAW, or can you? (CS5)
Doesn't look like you can. I'm just a user, so I don't know why. It can be done in Lightroom if that's any consolation.
-
Stupid Question - How do you flip an image or footage in Motion?
I've been searching for the last 10mins but can't find any info on how to do this. I'd just like to flip an image horizontally - where is the flip command?
Any help would be much appreciated.
CheersOr twirl open the Rotation parameter and adjust the Y rotation by 180 degrees.
Andy
PS: If you're going for upside down, then substitute the X rotation.
Message was edited by: Andy Neil -
Can someone please explain how to load images in JavaFX? Or point me to a tutorial?
All the answers I've seen use the __DIR__/imagename.ext to get the image. However, I have a decent sized project and do not want all my images in the same package.
src/package/FXClass
src/resources/images/imagename.ext
Please, what do I do to load 'imagename.ext' in the JavaFX class 'FXClass'?
Thanks.__DIR__ is a URL. It could be an http:, jar: or a file: URL. If it's a jar: URL, then it's going to be something like:
jar:file:/my/project/path/dist/myproject.jar!/java/mainYou can use the java String API or java URL API to make a new URL of jar:file:/my/project/path/dist/myproject.jar!/java and set your ROOT variable to that.
This code from the media browser tutorial (from Constants.fx) does something similar. Notice the javafx.application.codebase property. When you run the tutorial from javafx.com, the codebase is http://javafx.com/docs/tutorials/mediabrowser/dist/ and all of the sample thumbnails and images are in thumbs and images directory (respectively).
* When running as an application or launcing in the browser from NetBeans,
* the sample images and thumbnails can be loaded from the jar file. But when
* deploying as an applet, putting all of these images in the jar file
* would bloat the jar file unnecessarily. In the applet case the images
* should be loaded from a server.
* <p>
* When running in the browser, the javafx.application.codebase property will
* be set to the applet's codebase URL. For the Media Browser tutorial, the
* sample images and thumbs are stored in directories rooted at this URL.
* The javafx.application.codebase property can be used, therefore, to locate
* the sample images and thumbnails.
package def CODEBASE : String = {
var codebase = FX.getProperty("javafx.application.codebase");
// If we don't have a codebase defined, or codebase starts with "file:",
// assume we're running locally and load images from the jar.
if ( codebase == "" or codebase.startsWith("file:") ) {
codebase = __DIR__
codebase
} -
How do you flip (mirror image) a photo for transfer?
How do you flip (mirror image) a photo in I Photo for transfer--such a a tee shirt or card?
You don't in iPhoto. You can do it in Preview - it's called Flip Horizontally.
-
please tell me how can I flip the image, stored into the BufferedImage object.
thanks,
dharmendraI think a scaling ( AffineTransorm.scale) with negative values will invert the x-y axes.
-
Horizontally Flip The Image in the Canvas
Hello and Happy belated Holidays!
Do you guys know how to horizontally flip the image in the Canvas Window? I tried to 'Free Rotate' but that didn't do the trick.
Thanx
MikeVideo filters>Perspective>Flop
x -
My phone gyro stopped working. How do I flip an image from vertical to horizontal?
Hey Bill Seiden,
Thanks for the question. I understand you are experiencing issues with the orientation of your iPhone. Let's check to make sure orientation lock is not enabled, you can do so from the Control Center:
Lock the screen in portrait orientation - Control Center
http://support.apple.com/kb/TI152#TI152
Lock the screen in portrait orientation.
Swipe up from the bottom edge of any screen to reveal Control Center.
Tap to lock the screen in portrait orientation.
Thanks,
Matt M. -
Is there a way to flip an image?
Is there a method of some class that will return a mirror image of an image that I want? This would save a great deal of space in a game I'm working on, and I would appreciate any help you can give!
Here is an example I found in a book.
public class ImageCropFlip extends Applet
Image im;
public void init()
im = getImage(getDocumentBase(),"someImage.jpg");
public void paint(Graphics g)
if(g.drawImage(im,0,0,this)
int width = im.getWidth(this);
int height = im.getHeight(this);
g.drawImage(im, width, height +10,0,2*height -40,
0,0,width, height -50,this);
}it crops and flips the image, I'm not sure which part does the crop and which does the flip, and I don't have time to figure it out just now, but I'm sure you won't have too much trouble with it. -
How would I flip an image either horizontally or vertically?
I know I can rotate an image within Aperture clockwise or anticlockwise, but is there a way of flipping an image either horizontally or vertically? I was practicing with light painting and wrote something which I now need to flip so it reads more natural.
SYes. You have to enable the "flip" brick which is not enabled by default.
Above the histogram click the little "+" drop down box and choose 'flip'. You can flip horizontally or vertically. -
With the latest iPhoto software is it possible to 'flip' an image or as some say 'mirror image' a photo, meaning to change it from left to right to right to left, or vice-versa.
thanksNo - but with preview (included on your Mac) you can and you can set Preview as the external editor for iPhoto - so I guess you can with the latest or any version of iPhoto
LN -
Hi. How can I flip and image in FCPX?
What I mean is, flip it....for example the person is on the right side of the frame but I want to flip the image so they are on the left side of the frame
I thought I went through all the options but could not find such a thing
Thnak you!Select clip in timeline. Open effects. At the bottom, search for flip. This should find the "Flipped" effect. Drag that effect cover the clip.
-
How to flip an image around center and then copy the bitmap data to another image??
Hi,
in Preview use the menu - -
Tools > flip horizontal
Vertical
Maybe you are looking for
-
Can I add multiple Apple ID to my account for face time
I'm trying to set up iPod touches that my 2 daughters received as Christmas presents. I would like to add multiple Apple ID to my apple account so they can use the face time features. How do I do this?
-
Having a problem with character styles in indesign
I'm having another problem with my style sheets in indesign, I've now got an awful lot of styles in paragraph and character styles. I've created different styles for paragraph justified text and when I go to my style in paragraph styles to use tight
-
Different font sizes in Explorer and Safari
Hi there, before I go completely nuts can someone give me a hand with figuring out how I can get my plain old body text to display at the same size in both Explorer and Safari. I am using a Mac myself, but when entering text at size 1, it is displayi
-
Sandbox error, crossdomain loading Images dynamically
Hi! I have a following image: <mx:Image id="listakuva1" source="images/autoListasivu.jpg" complete="handleImageComplete(event)" /> And because I have to scroll the image, I have to turn the smoothing on when complete: private function handleImageComp
-
I have a project that I am porting from WL5.1 to WL6. It was working fine in WL5.1 but cannot get it working in WL6. So, I went back to the HelloWorld example to see if I could get it working. The problem I am having is basically getting applet to ta