I have an app that uses the xam.media.plugin to take picture in a cross platform way, but I need to draw a frame over the picture visualization (picture preview).. so, this way, the user knows how to pisitioning the object inside the frame we need..
Is there a way or a cross plugin to do that? Or the logic should be placed inside the android project, so it is more flexible?
Has someone done something like that already?
Any help would be really great.
Thank you,
Related
I need to implement a custom image crop on iOS and I can't seem to be able to find a technology that will allow me to do that easily. The goal is to have an interface as follows:
The idea is to have some sort of path or something around the face that the user can "nudge" around with their finger. Is there a library for this?
I have played a bit with UIBezierPaths, but I don't see how they can be edited after being stroked.
The best that I can come up with is having the user manually draw a line around the face, but then the line wouldn't be editable.
Please help! Does anyone know of a solution for this? I am in a bind and need to provide my client with a solution.
I was asking myself how I could obtain an iOS 7 like blur/transparency effect. Something like this:
(source: ilounge.com)
I'd like to apply this to a whole QDialog. I know how to obtain a nice transparency, but not how to get this blur.
Can someone help?
Thanks a lot!
Basically, you need to first get a screenshot of the desktop. Then you need to blur it. Then probably save the image to the harddrive. Then you need to set it as the background for your dialog.
And then you need to make the background for each button transparent, too.
If you use QGraphicsView or OpenGL, the last three steps may be very different.
http://qt-project.org/doc/qt-5.0/qtgui/qscreen.html#grabWindow
http://qt-project.org/doc/qt-5.0/qtwidgets/desktop-screenshot.html
Lines of code where it actually grabs the screen:
QScreen *screen = QGuiApplication::primaryScreen();
if (screen)
originalPixmap = screen->grabWindow(0);
In Qt 4.8, it used to be done this way:
http://qt-project.org/doc/qt-5.0/qtgui/qpixmap.html#grabWindow
To blur the screenshot, use this:
http://doc-snapshot.qt-project.org/4.8/qgraphicsblureffect.html
You may need to save it to the harddrive for QStylesheets to be able to find it.
To set the background image, try something like this:
http://qt-project.org/doc/qt-5.0/qtwidgets/stylesheet-reference.html#background-image-prop
Example of how to set a stylesheet:
qApp->setStyleSheet("QLineEdit { background-color: yellow }");
http://qt-project.org/doc/qt-4.8/stylesheet-examples.html
http://qt-project.org/forums/viewthread/1397
Hope that helps.
Thanks a lot for your help phyatt, I succeeded. Although my code works, the result is not as pretty as iOS':
iOS7-like blur with Qt
however, I'm going to post the whole code on my website, I'll post the link here in a while.
Stay tuned!
[EDIT] here's the link to the detailed how-to: iOS7 like blur effect with QT
My basic task is to capture a part of an image and then use it. To give you an overview, I am creating an app based on OCR, I allow to user to take a picture using camera. However, rather than processing the entire image, I only want some part of it to be selected and send for processing (Preferably a rectangle). So, to sum it up, I want an overlay to be provided, and I want the image inside that overlay to be further used rather than the entire clicked image.
Now, by my understanding, I realize that AVFoundation is the tool to capture the image, however in my app I have used UIImagePicker. I am totally confused since I am a newbie and not sure hot to proceed ahead. Appreciate all for the help. Thanks again
There is fine open source library for OCR in iOS :
https://github.com/nolanbrown/Tesseract-iPhone-Demo
This will work best if the image resolution is 150 * 150 . For more in formation of other libraries you can also refer the SO question:OCR Lib
I am working on a Cocos2d project for iPad and iPhone, and now I need to develop something that looks too small for iPhone.
My first approach was to redesign it to make it possible to look bigger, but then I though that a region zoom effect would be great. The bad point is that I don't know how to do it... I really don't know what would be the correct/best approach to do it.
I have already checked out the Cocos2D CCLens3D build in effect, but it doesn't give me the results I want.
I would love to get the same result than when you long-press a textview/textfield on the UIKit:
Thanks in advance for your help!
If your still looking for a solution:
http://rombosblog.wordpress.com/2012/06/03/magnifierglassforcocos2d/
Uses CoreGraphics to render. Although this implementation works (requires some tweaking), I found that it lacked that Gaussian distribution effect I was looking for and was quite expensive if you updated the magnifying effect in a small interval.
I need a simple component to do image crop, to use inside an option where user must select an image, photo, or logo to represent them.
I already done some search with Google but found nothing good.
I would something with source code.
A TRect, DrawFocusRect and some handling of OnMouseDown, OnMouseMove, OnMouseUp for allowing user interaction to draw the cropping frame
and
BitBlt to do the actual cropping after the user is happy with the selection he made.
And look, there is an example which uses those same ideas: http://exampledelphi.com/delphi.php/tips-and-tricks/crop-image-with-drag-the-mouse/.
God bless!
Try ImageEn from http://www.hicomponents.com/main/. It does what you want and a lot more. It is free, but not sure if you can get source with it.