Grainy image transparency in IE :(

Ok.. i create a image from a pixel array with the alpha set to something that makes it transparent (ex 128).
Everything looks fine in appletviewer, but in IE, its like it uses 256 color and creates a grainy pattern of the alpha image.
Anyone know how to fix this? Do i have to change the colormodel some how?

The dithering im talking about is only supposed to appear if i got few colors in windows (256) but im using 32bit. hm.

Similar Messages

  • How do you make images transparent in inDesign?

    How do you make images transparent in Adobe InDesign CS5.5?

    Dittco wrote:
    It IS possible: Select the image. Open effects (Window > Effects). Switch from "normal" to "multiply". Viola! White background is gone.
    That only works with a white background. In addition, it introduces a transparency effect, with its associated problems.
    With a rather light background: Select the image. Open clipping path (Object > Clipping Path > Options). Select Type > Detect Edges; use Threshold and Tolerance to get as close as possible to the edge of your image. This may be difficult because of a too low resolution image, or too much fringe on the edge -- if all fails, use the Inset Frame value to force the mask "into" the image. Click OK, and the background is gone.
    But that's not the only way: you can always create a clipping path manually, and then you are in total control, not limited by transparency side effects, auto-edge detection, and busy backgrounds.

  • How do I remove white jagged edges after making image transparent?

    How do I remove white jagged edges after making image transparent?  Is there a feature to help out with this?

    It's a file format limitation. GIF supports 1 bit of transparency.  That is 2^1 (which equals 2 total) levels of transparency.  This equates to either NO transparency at all, or specifying 1 single color of the 256 total possible values to being fully transparent.
    This will leave a very ugly fringe around the edge no matter what; it will only not be visible in color that match or are close to the fringe color; and then, that's a perception issue.
    Try creating an alpha channel and saving the image as a PNG.  That supports 8 bits of transparency, which equals 2^8 or 256 total different levels of transparency.  This will let your image have very smooth edges with no jagged transitions.

  • Urgent!Java Frame Cutting according to non-rectangular image (Transparency

    Urgent-Java Frame Cutting according to non-rectangular image (CrossPlatform - Transparency)
    hi, i want to make the frame transparent in order to make a skin like Windows Media Player . skin is non-rectangular how should i make the frame transparent i am using the JWindow as the container. Plz guide me any idea. as an example i have a JWindow i put a non-rectangular image on it via Jlabel . now i want to make the edges of JWindow outside the boundery of the image transparent ... so that my frame seems like a non-rectanguar image . How i do that? But i need a cross platform kinna thing in java especially for windows/mac/linux
    PaulFMendler :: thanks for ur help i looked at the code but it seems to be windows dependent. i need cross-platform way of producing abt effects. please contact me even on my email >> [email protected]
    Waiting ......

    Check out the link shown below:
    http://forum.java.sun.com/thread.jsp?forum=4&thread=391403
    The posted code has slight problem when moving the JWindow around but you can get a pretty good idea on what has to be done.
    ;o)
    V.V.

  • Make a color in image transparent on the fly

    Hi I am trying to load an image and at runtime pick the white
    background of the image as transparent. Can any one point me to the
    flex/flash libraries that may help w/ this? basically I have 2
    images both of them have white background. I want to be able to
    drag and drop them so that the main objects of the images are side
    by side. But the problem is each image has thick white borders. so
    i figure if i can dynamically choose white color in the image to be
    transparent then I can overlap them and the white borders will be
    transparent and won't get in the way. Any expert can point me to
    the right direction?

    doug777, thanks for the reply. My issue is that the image I
    am trying to place next to each other is some images off the web
    i.e. I don't have control over the image transparent color. that's
    why I want to find a way to on the fly set which color in the
    images will be transparent. I was hoping flex has some library for
    that

  • Setting a specific color on a image transparent

    I want to take a image that im drawing in the paint(graphics g) method, and set a certain color on that image transparent. so it blends with the background image properly.
    any ideas would be appreciated.

    Bird.gif
    import java.awt.*;
    import java.awt.image.*;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class TransparencyTest extends JPanel
        BufferedImage image;
        public TransparencyTest(BufferedImage orig)
            Color toErase = new Color(248, 248, 248, 255);
            image = eraseColor(convertImage(orig), toErase);
            setBackground(Color.pink);
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            int w = getWidth();
            int h = getHeight();
            int x = (w - image.getWidth())/2;
            int y = (h - image.getHeight())/2;
            g.drawImage(image, x, y, this);
        private BufferedImage convertImage(BufferedImage in)
            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            GraphicsDevice gd = ge.getDefaultScreenDevice();
            GraphicsConfiguration gc = gd.getDefaultConfiguration();
            BufferedImage out = gc.createCompatibleImage(in.getWidth(), in.getHeight(),
                                                         Transparency.TRANSLUCENT);
            Graphics2D g2 = out.createGraphics();
            g2.drawImage(in, 0, 0, this);
            g2.dispose();
            return out;
        private BufferedImage eraseColor(BufferedImage source, Color color)
            int w = source.getWidth();
            int h = source.getHeight();
            int type = BufferedImage.TYPE_INT_ARGB;
            BufferedImage out = new BufferedImage(w, h, type);
            Graphics2D g2 = out.createGraphics();
            g2.setPaint(new Color(0,0,0,0));
            g2.fillRect(0,0,w,h);
            int target = color.getRGB();
            for(int j = 0; j < w*h; j++)
                int x = j % w;
                int y = j / w;
                if(source.getRGB(x, y) == target)
                    source.setRGB(x, y, 0);
            g2.drawImage(source, 0, 0, this);
            g2.dispose();
            return out;
        public static void main(String[] args) throws IOException
            String path = "images/Bird.gif";
            BufferedImage bi = ImageIO.read(TransparencyTest.class.getResource(path));
            TransparencyTest test = new TransparencyTest(bi);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(test);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    }

  • Is there a way to make images transparent in Photoshop Elements 12?

    I just purchased the new software and don't have any experience with this program.  I'm trying to find out if I can make the background of images transparent.
    Does anyone know?

    Yes. First you must double-click the background layer to convert it to a regular layer. Then use whatever selection tools are appropriate to select your background and press delete. Unless you've you've changed default settings you should see a grey & white checker pattern - this denotes transparency.
    When saving you must save it to a format that supports transparency. For GIF and PNG use the File> Save for Web and make sure the transparency checkbox is ticked. For TIF use File> Save As and select the TIF format. On the same dialog that offers compression options, there is a transparency checkbox.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • Image transparency in 7650 and other s60

    I have a problem with image transparency in s60 phones. I have 2 versions of .png files. One I got from graphic designer with transparent background, the other is the same file, but I saved it in IrfanView, choosing the transparent background color.
    The former, looks nice on Nokia 7650, but seems corrupted on other Series 60 phones.
    The latter is OK on all Series 60 phones, but on 7650 where the image doesn't have a transparent background.
    Any of you runned into such problem yet?

    After looking around a bit, I found an add-on called FastestFox.
    You can find the add-on here: [https://addons.mozilla.org/nl/firefox/addon/fastestfox-browse-faster/ FastestFox].
    I haven't done too much research to the actual add-on itself, but after installing it in Firefox myself and using the Facebook person searcher I noticed the images and also other things like websites loading a lot faster.
    I hope this add-on helps you.
    Edit: The add-on adds some extra options when you right click a website (to download things from the website). You have to decide if you think this is worth the extra speed.

  • How do I make the background in an image transparent?

    ...How do I make the background in an image transparent?

    It sounds like you're gif is a picture of a white background with a black chess piece on top. If that's the case, you're going to have to cut the black chess piece out of the gif. Save ~just~ the image of the chess piece. Discard the white background. Use only the image of the black chess piece with no background image at all.
    Keep in mind that Java doesn't know that the white background isn't a part of the image. It doesn't understand that the white part is just the background. As far as it's concerned, the whole gif is the image. Only the component that ~contains~ that gif can become transparent.
    So, if you want to have a white background to start with and then have that background become transparent when the piece moves, make the background of the ~component~ holding the image of the chess piece white. When the piece moves, have the background of the component holding the image of the chess piece become transparent.

  • HP Photosmart Premium: photos print wet and with grainy image.

    Photos print wet and image looks almost like a posterization; the color seems okay, but the image has a grainy patterns of tiny dots all over it.

    What printer model - there are several different Photosmart Premium models?  What program are you printing from?  Are you using photo paper designed for inkjet printing?  What are the driver settings for print quality and media type?
    Web images are typically 72ppi, while for printing 200ppi or more is typically needed to prevent grainy images.  Make sure the source photo's are of reasonable resolution.  
    If you are printing from a program such as Photoshop that gives an option of RGB or CMYK printing be sure to select RGB.  While the printer inks are CMYK the driver is expecting RGB (or sRGB) source data.  Printing with CMYK selected will result in very oversaturated prints.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Image transparency

    Hi all.
    Would anyone please help me with a problem I have.
    I want to be able to induce transparency into a image. What I have is an image loaded from a jpg file (Image is white background with black writing in the center). This image contain 2 basic colours, black and white. What I want to do it create a class that will filter out all the white coloured pixels and make these pixels transparent (See though).
    I have look online and only found how to make the whole image transparent using the AlphaComposite class.
    I have also look at the Java documentation for help. I found that you can run an image though a filter. One such class is 'FilteredImageSource' this class's constructor looks like this: 'FilteredImageSource(ImageProducer orig, ImageFilter imgf) ' For the first argument i can use 'Image.getSource()' but the 2nd argument requires a class implementing the 'ImageConsumer' interface. The 'BufferedImageFilter' class implements the 'ImageConsumer' interface but the this class takes a argument of 'BufferedImageOp' (Interface). I think that I must use the 'ColorConvertOp' subclass of the 'BufferedImageOp' interface to achive replace a color.
    Here is where I get lost. It starts asking for arguments of type 'ColorSpace'. I have look at these classes and that you need to be a rocket scientist to create a 'ColorSpace' object to refer to a color. This is where I'm stuck. I have seen programs that got click on the color and it makes that color transparent (Mostly gif creators) but I want my program to do it to load images. You should be able to load any image and select the color to make transparent. The program should load the image, filter the image and them display the filtered image.
    Please could you help me. If someone could show me how to obtain the 2nd argument to 'FilteredImageSource(ImageProducer orig, ImageFilter imgf)', so that the color i choose can be made transparent. If an explination can be given as well.
    Any help would be greatly appreciated.
    Thanks
    (MC3)RaVeN

    You don't have to get that complicated. After you read the image from a file (jpg, png, etc), you can copy the image, but using a TYPE_INT_ARGB image instead of just a TYPE_INT_RGB.
         Creates a copy of the specified image, except that pixels of the specified color
         are transparent.
         public static BufferedImage createTransparentImage(BufferedImage bi, Color c) {
              int w = bi.getWidth();
              int h = bi.getHeight();
              BufferedImage out = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
              int rgb = c.getRGB();
              for (int i = 0; i < w; i++) {
                   for (int j = 0; j < h; j++) {
                        int _rgb = bi.getRGB(i, j);
                        if (_rgb == rgb) {
                             _rgb = 0x00ffffff & rgb;
                        out.setRGB(i, j, _rgb);
              return out;
         }

  • Is it possible to make the background of an image transparent in indesign?

    is it possible to make the background of an image transparent in indesign?

    It's not necessarily the best way, but depending on the image content, you might be able to get an acceptable result with the options under Object > Clipping Path...
    EDIT: So technically, the answer to your question is: No, but you can apply a clipping path to hide the background.
    Also, again depending on the image content, as well as the underlying content, it might be possible to use blend modes in the Effects panel to render the background transparent.
    Background removal is best done in Photoshop, where the image can then be saved as .PSD and its native transparency will be honored when placed in InDesign.

  • Fond image transparent

    Bonsoir,
    Je voudrais supprimer le fond d'une image ( il s'agit d'un globe) pour le rendre transparent.C'est pour le transporter sur n'importe quel document sans que le fond n'apparaisse. Quelqu'un peut-il m'aider? Merci

    Bonsoir,
    Je voulais remercier" jpsaussez" d'avoir répondu à ma question sur le forum mais je n'y arrive pas!! Il n'y a pas d'onglet ou icone "réponse"
    Pourriez-vous le remercier pour moi ou m'indiquer la démarche à suivre s'il vous plaît?
    Merci beaucoup
    Cordialement;
    Nadia DRIAI
    --- En date de : Dim 19.6.11, jpsaussez <[email protected]> a écrit :
    De: jpsaussez <[email protected]>
    Objet: Fond image transparent
    À: "Nadia DRIAI" <[email protected]>
    Date: Dimanche 19 juin 2011, 13h33
    1- Sélectionner l'objet (dans votre cas le globe) avec l'outil de sélection rapide par exemple.
    2- Ctrl + C pour copier la sélection dans le presse-papier
    3- Ctrl + V pour copier la sélection dans un nouveau calque
    4- Ouvrir la palette "Calques" : le nouveau calque porte l'objet seul sur un fond transparent

  • Making certain parts of an image transparent laying it on top of another

    I am currently doing an MSc project, where I am simulating the behaviour of ants in Java, however I have hit a stumbling block. Currently, I have an AntTerrain class that contains a paintComponent method. Every time this is called it draws a BufferedImage of the terrain which consists of all the obstacles and food, over which the ants are drawn by iterating through a 2D array. I have been trying to implement pheromones into the simulation, and although I am able to do it I want to have the functionality to be able view or not view them. Initially I had two Buffered images, one containing all the terrain information and the pheromones, and one not containing the pheromones. This became rather costly as the simulation progressed and more pheromones were laid, so recently I have been trying to create a buffered image of just the pheromones which I can overlay onto the terrain as and when the user wants to.
    This has been causing me immense problems. I have had limited success with using the alpha channels of the terrain image, by making it almost completely transparent, then drawing it on top of the terrain image, by setting the compositing to SRC_OVER, however, this muddys the terrain image below.
    I have been looking up various books and documentation on line to try and work out how to do it in a more elegant fashion without success. Peter has come up with the idea of using either Regions of Interest, Bitmasking or a combination of both. Neither of these techniques have been particularly well explained in the documentation I have found and I am more confused than when I started. Any help you could give me in this matter would be greatly appreciated.

    If the pheromones can be drawn independent of the array of ants then I would use a single BufferedImage and make a new one for each user change of pheromone visibility. If this is to unwieldy of if the pheromones require the ant array then I would try an OverlayLayout with the BufferedImage of obstacles/food/etc on the bottom and the pheromones on top. The ants could go on either one; maybe they would look better drawn above the pheromones on the top layer (guessing...). If you want to draw the pheromones with an AlphaComposite and they would look okay drawn above the ants you could draw the ants below and the pheromones above. This would be easy and fast.
    Here's an example of the OverlayLayout option:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.BufferedImage;
    import javax.swing.*;
    public class ToggleTest
        public static void main(String[] args)
            JPanel panel = new JPanel();
            OverlayLayout overlay = new OverlayLayout(panel);
            panel.setLayout(overlay);
            panel.add(new Top());
            panel.add(new Bottom());
            JFrame f = new JFrame("click me");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setContentPane(panel);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class Top extends JPanel
        boolean showPheromones;
        public Top()
            showPheromones = false;
            setOpaque(false);
            addMouseListener(toggler);
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            if(showPheromones)
                int w = getWidth();
                int h = getHeight();
                AlphaComposite ac =
                    AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.25f);
                g2.setComposite(ac);
                g2.setPaint(Color.red);
                g2.fill(new Ellipse2D.Double(w*2/5, h/3, w/3, h/3));
        private MouseListener toggler = new MouseAdapter()
            public void mousePressed(MouseEvent e)
                showPheromones = !showPheromones;
                repaint();
    class Bottom extends JPanel
        BufferedImage image;
        public Bottom()
            addComponentListener(resizer);
        protected void paintComponent(Graphics g)
            if(image == null)
                makeImage();
            g.drawImage(image, 0, 0, this);
        private BufferedImage makeImage()
            int w = getWidth();
            int h = getHeight();
            image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
            Graphics2D g2 = image.createGraphics();
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setBackground(UIManager.getColor("Panel.background"));
            g2.clearRect(0, 0, w, h);
            g2.setPaint(Color.red);
            g2.draw(new Ellipse2D.Double(w/2, h/5, w/9, h/3));
            g2.setPaint(Color.green.darker());
            g2.draw(new Ellipse2D.Double(25, 16, w/6, h/2));
            g2.setPaint(Color.blue);
            g2.draw(new Ellipse2D.Double(w/4, h*5/6, 125, 25));
            g2.setPaint(Color.blue);
            g2.draw(new Ellipse2D.Double(w*5/9, h/2, 55, 60));
            g2.dispose();
            return image;
        private ComponentListener resizer = new ComponentAdapter()
            public void componentResized(ComponentEvent e)
                image = null;
                repaint();
    }

  • Problem with image transparency in Director

    We want to use some Photoshop images with some transparency and gradients
    (ie foreground color to transparent background) in a project where the image
    will be placed over various other background images (the background images
    will show through the transparenct areas).
    When we import the file (in p/shop format - selected as 32 bit),and it's
    placed onto the stage the "transparent" areas of the image are not fully transparent
    - there is a slight 'lightening' of the pixels in the transparent areas (this doesn't show
    up when the image is viewed in Photoshop)
    Can anyone explain what is happening here?

    What happens if you save as PNG out of PS and import that?

Maybe you are looking for