문제

I've got someone creating images (PNGs) for my Android application and they look great on the computer. As soon as I load them up on my device, it appears they're being reduced to a lower color-depth since my gradients end up having distinct color bands. I have placed the images in drawable-nodpi, and I have tried raw as well, but the image quality is always lost. I've also tried the Bitmap.Config.ARGB_8888 option as recommended through my searching. Still nothing. Even when I have him save as 16-bit color I get the same results. Only until he saves as 8-bit does it look exactly as on my computer, but then my graphics are rather lacking. I can't imagine I'm forced to use 8-bit graphics. How do I get the best possible graphics in my application?

Thanks!

도움이 되었습니까?

해결책

I finally figured out the magic words to search for and found the answer at:

Gradient appears banded in a SurfaceView, but looks very smooth in a normal View

I merely had to call

surfaceHolder_.setFormat(PixelFormat.RGBA_8888);

다른 팁

Enable dithering. Say you have a Paint paint:

paint.setDither(true);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top