Add markers to image similar to what the mapping apps do - Xamarin.Forms - image

I am currently using Xamarin.Forms and I would like to import an image and be able to add markers to it. Similar to what the mapping apps do, but want to be able to do it from an uploaded image or from taking a photo. I would also Like to be able to set a scale on it after the image was uploaded by placing two or more markers and then entering a measurement between those markers.
When displaying an image/photo I would like to place markers on them that would have more info about the pinned location on the image. These pins must be saved in a database so that the next time it's opened the markers will be in the correct location as they were placed the first time.
If anyone knows how I can get started on this, or know of any libraries that allow you to this, it would really be appreciated.
.
Update
Loading the image from file, camera or url is simple enough.
Zooming in and out after the image is loaded was simple enough too. Altering the scale size of the Image by making use of the PinchGesture.
Moving the image around ended up being simple too, and it was achieved by using the PanGesture and altering the TranslationX and TranslationY.
.
.......Still searching for a working and reliable solution for adding Pins/Markers at a location on the image and the markers need to have a click or tap event attached to it.

Related

Win32 display image white windows issue

I would like to show a few small sized images and a background on one of the screens in my application. What are the best practices to do it and avoid to see white windows before the images get drawn? Should I load all images in the beginning and keep them in memory, and then draw them when it's necessary? Or perhaps there are other ways to solve this issue?
Try this:
$('#loader_img').show();
$('#main_img').on('load', function(){
$('#loader_img').hide();
});
load event get executed when image finishes loading till then you can show loader image.
And instead of asking a question without try, you better try first and share the problem you are facing

Check if an image contains another image

Im trying to check if a screenshot contains an image that is saved in the project resources, I need to find a 100% match only and would like to not use any extra libraries, now with that being said, I have no idea how to do so.
heres a few questions:,
do I compare the two buffered images together? do I change them into something else?
Il have to compare it atleast once a second or so. (just as general information)
I have a resource folder under my project in eclipse and the .png files are shown as text, is there a way to change that? I tried tinkering with the settings, no luck yet.
public static BufferedImage screenshot(){
BufferedImage capture = robot.createScreenCapture(screenSize);
return capture;
}
this is my screenshot, another bufferedimage is for example "compare", where the size of the compared image is smaller than the screenshot. how will I be able to check if the image contain the second image?
*For those who wondering, im trying to make a simple program that clicks a certain image once it pops up.

KineticJS shape over image

I want to draw some shapes over an image.
After the image is loaded and added to the layer, I use the moveToBottom() function, which works for shapes but doesn't seem to work with images.
I've tried to use moveToTop() on the shapes, but still no luck.
Important note: I have to keep them on the same layer, so the obvious solution to put the image in another layer is not an option.
http://jsfiddle.net/hukNL/
This concept shows that layering functions work, so the error is somewhere else in your code.
First of all, you want to be using the newest KineticJS 4.3.1, then you want to make sure that if you are dragging images that you disable putting them in the dragOnTop layer that is now featured in the newer releases. Lastly, if nothing else works, then you could manually debug your code by checking the z-index of each item by using:
.getZIndex()
Also, if you would like more help, post some code so others can help you debug it.

Disable to download image from canvas

I added image to canvas element, but visitor than can save that image to local comp.
Is there any way to disable that option? I don't know, putting some transparent image over?
Thx
So i thought this can help you just disable rightclicks:
$('#canvas').bind("contextmenu",function(e){
return false;
});
None of this (not even image slicing) stops a user from simply copying the screen on to the clipboard and pasting it into MSpaint or any other image utility, and saving the result. Its trivial to do; And a transparency image is no impediment to this.
The only effective options that I know of are (as was said), watermarking or low quality.
*Avoid 1 pixel wide lines or dot watermarks that can be removed easily with a Photoshop filter.
~If its commercial... You could have a pay-wall, and steganographically embed the purchaser's name and or information into the image (or preview), such that if it does get used without permission, at least you know who did it.
Basicly: if your image is loaded by the Browser you can never protect the user to download it, because if the browser knows where to find the image, the user can find this out as well. So all this download protection only works for users not familiar with computers and the internet and nowadays i think most people are able to download such an image if they really want to.
If you want to prevent users to use your images for their work, you can use images with watermarks or in a lower resolution otherwise can you tell what reason do you have to prevent users from downloading?
I found this question in review of an HTML5 captcha alternative I'm developing. My goal is not to "prevent" users from downloading the image as much as blocking OCR on the image capture. To prevent it, I added a onclick event to the canvas object that resets the canvas element on click. The user can "download" it, but it no longer is the original code presented.

How to add a colored filter effect on an image?

I am building an Eclipse RCP application, based on eclipse 3.5.
I'd like to modify an image at runtime. The image is loaded and will be used as an icon, but depending on the situation, I'd like to add a filter on the image to give it a red or orange color, depending on some user-configured value.
It's the image transformation that I'm interested in. I already know how to get the image and ask a component to display it.
Has anybody done that? Thanks for your help :)
There are possibly many choices for doing just that, you can use ImageIO to load an image as BufferedImage and then get the Graphics2D and modify it as you wish. When you are finished modifying you can reaasign the newly created image back into your component which holds the original image and thats it.
You can of course look for some libraries to allow you easier image manipulation, maybe jmagick or something similar.
You can use DecoratingLabelProvider with a suitable ILabelDecorator. See also FAQ What is a label decorator?

Resources