Panorama Background Image is Blurry - xaml

I have a Panorama image in my app and when it loads on the phone it is blurry. It's like when you remote desktop into another computer and you have the color settings way down. The gradient is made up of 6 colors and I can count them from the big blocky change.
Is there something special that needs to be done for an image to work as a Panorama background?
I've tried using a JPG and PNG version of the image and it looks the same for either.

I know this is an older post, but with Windows Phone Mango (7.5) you can now specify 32 bit by modifying your manifest.
BitsPerPixel="32"
Add that to the <App xmlns="" ProductID="" BitsPerPixel="32"/> and your images will now display in 32 bit mode. You get a lot smoother gradients and color resolution.
The startup screen still is only 16 bit, and your icons will only really display in 16 bit. But you can get nice colors in your app.

Windows Phone 7 currently renders with 16bit color depth, unlike your desktop/emulator which has a higher color depth. As a result, gradients won't look the same as they do on your desktop PC.
This thread here has some great pointers on how to optimize your images for this environment:
Is there a way to render PNG with gradients in Internet Explorer Mobile 7 correctly?

Related

xaml minimum application screen size

how can I set a minimum size in an universal app (win 10) for the application window? in my project I have only object with Page tag, not Window. I want that the screen of the application can't be resized less off a certein value.
thanks a lot
In the Package.appxmanifest of a Windows 8.1 Universal app, you could set a minimum width, to one of 3 pre-defined values. Setting minimum values on your page will not prevent your application from resizing. Setting maximum values will not prevent resizing either, but it will result in black borders when the application frame is larger than your set dimension. It's worth mentioning that 320 px is the absolute minimum width on 8.1 and on Windows 10 (for phones).
In Windows 10 UWP this property is no longer available. You should AdaptiveTriggers to handle your UI layout on Windows 10.
If you want to check the minimum resize dimensions, keep the scaling of your pc in mind. My laptop scales at 125%, a screenshot of the minimum dimension for the desktop client is 627x441 (~500x350 at 100%) including the space used for the app bar. But it's more common to just use AdaptiveTrigger and 720 pixels as the cut-off between phone and tablet.
you are working on a universal app, you shouldn't set a minimum width . It should be working on every resolution and device.
you should instead use visual state manager and adaptive triggers.
best of luck !

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

Retina graphics vs non-retina graphics management

