Drawing wide image in Xamarin.Forms Android - c#

I'm having a bit of an issue getting an image (size 1.25MB, resolution 1080 height by 2520 width) to run on my android emulator. I can't figure out why resolution does this, but I'd like to preserve as much details as possible. So far I've tried:
Moving the image to different mipmap folders (no effect, image doesn't even get displayed and if drawable is say 120x480, that will be displayed, mipmaps don't work as source AT ALL for some reason).
Turning of hardware acceleration in manifest.xml (I'm assuming that's not a desired practice for release app). That works however the whole emulator gets really laggy.
Compressing image to smaller sizes. Still getting "trying to draw too large of a bitmap" error.
Any help would be appreciated!

Related

How to scale window according to screen resolution in UWP?

I am new to Stackoverflow as well as UWP (My English is regular too). I apologize in advance for my bad writing.
I am developing a windows application in UWP/C#. My monitor size is 23' and it is set to 1920x1080 (100%) resolution.
As seen in image 1, I have configured the application in such a way that the size of the main frame is 1920x1080, therefore, when I run the application on my computer it looks perfectly (see image 2).
However, when I run the application on another computer with a smaller screen size (17 "), it looks like in image 3, where it can be seen that the application does not fit this size. It seems to keep the original size and mi application "does not fit on the screen".
My question is: how do I program the application so that it does not lose its shape, distribution, aspect ratio, or proportion when it is run on screens that are different in size from the computer on which it was programmed? In this way, it automatically adjusts to the resolution and scale of the screen, without losing the original proportion and distribution with which it was programmed and designed.
Thank you very much for your help and understanding.
EDIT 1: I am not looking for the content of the application to fit a change of the window, but rather to fit screens of different sizes. That is, the same content, distribution and proportion are scaled to fit on any screen size, as evidenced in image 3 that does not happen. (see Image 4)
I don't want the image 3 to happen.
The control doing exactly what you want is called ViewBox, but as people already suggested above, it would be better to design adaptive UI using triggers or at least grids.

Unity3d game occupies huge space in a ios device

The whole image resources of my game is less than 50MB. But the installation size in iphone is 292MB(it takes up only 90MB in android). I assume there should be something wrong about textures. So I duplicate an image folder(15MB) within the Resources directory. And the new installation file size expands to 400mb. How could an increase of 15MB pictures lead to a 108MB increase in ios installation size. I have been bothered by this issue for 2 weeks. Can anyone give me any hint?

Why image has different pixel resolution in Hololens

I'm working on application, where small UI.Images are displayed with small textures 32x32 pixels. It is very important to display each pixel properly.
When I'm trying to launch the application in Unity everything is perfect - Image consists of 32x32 pixels.
While deployed to Hololens, the Image has worse quality and resolution changes to 16x16 pixels.
The question is how to obtain texture displayed in 32x32 pixels quality on Hololens device?
Ok, finally I figured it out. In Unity Edit > Project Settings > Quality the option Very Low is used for Hololens application. In this mode the Texture Quality is set to Half Res, thus the Image was rendered with half of the pixels' number (16 pixels). When changed to Full Res, the Image get original 32 pixels size.
It does not explain why in Unity Editor the Image was displayed properly, but the most important thing is that now it's working properly on the device.

Desktop icon scale to fit when zoomed

I have a problem where my icon doesn't scale to fit when I zoom in on it when it's on my desktop.
Followed by when I zoom in.
How can I make sure the image for my program scales as well?
It does scale down, but it stops scaling up after it gets to its default size.
I'm using Visual Studio and my software is done in C# WPF.
This has nothing to do with code. Your *.ico File is missing the supported images.
The *.ico icons can have different images for multiple sizes, eg. 16x16, 32x32, 48x48, 128x128, 256x256.
There is this question on SuperUser how to embed them.

losing quality when resizing with ImageResizer

I'm using the ImageResizer .net library. It works as expected, but one image messes around.
I've uploaded the image below. I've already tried some things like format=jpg&quality=100, only width=220, also different sizes, but it always adds this blurry border around the image.
The original image is a png.
This one is the original image:
This one is resized by the ImageResizer:
And this one is resized with photoshop:
EDIT:
If you're running into the same issue. Try to set up the SpeedOrQuality Plugin. I've set it to speed=3 and the image is sharp again.
Vector graphics require different resampling algorithms than photographs.
ImageResizer V4 includes higher quality image resampling options under the FastScaling plugin.
For graphics (non-photographic images), I suggest playing with &f.sharpen=0..100, &down.preserve=-5..5, and &down.filter=Robidoux. Make sure &fastscale=true and FastScaling is installed.
You can certainly find a good configuration for your rasterized vector art and set up a preset for it. FastScaling is capable of much better resampling than Photoshop - on par with Lightroom, in fact.
Enabling fastscaling alone helps substantially (?width=200&fastscale=true):
Adding sharpening gives a very clear result: (?width=220&fastscale=true&f.sharpen=100):
Visibly crisper than Photoshop:
Each time you save a jpeg, you loose quality (the image is reencoded).
I would recommend using the same quality as the original image was save against, it should give the best results.
Using a higher quality is not recommended as it will artificially try to improve quality, mistaking approximations done by previous encoding for details, resulting in things like the blurry border.
Aside that, usually, one should not use a quality over 95 for jpeg encoding.

Categories

Resources