javafx doesn't load image correctly (rotation) - javafx

javafx does not load image in the correct rotation after the image is rotated by windows rotate from explorer
reproduce:
1. select a image using windows explorer
2. click the rotate left button
3. load the image using javafx(the below code)
4. the image is loaded but not rotated
is there anything i missing?
ImageView iview = new ImageView();
Image image = new Image("/path/to/image");
iview.setImage(image);
os: windows10
java version: 1.8

JavaFX loads the image as it is. However, some images have a rotation flag in the EXIF information which tells the viewing application in which rotation the image is to be displayed. You would have to read the metadata of the image and rotate the image accordingly.
And what ItachiUchiha said, you need to save the image after rotating it.

Related

Xamarin Forms Gif Delay And Black Spots

I'm trying to use a gif as my Image Source but I have 2 problems:
The gif is starting some seconds after my application starts
After that, the animation is working but I got some black parts appearing
enter image description here
My image is placed inside the drawable folder inside the android project.

Launch Screen image doesn't display Xamarin IOS

I tried to add image in Launch screen (Logo) in storyboard but doesn't display
I Followed Xamarin documentation but no way .. when i drag and drop image and set image to image set which i added in assets nothing changed
Launch screen works fine if i change background color or something like that
Note : In story board when i try to select image view image .. it open
explorer didn't make me choose from image set
how can i solve this issue ?
If you want to use Asset catalogs in the LaunchScreen.storyboard, it is not necessary to name the Asset file as LaunchImages. Click the add button at the left top of this window, you will get an Asset file named Images. You can rename it then add three sizes of images(1x, 2x, 3x), after doing that this image can be used adapting all apple phone devices.
Then click save all button at the top window or use Ctrl + Shift + s to save this behavior. At last drag and drop down an Image view control on the LaunchScreen.storyboard, you will find this image called the Asset file's name instead of the images' original name in the image view's property window's image list.
when i follow this it works fine
https://developercommunity.visualstudio.com/content/problem/319294/xamarinios-cant-select-image-asset-for-image-view.html

constructing a bitmap from stream rotates the image

I am using ASP.Net with VB and doing some file uploads. Sometimes, when a bitmap is constructed from the file input stream, the image gets rotated. It doesn't seem to happen if the image is wider than it is tall, but also doesn't seem to happen all the time if the image is taller than wide. I have provided a few screen shots where the properties of the image are show, and the created bitmap's properties are shown at run time.
Any ideas what is happening here or what we can do to prevent this rotation?
Rotated image:
Non-rotated image:
Using the rotation code found Here fixed it. The images were coming from a phone camera and had original orientation information stored in them that could be used to right them.

JavaFX - imageview node only shows with window resize

I'm using JavaFX. When i add an imageview node to the stack pane and then run the application, I can only see the image after manually resizing the window (dragging the edge of the window with my mouse).
It will also show up if i setTranslateX or setTranslateY the image away from its original location. But if I want it to just stay there, I have to manually resize the window to see it. Has anyone encountered this? Is it a bug I just have to deal with?
Thanks

Resize image to fit window in Qt

I am using Qt to construct an application. My MainWindow consists of an image of a map which I would like to be resized to the fit the window. This means when the window gets smaller the image gets smaller and vice versa. When the user selects a point on that image I want to remove this feature. I am new to Qt and haven't been able to figure this out. I am using QGraphicsView for this.
QGraphicsView::fitInView

Resources