How to save my UI or layout Screen as image with high resolution in android - android-imageview

I want to do image masking in android and want to save the masked image with a higher resolution.
I am new to android so please I would appreciate if I can have a detailed procedure.

You can covert bitmap in .png file and save it to phone memory/SD card.
Let you have HDPI phone 480*800 you can not save image(Layout) higher than 480*800 without loosing its quality.
You can change size(scaling) let 1200*1600 but you will lose quality.
You can not increase resolution. However you can decrease it.

Related

Diffrent results for the image and screenshot of the image

I am using an object localizer with react native image picker to get coordinates of objects within an image. When I send the image by taking a photo with the android device the results I get are not accurate but when I take the screenshot of the photo and send it the results are almost perfect. Why might this be the case and how can I fix it?
The interesting thing is when I use the android studio emulator and send photos without taking screenshots of them the results are correct too. I have read that there are recommended image sizes for these operations however I could not find one for the object localizer.
Edit: I have found that when I take a screen shot the image resolution is equal to my devices width and height however when I take photo it uses cameras resolution.To give an example right now when I take a photo its resolution is 4032x2268 and resolution of said images screen shot is 1080x2220 which is the resolution I use for my android device.İs there any way to set cameras resolution to same as devices resolution?

Icon or image (PNG), which is the most performative?

I'm working on a project that involves displaying a map (https://github.com/react-native-community/react-native-maps) and there are 34 possible types of picture pins (PNG) and I'd like to know which becomes more performative. Keep using these images or adopt the use of icons? Taking into account that the images have on average 10Kb
For those who do not know, converting to SVG can turn into an icon (https://github.com/oblador/react-native-vector-icons)

Windows Phone 8.1 app always scales images

I have converted one of my Windows Store applications to a universal application and added a Windows Phone project to it.
When rendering the graphics (Image and Rectangles with ImageBrushes) the graphics always gets scaled even if I set it to not scale which is not how expect it to work.
Example:
I have an image that is named test.scale-100.png which is 27*27 pixles.
The same image exists as a 32*32 pixel sized image named test.scale-140.png and another named test.scale-240.png which is 59*59 pixles
I use this image in my default layout the following way:
<Image x:Name="imgTest" Source="/Assets/test.png" Stretch="None"/>
When I start my app with the Windows Phone 8.1 WVGA 4 inch emulator the 32*32 image is shown with the correct bounds, but the actual image is scaled (I can see that quite simple because the content gets blurred).
The same happens when I start the app with the Windows Phone 8.1 1080p 6inch emulator; The image is 59*59 pixles but the image is a bit blurred.
How can I force scaling to not be performed?
Thanks in advance for any help!
I am not sure. I am looking for a solution right now too. But I found that scaling is not supported in Windows Phone 8.1. Only Windows Store apps are working with scaling. Take a look at link below.
http://msdn.microsoft.com/en-us/library/windows/apps/dn263244.aspx
So, the way how to scale images is to use height/width propreties to force size of image or you can use BitmapImage and its property DecodePixelHeight/DecodePixelWidth together with Height/Width properties to decode the image.
Hope it helps ;)
I have the same issue, I think this is an OS bug:
Test 1
test.scale-100.png +
test.scale-140.png +
test.scale-240.png
= Blurry result
Test 2
test.scale-240.png
= Blurry result, again
Test 3
test.scale-240.png renamed to test.png
= Sharp result!
The problem occurs only with certain assets, not all. In my case only in some DataTemplates. I think that in some situations the system scale the image incorrectly, with an horrible blurry result. If you leave only the "scale-240" image, it is blurry. If you rename it removing "scale-240", it becomes sharp!
In summary, name the image as test.png and stop.
As MSDN says:
Don't use images that aren't sized to multiples of 5px. Units that aren't multiples of 5px can experience pixel shifting when scaled to 140%, 180%, and 240%.
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh465362.aspx
Your Width="53" Height="53" could be the issue of incorrect behavior

Managing resources in a universal ios app

I am developing a cocos2d game. I need to make it universal. Problem is that I want to use minimun amount of images to keep the universal binary as small as possible. Is there any possibility that I can use same images I am using for iphone, retina and iPad somehow? If yes, how can I do that? What image size and quality should it be? Any suggestion?
Thanks and Best regards
As for suggestions: provide HD resolution images for Retina devices and iPad, provide SD resolution images for non-Retina devices. Don't think about an all-in-one solution - there isn't one that's acceptable.
Don't upscale SD images to HD resolution on Retina devices or iPad. It won't look any better.
Don't downscale HD images for non-Retina devices. Your textures will still use 4x the memory on devices that have half or even a quarter of the memory available. In addition, downscaling images is bad for performance because it has to be done by the CPU on older devices. While you could downscale the image and save the downscaled texture, it adds a lot more complexity to your code and will increase the loading time.
There's not a single right answer to this question. One way to do it is to create images that are larger than you need and then scale them down. If the images don't have a lot of fine detail, that should work pretty well. As an example, this is the reason that you submit a 512x512 pixel image of your app icon along with your app to the App Store. Apple never displays the image at that size, but uses it to create a variety of smaller sizes for display in the App Store.
Another approach is to use vector images, which you can draw perfectly at any size that you need. Unfortunately, the only vector format that I can think of that's supported in iOS is PDF.

Android DDMS screen capture, changing the size of image

When i am capturing the screen shot using DDMS, the default image dimention is 480*200. Can we change this dimention?
i want the captured image in small size (dimention).
I know i can do it later with any photo editor. but i need to take several screen shots and changing each captured image will be an extra overhead for me, so looking for some direct solution.
Thanks.
While possibly not the answer you are looking for, you could capture them all in the default size and then use a batch image resizer like Irfanview (if you are in Windows) to resize everything on one shot.