I know how to rotate the picture but i want to flip it, e.g. a if someone is looking to the left, I dont want to have to load another picture for him to look to the right ?
help Corona !
thanks
You can use Scale to flip object
object.xScale = -1 to flip right,left or
object.yScale = -1 to flip up,down
Related
How could I invert a Texture created from an image (I mean display the mirror image), if I have for example a kid rising his left hand I'll get a kid rising his right hand. Thank you.
I found the solution
aSprite.flipX = YES;
Is there a way to use the overlays in the UIImagePickerController to show the square picture a user might use, while having a toggle button in there somewhere to switch on the fly?
Currently the iOS 7 camera has this capability, but UIImagePickerController does not (thanks Apple), so is there a way to add this functionality?
Would using AVCaptureSession be necessary? It seems like serious overkill, and I'd have to program flash/focus/etc all over again, I think.
Failing that, is there a customizable class that already exists that I could just implement?
I'm banging my head against the wall trying to figure out the best course of action here, so any help would be appreciated.
You can adjust the camera view by transforming the scale
CGAffineTransform transform = CGAffineTransformMakeScale(1.0, 0.5);
imagePickerController.cameraViewTransform = transform;
with the arguments being the scale to change the x and y axis of the camera screen by. You could add a button that re-presents the camera view within the view controller at the top of your hierarchy. It may not perfectly recapitulate the native phone app, but it will be a pretty good approximation.
I would probably do this with a custom cameraOverlayView that letterboxes the viewfinder. Once the picture has been taken you'll have to crop the resulting image.
I have a situation where I want an animation that look like image is coming/pop out from the object or another image having a circle. I know how to make image that coming out of rect but here I have a circle. Situation is like, someone pops out of window or say chick/bird coming out of egg.
Any help or suggestion or direction would be highly appreciable.
Thanks.
Edit: Here I attach the image, egg is background, when I tap/touch a egg, boy coming out of the egg with animations.
You should have three different images for the above example:
One for the back (inside) of the egg
One for the guy coming out of the egg
One for the front (outside) of the egg
Then you would put all three images in that order (bottom to top) so that the part of the guy that is behind the third image is hidden. Then you simple animate the position of the guy image up to make it look like he is popping out of the egg.
When I am working with uiimageview, I want to rotate it with a small angle, and I did. But, in the border of uiimageview after rotating appears spikes, like a saw. I do not know why and try to fix it but I cant. Please help me.
Couple of options..
1) If you are using Core Graphics functions to rotate you can enable anti alias options
CGContextSetAllowsAntialiasing(context, true);
CGContextSetShouldAntialias(context, true);
2) Add a 1 pixel transparent border to the your image on all 4 sides.
One more thing, there is a technical term to the spikes you saw and it is aliasing. And the techniques to prevent aliasing are called anti aliasing techniques. Hope this helps.
Thanks all you guys :) My friend showed me another way to fix it. I think this way is better than using transparent border trick. He changed an attribute in info plist file, that is "Renders with edge antialisasing", to YES. And everything becomes okay :). I hope it will help someone get a same prob with me :)
Take a UIView as subView and Place UIImageView on subView.
Keep the size of subView and UIImageView Same.
Now, Use "UIViewAnimationTransitionFlipFromRight" or "UIViewAnimationTransitionFlipFromLeft" with Timer.
What you can do easily is to add a 1px transparent border around your image. So if your image is, let's say, 50x50 pixels you need to make it 52x52 such that the outer pixels are transparent. When you will rotate it should look fine now.
I need to display some images. And I want to slide out one image from one slide of the screen so the the next image is displayed.
Is it possible to have such an animation?
thanks
It's probably not useful to you yet, but device software 5 has features for doing just that.
(PictureScrollField)
I can do it with a timer which can keep on feeding new values to the x or y coordinates of the bitmap. That way we show it moving horizontally, vertically or diagonally.
Any more ideas??