Background images rendering problems on wp7 - image

In my WP7 app i'm having problems with background images rendering badly. It looks like the images are rendered using 8-bit colors, and in general looks ugly. They're .png. Heres a screenshot of how it looks in the app:
screenshot
Does anyone know what causes this and how it can be fixed?

Have you tried to enabled 32bit colour?
To do this, open up your WMAppManifest.xml and in the App element add BitsPerPixel="32"
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2009/deployment" AppPlatformVersion="7.1">
<App BitsPerPixel="32" xmlns="" ProductID="{25aef417-
Not sure if this will resolve the issue, but the fact your using a .png image and only having 16bit colour could be related.

DO NOT "enable 32 bit color". Many devices have only 16 bit LCD, so they'll still have the issues - you'll just not know about them.
If you really need smooth gradients, use predithered backgrounds, eg. http://nerdplusart.com/photoshop-action-for-windows-phone-7-dithering However it's still not flowing with the of Windows Phone.
The true solution is to change your design to solid, primary colors. This is the choice user have made buying WP device and you should respect it.

Related

Are specific PNG compression types incompatible with macOS Cocoa apps?

We’ve had a recent issue with some asset images, where the Retina #2x version was being used on non-Retina devices. The Retina and non-Retina versions of the assets exist. We’ve tracked the problem down to compression, so we’re able avoid it for now, but if anyone has additional insights, I’d love to hear them.
The icons on the left show how they’re rendering inside the running app. The Retina assets are being used on a non-Retina screen, so they’re being scaled down to 50%, which is causing some blurry edges.
The icons on the right are the original assets.
This is only happening to some assets. Most of the app is okay. We’ve been using ImageOptim to compress the PNGs used in the app. ImageOptim is using a variety of compression combinations for the assets. These are the common best results:
PNGOUT
PNGOUT+AdvPNG
PNGOUT+Zopfli
AdvPNG+Zopfli
The assets that have problems all seem to be using PNGOUT+Zopfli, but not all assets with PNGOUT+Zopfli are bad. I am not 100% confident with this diagnosis though.
Given that the issue isn’t always easy to spot, and given I don’t know exactly what’s wrong, we’ve unfortunately decided to not compress our new PNGs used in Mac apps. This is a shame, because the space savings are good.
We’ve tried a few different Xcode project settings, including turning Combine High Resolution Artwork on and off.
I’d like some answers, but I am also posting here so there’s some information that may help others with this issue, even if I only have a partial solution.
Have you seen this issue before?
If you have seen it, do you have a solution?
By default, NSImage representations are chosen using color type and resolution [1]. In case of PNG files, there are situations when a more generic color type gives a smaller file. This is what causes the mixed color types between representations.
You need to set prefersColorMatch to NO. There are User Defined Runtime Attributes to do it without leaving Interface Builder. This will fix the issue.
How to set prefersColorMatch in Interface Builder
More information about the bug can be found here:
OS X doesn't like mixed types of PNGs.
Retina version of an image always used on non-retina display
It looks like there is no solution, except to force the same color_type for the PNG pairs.

WinJs: Ignore Font scaling from Windows

I've developed a WinJs app for the Surface pro 4. The app Runs in fullscreen and is layoutet with the screen resolution of 2736x1824 (surface resolution).
Now when i start the App on the surface the DPI scaling comes into play and messes up my Layout.
Is there a way to disable the scaling for the app?
I've tried:
Windows.UI.ViewManagement.ApplicationViewScaling.trySetDisableLayoutScaling(true);
but that doesn't seem to work.
Actually, making your app layout only for one resolution, especially for such a big resolution is not really great idea since the app can run on device with, for example 1920x1080 resolution where even with DPI scaling disabled your layout will be messed up.
So I recommend making the app layout responsive so it will look right on every resolution.
Not sure if you're still looking at this issue but I've found that the code that you see all over the place is actually XBox only (Link To Docs)
And the Microsoft Devs have been saying for a while that it's a user based setting and they don't plan on allowing you to ds(Forum Link)
You can detect the scaling value though with ResolutionScale (docsLink)
Windows.Graphics.Display.DisplayInformation.getForCurrentView().resolutionScale
Here's a link to a sample that detects it and adjusts.
So what you can do (and what I did) was where needed I used css scale to adjust the system to fit. Most of my app is responsive so it didn't matter, but if you use an iFrame and set it to be 1000px wide with this scale factor it will actually be 1400px or even 1800px wide and totally cut off..
I have listeners setup for the resize events and just adjust as needed.
Hope that helps!
-Dennis

