image-rotation

Positioning image on Google Maps with rotate / scale / translate

眉间皱痕 提交于 2019-12-09 12:22:42
问题 I'm developing a user-interface for positioning an image on a google map. I started from : http://overlay-tiler.googlecode.com/svn/trunk/upload.html which is pretty close to what I want. But instead of 3 contact points I want a rotate tool, a scale tool and a translate tool (the later exists). I tried to add a rotate tool but it doesn't work as I expected : I put a dot on the left bottom corner that control the rotation (around the center of the image). The mouse drag the control dot and I

Image mask over Nivo Slider

自古美人都是妖i 提交于 2019-12-08 08:43:32
问题 I'm using Nivo slider, but want to place a PNG image over the slider so it only shows through the parts that are transparent. What would be the best way to do this using JavaScript or CSS? 回答1: Change the demo using the code below to see how this can be done. There are a lot of ways to do this so you should figure out what works best for your situation. The code below wraps the slider and another relatively placed image inside of the same div. A bit of CSS is used to position the the image

Android image transformation with matrix, translate touch coordinates back

丶灬走出姿态 提交于 2019-12-08 06:45:19
问题 I'm building a "navigation type" app for android. For the navigation part I'm building an Activity where the user can move and zoom the map (which is a bitmap) using touch events, and also the map rotate around the center of the screen using the compass. I'm using Matrix to scale, transpose and rotate the image, and than I draw it to the canvas. Here is the code called on loading of the view, to center the image in the screen: image = new Matrix(); image.setScale(zoom, zoom); image_center =

rotating objects in opengl

天大地大妈咪最大 提交于 2019-12-08 05:28:34
问题 I need to rotate the scene in an axis when I press a key. Here's how I implemented it int rotateFlag; void rotateScene(int x){ if(x)//rotate 45 deg on x axis glRotatef(45,1,0,0); else // roatate 45 deg on y axis glRotatef(45,0,1,0); } //this is the function I call in glutDisplayFunc void drawScene(void){ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); //I'm looking at the origin (center of my scene) gluLookAt (x, y, z, 0,0,0, 0.0, 1.0, 0.0);

Image effects with rotation and pinch to zoom using GLSurfaceView Android

此生再无相见时 提交于 2019-12-07 01:24:54
问题 I was developing an application to apply effects/rotation/pinch to zoom in-out functionality on image. I have downloaded demo application from https://github.com/Grishu/ImageEffects. It works well, now my problems/questions are as below: Apply multiple effects on images with progress change value (e.g. First apply brightness effect and result of this apply another effect say "contrast".) - problem: in code effect always apply on original image. So change in code to apply effect on final image

rotate dial in limited degrees

六眼飞鱼酱① 提交于 2019-12-06 23:56:10
问题 All I want rotate image in particular angle as like below image. I have code for rotation but it rotate 360 degree but I want it only for particular degrees and get the selected number which is upper side of dial. below is my code. My custom View this work fine but lake of perfomance. import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PointF; import

image coming blurred and screwed after applying rotation on image view

狂风中的少年 提交于 2019-12-06 20:08:26
I am stuck with a strange problem that, I have a image view which has to shown at some angle approx 5 degree.For that I rotate my UIImageView to 5 degree but the image in UIImageView not coming proper as it was before transformation. For more understanding see images You can see the second image is looking like clipped from corners and looks some blur also. My code for rotation:- myimageView.transform = CGAffineTransformMakeRotation(radians(5)); Please suggest me how to solve this problem. Thanks in advance. Have you tried using CGContextRotateCTM(context, radians); and [sourceImage drawInRect

UIImageView rotation animation in the touched direction

倖福魔咒の 提交于 2019-12-06 15:18:52
问题 I have one UIImageView having an image of an arrow. When user taps on the UIView this arrow should point to the direction of the tap maintaing its position it should just change the transform. I have implemented following code. But it not working as expected. I have added a screenshot. In this screenshot when i touch the point upper left the arrow direction should be as shown.But it is not happening so. -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch=[[event

How does parameters impact on rectification process?

笑着哭i 提交于 2019-12-06 14:15:43
问题 Why does rectification work like this? Please can someone explain me it in details? How does extrinsic parameter affect rectification result? 1) I build the set of stereo cameras where I can rotate them as I want to. My input images: 2) I calibrated them using Matlab and confirmed by Kalibr method. So I assume that I know perfect intrinsic, distortion and extrinsic parameters. 3) I implemented rectification based on openCV 2.4.13 and Matlab as reference. My translation express in meters [0.13

Rotation of layout changes the co-ordinate of the motion event

邮差的信 提交于 2019-12-06 08:40:56
i am cropping a image by the help of a child relative layout and i am moving it by motion event over a parent relative layout(containing image-view to be cropped). ..but when i rotate parent layout (in which i have the image view ) by 90 deg. the behavior of motion event co-ordinate changes,and does not work(drag and zoom of child layout)properly.. please somebody tell me how to fix this..i have done some research and found about the AXIS_ORIENTATION in motionevent class but did not get any example regarding to it. thanks in advance :) 来源: https://stackoverflow.com/questions/28766334/rotation