I am about to launch a new app and would lik eto increase quality of the graphics. In my case the graphics is the logo and the custom buttons. I do not know if this impact Core Plot but that is also part of the package.
There is quite a few posts about this but there are still things i do not fully understand.
I am reading this quote from "amattn":
It's trivial:
1.Only include #2x images in your project.
2.Make sure those images have the #2x suffix.
The system will automatically downscale for non-retina devices.
The only exception is if you are doing manual, low level Core Graphics drawing.
You need to adjust the scale if so. 99.9% though, you don't have to worry about this.
From this post: Automatic resizing for 'non-retina' image versions
My question in regards to this is:
1. Should i do the testing on retina simulator only, as if i place a #2 grapic on
non-retina it will be too big? ...or is there an other way of doing it?
2. Should i always use a ImageView or is it OK to drag the image on the screen,
this is the logo i am talking about?
3. What about custom made buttons with images, how should i do with those?
4. What is the normal process to manage the different screen sizes, do people
add images for all displays or using this type of process?
Should i do the testing on retina simulator only, as if i place a #2 grapic on non-retina it will be too big? ...or is there an other
way of doing it?
It doesn't really matter which simulator you test on because as long as your non-retina and retina graphics are named correctly (image and image#2x) the correct image will be displayed automatically.
Should i always use a ImageView or is it OK to drag the image on the screen, this is the logo i am talking about?
When you drag and image from the project directly onto a view in interface builder you don't really see it happen but it has automatically created and image view which is containing the image your dropped in.
What about custom made buttons with images, how should i do with those?
[myButton setImage:[UIImage imageNamed:#"myFileName"]];
As shown in the above code you should always use the non-retina fle name when you reference the image a UI element should use. That was if iOS detects the device is retina it can automatically use the #2x version in its place.
What is the normal process to manage the different screen sizes, do people add images for all displays or using this type of process?
Yes, including multiple image resolutions common practice and is required for iPhone apps (not sure about iPad) to include both retina and non-retina images. But regardless of the requirements, you should definitely support both device resolutions to keep your customers happy!

Apple Touch Icon Turns Black

The white background in my apple touch icon turns black?? My white background isn't transparent. The icon has a white triangle, red circle and black text. The only thing I can make out is the white triangle and red circle. Any idea whats causing this and how to make the icon keep its white background?
Much appreciated.
I'm not sure exactly what it was, but I may have narrowed it down.
The first time I uploaded the images they may have had the transparent background.
The second time I uploaded them I added the white background, but the png save for devices setting still had transparency checked.
The third time I uploaded them I saved them without the transparency checked but still got the black background.
All along I think the iOS Safari browser had the first set of images stored in cache. After clearing the cache the new image showed up with no problem.
Edit: Its the transparent background that turns it black.
As gstricklind found, if your png has alpha channel transparency, iOS will unfortunately ignore any "precomposed" directive and apply all its usual effects, in adddition to giving your icon a black background (white didn't seem like a better choice??).
The solution is, of course, to precompile the icons with no transparency. This makes it pretty difficult to utilize Android's support of alpha channels while offering itouch icons as well if a black background does not work for you. I found this tool useful when composing: http://www.gieson.com/Library/projects/utilities/icon_slayer
Same issue seen here: How to get iOS to properly respect the "apple-touch-icon-precomposed" link attribute for a "web app"
Transparent Apple Touch Icons are indeed possible. What you need to do is strip all excess information from the PNG using ImageOptim for Mac https://imageoptim.com/mac or a similar program on windows. I did extensive research and stumbled on the answer by looking at the apple touch icon used by the Virtual DJ site. This icon keeps it's transparent background on iOS and MacOS Sierra. I looked at the file size and realized how small it was compared to the custom apple touch icons with transparency that I made for my favorites in Safari. Next I looked at the file information using the inspector in Mac's Preview app. All of my custom apple touch icons had four tabs in the inspector section named General, exif, PNG and TIFF. The virtual DJ icon only had two tabs named PNG and General. Once I ran my custom images through ImageOptim the file sizes plummeted by over 90% and the extra TIFF and exif tabs disappeared from the inspector in Preview. Sure enough once I reloaded my custom images and launched Safari all of my Favorites tabs have transparent backgrounds!!!! Please see attached image for proof. Transparent Apple-Touch-Icons

Using vectors in iOS

I'm working on a simple iOS game that's always drawing 5 to 10 layers of 32bit png images which requires enough memory to crash on the ipod touch 4g when retina enabled. On other devices it works just fine. I'm not even getting memory warnings. So I was trying with lower quality images, like RGB5_A1 format, but it looks really bad because I need alpha transparency and lots of gradients.
Since all the images are exports from Illustrator I was thinking that maybe i could just export a vector image and draw in on iOS. From what i was researching hardly anyone tried this and the only option I've come across was to implement a SVG parser for Quartz.
Did I miss anything?
Also I'm worried about performance, but I couldn't find any benchmarks.
Without knowing specifics of your game, I'm going to make a few assumptions based on normal use...
You are not going to want to use straight vector graphics for this. Stick with your raster graphics.
If you are talking about 32 bit color space for your PNG images, then you need to scale back. iOS uses 24 bit images and that includes 8 bits each for red, green, blue, and alpha. As it stands, you have an extra byte for every pixel shown.
If you are using Adobe products, import the Illustrator file into Photoshop and use the "Save for Web..." option. Choose PNG-24 and you'll be all set.