Photoshop png background shows layered in iPhone simulator

I created a gradient png in Photoshop CS6 which looks perfect on my windows box.
[I have mac as remote box so photo-editing is time-costly option on that box]
However as I put it on my development mac, I see so many layers unseen before.
It doesn't look pixelated, but it is not good for sure.
The image looks like Saturn Rings, with layers of gradient putting the beauty at stake.
It looks ugly.
It is sized 320X640, with 326 ppi.
I also made #2x (640X960) for ratina, but with same result.
[I also tried some of already available online backgrounds, but they all look same. Eventually, I want my own background as it has logo and everything placed as I wish]
What do I do?
(I have tried XCode IB View modes options (redraw, aspect fit etc. the whole list) already - and I am directly setting it in IB and from then on itself its ugly, so please do not ask how am I invoking it in XCode. Its equally ugly on mac Core Image Fun House software preview as well.)

Ice Cream Sandwich; android:windowBackground behavior

I'm testing out my application for Android 2.2 on ICS. It work with ICS, but I have a weird problem.
I use a custom theme in my application, and I am using the android:windowBackground property to set a background image. It shows up nicely on Android 2.2-2.3 devices, but on ICS it adds some sort of weird white blending glow effect. It only happens if I set the android:windowBackground property.
This is the content of the windowBackground layout I use;
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="#drawable/tv_big"
android:tileMode="disabled"
android:gravity="center|top" />
If I do not set the android:windowBackground the problem is gone, and my application renders fine. I can't take a screenshot of the problem, because on screenshots the effect is not visible.
Has anyone encountered this problem? If so, what did you do?
Have you tested in other devices?
Maybe,an emulator with lower or higher dpi ?
If it does not show on ScreenShot,it is probably something with the Screen.

iphone 4 - Application doesn't show image?

I've had this app on app store with no problem until iphone 4 came out.
My home page has an image covering the whole screen.
UIImageView added in interface builder, and image path added in interface builder.
In all phones this image shows up; however, the image does not show up in any iphone 4, and instead the user sees a blank screen like the following:
Anybody knows what's causing this? thanks
.
I only have 1 set of images with
normal resolution
This problem only happens to one of
the images in my application which is
the background for my home page
the graphic file should not be
corrupted because the exact same
image works for all other iphones and
itouches
my image is a jpg file
image size is 480x270, which in
interface builder i make it 563x330 to display only a part of it
I have no outlet to this uiimageview
so it cannot be changed in code
With devices with the new retina display, pixel sizes are different and you have to check for the following, in particular:
Do you provide two alternatives of the image, one at old resolution, one at double resolution (named myimage.png and myimage#2x.png)
If not, does your image scale up well in size with CoreGraphics's algorithms (there are some pathological cases, though you'd have to be quite unlucky)?
Have you checked what happens (at both resolutions) when your UIImageView size changes?
Is it just one image, or all?
Is your graphics file corrupted?
It's hard to tell if it's any of these points, or something else, because you provide so damn little detail, that I stick to generic things. Comment below (or edit your question) if you need more help.
I've got two things to add to FXs thorough answer:
Considering the information you added, I would take a look at your code for setting up that UIImageView. Perhaps you use some sort of detection code or something which wasn't implemented correctly.
Would you mind sharing some code snippets?
According to Apple's documentation, you don't need to provide the ".png" extension as of iOS 4. Perhaps that is causing the problem.
Again, code snippets would help here. Specifically where you deal with loading up your image file.
EDIT:
Try re-saving the image and replacing it. I've occasionally corrupted files in Photoshop. This has to do with file extensions and how Mac OS ignores them, but Photoshop still uses them.
Also, it could have to do with where the image is in your XCode project. Check what Group it is in. Make sure everything is in place and then Clean and Rebuild. Remove the app from the iPhone4 (reboot) and try reinstalling.
I hope this helps.
Good luck!
If this was my code, I'd write a tiny app just to display the image in question. If it still fails it would be easier to get help debugging the problem.

Resources