Why image has different pixel resolution in Hololens - c#

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.

Related

Drawing wide image in Xamarin.Forms Android

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!

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.

How can I control the quality of a screenshot in c#

I made a small windows form app that takes screenshots, but the final image looks a bit blurry compared to screenshots using other screenshot softwares.
I mean like the pixel density on screenshots from my app is lower than the density of screenshots from other apps.
I used this tutorial: http://www.developerfusion.com/code/4630/capture-a-screen-shot/
How can I control the pixel density or quality of the screenshots my app takes, without resizing the images?
The problem was just the image format. Probably jpeg format has lower quality than png when taking screenshot. Saving the image as png gave me a real sharp and high quality screenshot.

Compress GIF image without loosing animation

I am compressing images by reducing height and width to reduce their size and it works fine for images that don't have animation but if I do this for animated images, it will reduce the size but loose animation as well. I haven't tried anything till yet as I couldn't find any solution online. Any Idea?

Does WPF embed full size image into output?

I have a WPF application that includes buttons with PNG images. The actual images get scaled by grid control inside the button to about 32 pixels or so (depending on button size). At the same time my original artwork created in Photoshop is 250x250 pixels in size.
Currently I create artwork in Photoshop, add it to my WPF project as a resource, and have WPF automatically scale it to the button size.
Here's my question - if my original image is 250x250 pixels, and WPF squeezes it into a button so that it is only 32x32 pixels, does my output file contain the 250x250 image, or the 32x32 image?
I'm asking because if the app performance is going to be negatively affected by the original image size, I'd rather just scale it in Photoshop myself.
Yes, it will include the full file, because it can't recognize that it might not be shown larger at runtime. You can check this by decompiling your program using ILSpy.

Categories

Resources