dithering

Bitmap appearance is not looking good, dithering is not working, in Android

淺唱寂寞╮ 提交于 2021-01-28 08:12:39
问题 I want to use coverflow view in my app. To get the reflection image part i have used the following code - http://www.androidsnippets.com/create-image-with-reflection I have seen lot of forums/discussions about dithering and tileMode, I have tried all that discussed but nothing works for me. FYI - I am creating a bitmap dynamically not using any bitmap in layouts. And I have attached the image to show how bad it is: I have listed below what I have tried to solve this issue. 1. getWindow()

How to implement 24bit to 3bit ordered dither algorithm?

人盡茶涼 提交于 2020-01-25 02:50:47
问题 I am attempting to implement a Bayer ordered dithering matrix algorithm to convert a 24bit color image to a 3bit image. I have read the Wikipedia page, and several textbook sections on the topic and am a bit confused. This is what I have so far: for (int y = 0; x < image.Height; y++) { for (int x = 0; x < image.Width; x++) { Color color = image.GetPixel(x,y); color.R = color.R + bayer4x4[x % 4, y % 4]; color.G = color.G + bayer4x4[x % 4, y % 4]; color.B = color.B + bayer4x4[x % 4, y % 4];

Android view dithering

天大地大妈咪最大 提交于 2020-01-13 05:15:53
问题 As you can see from the screenshot below, the "titlebar" is getting these ugly banding lines across the areas with text that extend the entire width of the screen. It's even more noticeable on a real device. Is there any way to work around this? 回答1: From Android Developers: Widget Design Guidelines: In some cases, devices have low pixel depths that can cause visual banding and dithering issues. To solve this, application developers should pass assets through a "proxy" drawable defined as XML

Converting RGB image to Floyd-Steinberg image using PHP or Javascript for Zebra printers

痞子三分冷 提交于 2020-01-03 08:48:10
问题 I am developing a desktop based PHP application where we need to capture image of a person and print it on the label using Zebra GC420t printer The expected image should look like below image. When I try to print the it gives the output like below image. I am using the following code for the conversion of the rgb image to dithering image using php code $photo_url=""; if(isset($_GET['photo'])){ $photo_url=$_GET['photo']; } function image2grf($filename='$photo_url', $targetname = 'R:IMAGE.GRF')

c# image dithering routine that accepts an amount of dithering?

北慕城南 提交于 2019-12-31 05:34:06
问题 I've been using aforge's floyed-steinberg dithering method, but I noticed that you can't specify the amount of dithering. I'd like to be able to specify an amount between 0 and 100. So that if I ask for 50, it will dither half as much as 100. Or, if I specify 0, then the resulting image will be made of solid colors with hard edges between each color... or in other words, no dithering. I'm looking for c# code for a routine such as floyed-steinberg, or Jarvis, Judice, Ninke dithering, that

Fastest dithering / halftoning library in C

↘锁芯ラ 提交于 2019-12-22 07:27:12
问题 I'm developing a custom thin-client server that serves rendered webpages to its clients. Server is running on multicore Linux box, with Webkit providing the html rendering engine. The only problem is the fact that clients display is limited with a 4bit (16 colors) grayscale palette. I'm currently using LibGraphicsMagick to dither images (RGB->4bit grayscale), which is an apparent bottleneck in the server performance. Profiling shows that more than 70% of time is spent running GraphicsMagick

Floyd–Steinberg dithering alternatives for pixel shader

左心房为你撑大大i 提交于 2019-12-22 03:56:10
问题 I know that Floyd–Steinberg dithering algorithm can't be implemented with pixel shader, because that algorithm is strictly sequential. But maybe there exist some higly parallel dithering algorithm which by it's visual output is similar to Floyd-Steinberg algorithm ? So the question is - What are dithering algorithms which are suitable to implement on pixel shader (preferably GLSL) and with output quality (very) similar to Floyd-Steinberg dithering ? BTW. Multi-pass algorithms are allowed

Color banding only on Android 4.0+

落爺英雄遲暮 提交于 2019-12-21 03:37:06
问题 On emulators running Android 4.0 or 4.0.3, I am seeing horrible colour banding which I can't seem to get rid of. On every other Android version I have tested, gradients look smooth. I have a SurfaceView which is configured as RGBX_8888, and the banding is not present in the rendered canvas. If I manually dither the image by overlaying a noise pattern at the end of rendering I can make the gradients smooth again, though obviously at a cost to performance which I'd rather avoid. So the banding

How to draw a smooth/dithered gradient on a canvas in Android

╄→尐↘猪︶ㄣ 提交于 2019-12-17 17:28:58
问题 Several answers mention to use GradientDrawable.setDither(true) to draw smooth gradients in Android. That has no effect in my code. Any idea what I have to change to get a well looking gradient in my live wallpaper? GradientDrawable gradient = new GradientDrawable(Orientation.TL_BR, colors); gradient.setGradientType(GradientDrawable.RADIAL_GRADIENT); gradient.setGradientRadius(canvas.getWidth() * 2); gradient.setDither(true); gradient.setGradientCenter(-0.1f, -0.1f); gradient.setBounds(cb);

How to best display 30+ bpp graphics on a 24 bpp display?

痴心易碎 提交于 2019-12-14 04:16:47
问题 What would be the best way to display the most faithfully graphics that have more than 8 bits per channel on a regular 24 bpp display? 回答1: The best solution I can think of is based on a random dithering that changes every frame. This combines the advantage of dithering with not having a fixed dithering pattern, and since a given pixel changes values many times a second what you perceive is closer to the average of those various values, which is closer to the original "deep color" value than