Transparent image problem

Hi all,
I have two images of the world, both of exactly the same size. The first is a background, and provides texture. The second image goes on top and is supposed to be transparent to let the texture show through. My problem is that when i display the 'transparent' image on top, you cannot see the contours through it, instead the top image just appears a pale colour because of the transparency added to it, as opposed to actually being transparent. Here is my code:
import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
public class GamePane extends Canvas {
    /** Creates a new instance of GamePane */
    public GamePane() {
        try {
            buff1 = ImageIO.read(getClass().getResource("images/map_background.gif"));
            buff2 = ImageIO.read(getClass().getResource("images/map.gif"));
        catch (IOException ioe) {
            System.out.println("Problem reading in file: " + ioe);
    public void paint(Graphics g) {
        g.drawImage(buff1, 0, 0, null);
        g.drawImage(buff2, 0, 0, null); //the transparent image
    Image img;
    BufferedImage buff1;
    BufferedImage buff2;
}Can anyone suggest where i am going wrong?
Many thanks

As I understand you right, you want to use a top layered image with transparent parts. If this is the case, you should use the same color for all transparent parts in the picture and use a paint program to change the transparent color to the color mentioned. I use always microsoft paint to do this. (picture-attributes-transparent...)
the colored parts will automatically appear transparent.

Similar Messages

  • Transparent image causes flattening problem

    Hi,
    I have a 34 page booklet that I am exporting as a swf file. When I add a transparent png file to the booklet (it makes the book look like it has a spiral binding) the file will NOT export anymore. It gets to page 17, quits and the error message says something like, "there was an error while flattening".
    I can get the file to export if I check rasterize the images in the export dialog box. Just for added information, I did change the transparent png into a gif file and tried exporting that but I received the same error message. If you want to see the file it is located here
    http://www.sportop.com/flip-catalog/ThunderRidgeResortApparel.html
    It is the spiral image that causes the problem. Any ideas why this is happening?
    P.S. It looks like nothing is happening while the file is loading because I do not know how to add a pre-loader (my other problem).
    One more thing, any idea why the file does NOT center is the html container page?
    Thank you for your help,
    Tricia

    Sounds strange, I have used a lots of transparent images in INDD layouts and exported them as SWF succesfully. Have you tried to use Photoshop PSD-format? And you could also create a new layer for that spiral...
    If you want to get your book centered and equipped with preloader, go to Adobe Marketplace and download eDocker:
    http://www.adobe.com/cfusion/marketplace/index.cfm?event=marketplace.offering&offeringid=1 7503&marketplaceid=1
    You may use it for couple of days free of charge!
    If you have your SWF exported and ready, it takes only about 20 seconds to build a version with preloader and many other cool stuff too, like zooming...

  • Problem with transparent image

    Hi everyone,
    I'm having problem with embedding transparent image to PDF. Thin border appears  when viewing the document with Adobe Reader, Adobe Acrobat Pro and even with Foxit Reader. But there are no such border in the image.
    After some experiments I found that this border appears on the edge of fully transparent black and fully opaque white areas. And changing fully transparent black color to fully transparent white removes the border.
    Is this an expected behaviour of Adobe Reader or is it a bug? Could anyone explain in which other cases such artifacts may appear?
    Thanks in advance.

    It is related to the source from which PDF document is generated. Anyway if writing the image as is without pattern the problem still remains.
    Here is example without pattern http://www.filefactory.com/file/3g711cx94n1b/n/testImage_pdf

  • Problem: importing a transparent image from Photoshop to Premiere.

    Dear Adobe community,
    I am trying to import a transparent image from Photoshop to Premiere Pro CC. Whatever file format I choose to export from Photoshop, Premiere Pro CC will not import the file correctly. When I import is, two things occur: 1) the image gets imported, but the white background is still there or 2) the image gets an error "The importer reported a generic error".
    Does anyone have an idea how I can get an image with a white background transparent into Premiere Pro CC.
    Specs:
    MacBook Pro (Retina, 13-inch, eind 2013)
    2.8 GHz Intel Core i7
    16GB RAM
    1536MB Intel Iris videocard
    Thanks!
    Christiaan

    You need to make sure the image has an alpha channel.
    Images like jpeg dont have an alpha channel.
    Psd or png do and the image has to be RGB.
    Make sure the background in PS is also transparant.

  • How to create transparent image at run-time?

    How to create transparent image at run-time? I mean I want to create a (new) transparent image1, then show other (loaded) transparent image2 to image1, then show image1 to a DC. The problem is - image1 has non-transparent background...

    i'm not sure, but you can set the alpha value to 0 in all pixels which are 'in' the background..
    greetz
    chris

  • Colors shift when a PDF file contains transparent image

    Hello,
    I tried to programatically set a soft mask to an image by using the Addobe PDF Library, in order to make part of the image transparent. The image color space is RGB. I used PDEImageSetSMask() funtcion for setting the mask. I also have a PDF file that was created in the same way but without the part of the code that sets the mask. Therefore this PDF contains the same image as not transparent.
    When I open two files in Adobe Reader 9.2.0 the colors are not the same. The colors in the file which contains the transparent image are a bit darker. The colors are different not only inside the image box, but in all page area. I also tried to open the same file in GSView and there was no such problem.
    Can I fix this by changing the Adobe reader preferences, or this is a problem in the code that genereates the PDF?
    If this is not the correct forum to ask this question, please direct me to the correct forum
    Thanks

    You need to set the transparency blending space of the page to RGB, since the default blending space is CMYK (hence the color shift).  You do this by adding a transparency group dictionary to the page's dictionary when creating the PDF.

  • InDesign PDF transparent images not printing right background color.

    problem with exporting an InDesign Document to a PDF and printing. My transparent images are showing up with a darker background than what they are placed on. Know how to help?

    Thanks everyone!  That really helped.
    There were a few other things that I had to make sure of also.
    Solution:
    Images placed in InDesign that were made in Photoshop or another program should be in ckmy format.  The background needs to be in the same ckmy.   Transparency blend must be set at CKMY, then Transparency Flattener presents must be set at Rasters/Vectors: 0 Line art and text resolution: 600, Gradient and mesh resoltuion 300.  Exporting to PDF must be done under present PDF/X-4:2008 Compatibility: Acbrobat 7.

  • Changing fill colour for partly transparent images

    Does anyone know how to change the fill colour used for partly transparent images? I have a bunch of PNGs that I made for use as clip art, which I imported into iPhoto (that way I can use the media browser with Pages and Keynote).
    Unfortunately, the images (which are black) are shown on top of a black rectangle both in iPhoto and the media browser. I've tried changing the background colour to both gray and black, but the 'fill' colour stays black.

    There's no way to change it if you want to keep the transparency for use in other applications or web pages.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.

  • Display a transparent image in JPanel

    i just start using Java Graphics Programming fews month ago. there's some problem i facing recently. i doing a simple gif file viewer. first i get the file using the Toolkit and put it in a Image object and use the Gif Decoder to decoded each frame of the Gif File to BufferedImage object and display each of the frame in a JPanel inside a JFrame.My porblem is :-
    How to display a transparent image in JPanel? my image source in BufferedImage and how to i know the image is transparent or not?

    I simply use ImageIcon object to display the image (*.gif,*.jpg)
    JLabel l=new JLabel(new ImageIcon("file path"));
    add the label to a panel or frame or dialog
    this object no need to use the ImageBuffered Object
    It can display any animate gif whether the background is transparent or not.

  • Transparant image printing with white backgroud in postscript file

    Hi,
    I am new to Livecycle ES, It would be grateful if some one answer my question.
    I want to place signature image to the form. Dinamically the signature will be changes. and if i print the postscript file, the signature is printing with white background (even it is transparant image - .gif).
    Steps i follow,
    1) Set the field propertly as 'Image Field' in form and declared field name as 'SIGN_SIGN1'.
    2) Populate signature image as encoded value to the XML stream - <SIGN_SIGN1>-----Base64 encoded string of file PICCHI.(BMP/JPG/…)----</SIGN_SIGN1>
    3) Render the form with XDP and XML data.
    I don't get the white background of an image to the PDF output. I am facing problem in Postscript (PS).
    Pls help me.
    Regards,
    Sasi

    Hi paul,
    I have issues in postscript file, the signature image is printing with white background and hiding the backdrop. I don't have issue in  PDF output, it is printing with transparant image and it is not hiding the backdrop.
    Regards,
    Sasi

  • HELP - Export Transparent Image in CS3

    There used to be a very useful function in CS2 under Help which was Export Transparent Image. What happened to that function in CS3 and how the hell do I export transparent image now in CS3?
    Please help, this is quite urgent.
    Thanks.

    I hear what you are saying Noel... But I came to these forums in good  faith  with a question about a tool I found useful that was no longer available. I  admit I let my frustration show in my first several postings about this because  in the other topic on this issue, one of  the staffers here even tried to say  the function did not even exist. That in  combination with the attitude that 'anyone that would use this function must have no experience' or should be  using Photoshop Elements did not strike me as either very helpful or polite. I  would never let one of my staff treat a customer who came to us seeking help to act this way. It is inexcusable and I saw from the other postings that I am not the  only one who feels this way.
    Here is a selction of a few of the things she said to me... she seems to have  confused me with someone else?
    "Dear same idiot who feels the need to use PM to continue an  ended/locked/deleted forum discussion,"
    "There  is no point in continual messaging unless you feel it is some sort of  release for your mental condition. Your message is clear. I have no problem  comprehending your words. I simply disagree with your insane  beliefs. I  understand fully who used the function and why it  was removed. I was simply stating a fact and offering an alternative that  you seemed to ignore. I don't care if the function meant something more  to you. Nothing I can  do is going to bring it back or afford you any better  people skills.  You need to get over this... and get over me"
    "I  just found the Google cache of the closed thread and realized that you   may not be the same idiot that contacted me earlier using a fresh forum   account. But that still does not make you any less of an idiot."
    "The  question posed in the forum was "How do I export transparent images in   CS5 like I did in CS4?" The question was "viable" and answers were given  by  others and myself. Just because you do not like an answer does not  mean you  have to act like a child."
    "The answer was not to beg Adobe to bring it back in a user to user  forum. If you want to communicate with Adobe, go to their feature  request form."
    "If you were a designer for 30 years, you would have known how to make a  transparent file prior to the Help function that Adobe added for a  few versions. With that Help function gone, you should now have the  intelligence to craft an action to do the same thing with the press of a  button. It  is not really a challenge. If you need assistance, bring this topic  back  to the public forum. Your rude PMs are worthless to us both."
    "I look forward to further discussion in  the public forum where you don't need to hide your personal problems in  PMs."
    I find these kind of responses by a staff member of Adobe forums to abusive  in nature. Granted after getting this kind of rude response back to my  questions, I returned in like kind. I usually do not have these kinds of  interactions online, I find them childish and a waste of time. They do nothing  for the greater good of the forums and help no one. but I don't take kindly to  being treated with disrespect.
    I hope this does not exemplify the tenor of communication here on Adobe's  forums. If so... it would be a shame, because Adobe has a great reputation in  our community. It would be a shame to let a few individuals tarnish it.
    I for one would prefer that the person is question has no further  communication with me. I think that would be best for all concerned. Thank  You.

  • Rotated transparent images Muse CC 2014 not compatible with IE8....  they all appear with a black box behind them.

    IE 8 is supposed to be supported by muse CC 2014 but its not in the case of rotated transparent images.. Did not have this problem in the previous version of Muse.  The code did not have progid:DXImageTransform.Microsoft.Matrix... now it does...
    Had to add ie8 specific css and code to the page and use a composite image instead of the individual images to get a page with no black boxes...
    . <!-- CSS -->     <!--[if lte IE 8]>     <link href="assets/money3/ie8.css" rel="stylesheet" type="text/css">     <![endif]--> 
    <!--[if lte IE 8]>       <div class="clearfix grpelem" id="u24742ie8">     <img src="images/composite2.png" alt=""/>      </div>    <![endif]-->     
    <!--[if gte IE 9]><!-->        <div class="clearfix grpelem" id="u24742"><!-- group -->       <div class="clearfix grpelem" id="u24686"><!-- group -->        <img class="grpelem" id="u24545" alt="" width="119" height="119" src="images/floating1000sgreen-u24545.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=-0.8572,M12=0.515,M21=-0. 515,M22=-0.8572,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-22" data-mu-ie-matrix-dy="-22"/><!-- rasterized frame -->        <img class="grpelem" id="u24509" alt="" width="159" height="159" src="images/floating1000s2green-u24509.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=0.9744,M12=-0.225,M21=0.2 25,M22=0.9744,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-16" data-mu-ie-matrix-dy="-16"/><!-- rasterized frame -->        <img class="grpelem" id="u24503" alt="" width="184" height="184" src="images/floating1000sgreen-u24503.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=0.848,M12=-0.5299,M21=0.5 299,M22=0.848,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-35" data-mu-ie-matrix-dy="-35"/><!-- rasterized frame -->       </div>       <div class="clearfix grpelem" id="u24583"><!-- group -->        <div class="clearfix grpelem" id="pu24596"><!-- group -->         <img class="grpelem" id="u24596" alt="" width="58" height="58" src="images/floating1000s4-u24596.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=0.9703,M12=-0.2419,M21=0. 2419,M22=0.9703,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-6" data-mu-ie-matrix-dy="-6"/><!-- rasterized frame -->         <img class="grpelem" id="u24614" alt="" width="54" height="46" src="images/floating1000s2green-u24614.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=0.9744,M12=-0.225,M21=0.2 25,M22=0.9744,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-4" data-mu-ie-matrix-dy="-5"/><!-- rasterized frame -->         <img class="grpelem" id="u24640" alt="" width="53" height="62" src="images/floating1000s5-u24640.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=-0.9781,M12=-0.2079,M21=0 .2079,M22=-0.9781,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-6" data-mu-ie-matrix-dy="-5"/><!-- rasterized frame -->         <img class="grpelem" id="u24618" alt="" width="39" height="39" src="images/floating1000sgreen-u24618.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=-0.6018,M12=0.7986,M21=-0 .7986,M22=-0.6018,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-8" data-mu-ie-matrix-dy="-8"/><!-- rasterized frame -->         <img class="grpelem" id="u24620" alt="" width="39" height="39" src="images/floating1000sgreen-u24620.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=-0.6018,M12=0.7986,M21=-0 .7986,M22=-0.6018,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-8" data-mu-ie-matrix-dy="-8"/><!-- rasterized frame -->         <img class="grpelem" id="u24610" alt="" width="115" height="119" src="images/floating1000sgreen-u24610.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=-0.6428,M12=0.766,M21=-0. 766,M22=-0.6428,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-25" data-mu-ie-matrix-dy="-23"/><!-- rasterized frame -->         <img class="grpelem" id="u24604" alt="" width="29" height="29" src="images/single100-u24604.png"/><!-- rasterized frame -->         <img class="grpelem" id="u24588" alt="" width="34" height="39" src="images/floating1000s5-u24588.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=0.8572,M12=-0.515,M21=0.5 15,M22=0.8572,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-8" data-mu-ie-matrix-dy="-6"/><!-- rasterized frame -->         <img class="grpelem" id="u24632" alt="" width="49" height="49" src="images/single100-u24632.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=0.6691,M12=-0.7431,M21=0. 7431,M22=0.6691,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-10" data-mu-ie-matrix-dy="-10"/><!-- rasterized frame -->         <img class="grpelem" id="u24638" alt="" width="59" height="51" src="images/floating1000s5-u24638.png"/><!-- rasterized frame -->         <img class="grpelem" id="u24584" alt="" width="34" height="34" src="images/single100-u24584.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=-0.8387,M12=-0.5446,M21=0 .5446,M22=-0.8387,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-7" data-mu-ie-matrix-dy="-7"/><!-- rasterized frame -->         <img class="grpelem" id="u24592" alt="" width="75" height="95" src="images/floating1000sgreen-u24592.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=0.2924,M12=-0.9563,M21=0. 9563,M22=0.2924,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-19" data-mu-ie-matrix-dy="-2"/><!-- rasterized frame -->        </div>        <img class="grpelem" id="u24602" alt="" width="19" height="19" src="images/single100-u24602.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=-0.7431,M12=0.6691,M21=-0 .6691,M22=-0.7431,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-4" data-mu-ie-matrix-dy="-4"/><!-- rasterized frame -->       </div>      </div>      <img class="grpelem" id="u24511" alt="" width="34" height="39" src="images/floating1000s5-u24511.png" data-mu-ie-matrix="progid:DXImageTransform.Microsoft.Matrix(M11=0.8572,M12=-0.515,M21=0.5 15,M22=0.8572,SizingMethod='auto expand')" data-mu-ie-matrix-dx="-8" data-mu-ie-matrix-dy="-6"/><!--<![endif]-->

    I see this is still an issue even after the latest update....  Will this problem be addressed?  Right now I have to manually update the html code for each page after export.    This is a site that I update regularly so every time a change is made I have to fix each page so it can be viewed without the black boxes in ie8.

  • Transparent image/graph

    I've been reading a number of posts, but yet to find a clear answer to my problem.
    My ultimate goal is to have an image and a graph, one overlayed on top of the other (whether it is a transparent picture on a graph, or vice versa, it doesn't matter).  I just want to have both images roughly 50% transparent.  Imagine a gps image with a topography intensity map laid over the top... that's what I'm going for.
    From my experience so far, I've found that the transparency levels of the  3D controllers are unchangeable.  Although the transparency levels of the intensity & (x,y) graph shells are changeable, I haven't been able to change the transparency of the graph that it projects.  On the other hand, I've been able to make an image compltetely transparent, but not partially.  I realize that I might be able to import a partially transparent image into LabVIEW and work from their, but the program that I'm making now, will only deal with unaltered images (aka, not pre-transparent images).
    If anyone has any ideas, that'd be great.

    Thanks for the quick and complete response.  I think I understand what you're trying to do, but unfortunately I'm not getting the program to function properly.  The image that is generated is a blank.  One of the things I wasn't sure of, was the slider.  Is that just supposed to change the color intensity of the image?  Another question... which might be a very obvious one, but where is the 'new picture' function?  I've been looking through the function menu and have been unable to locate it.
    Hopefully I can try and figure the rest of this program out.  I attached a sample program that i found in the forums that is helping me get a little closer (this one puts an image behind/in front/ or in between a graph).  I'm still not convinced that this program will work with an intensity graph, but I'm going to give it a try.
    Thanks again.
    Attachments:
    image overlay.vi ‏43 KB

  • Wpf export graph to image problem

    My problem is I have created a new custom custom using the NI wpf graph as the basis. The control consist mainly of the graph,its axes and legends on a grid. To allow the legend to be moved around, I put it in a child grid. My problem is while trying to export the control as an image I am using the code below (similar to wpf graph export to image):
    Rect bounds = LayoutInformation.GetLayoutSlot(MainGrid);
    var bitmap = new RenderTargetBitmap((int)bounds.Width + 1, (int)bounds.Height + 1, 96, 96, PixelFormats.Default);
    bitmap.Render(MainGrid);
    My problem is the axes and the edges of the image exported to clipboard is dark as shown below. Is saved to image, the edges are instead transparent but better (not visible in the photos app but visible in paint). My question is why is this behavior and how can it be avoided?
    Thanks.
    Solved!
    Go to Solution.

    I did a bit of research and it seems the dark color is due to the trasnparency of the axes and edges of the image: the clipboard in windows does not support transparent image. The question is how can this transparency be removed from the axes and edges of the image?
    Thanks.

  • White box behind transparent images with drop shadow in InDesign CC 2014 (v.10) but not in InDesign CC (v.9)

    Hi all,
    Please can you help? No matter what settings I use in my print options in InDesign CC 2014 (v.10), ALL transparent images with a drop shadow are printing with a white box behind the image. If I remove the drop shadow, all prints fine. I know this is an old issue that happens with ID sometimes but I have been lucky enough to never have had it happen to me before! (All images are regular flattened TIFF images with clipping paths).
    Also, feathered edges are not printing correctly and are sharp instead of feathered.
    When I export the document to IDML and open it up in InDesign CC (v.9) all prints perfectly with no white boxes and feathered edges prints perfectly as well. I have compared all of the print settings (including color management, transparency flattener, etc.) between both versions and they are exactly the same. I am printing to a Xerox color laser printer. Can anyone offer any advice?
    Thank you so much,
    Christine

    Okay...false alarm! It turns out that the issue was with my PRINTER settings (the settings you customize after hitting the “Printer” button at the bottom of the Print dialogue box in ID CC. I thought I had triple checked this but it seems there was one setting I missed earlier…adjusting the print brightness seemed to cause the issue. SO GLAD to know it was not InDesign…20 or so sheets/prints later….and thankful to know what was causing the issue! Thank you so much Steve for helping at any rate:) Much appreciated:)

Maybe you are looking for

  • System should not allow to delete PO line Item after GR/IR

    Hi, I am working on a SAP Retail Implementation project. Currently the system is allowing us to delete the PO line items after doing GR or IR against that PO line item. But the clients requirement is that the system should not allow to delete PO line

  • Printing 2 pages per page - bad results

    hello Adobe Forums! I need to ask you a question. I am trying to print a PDF document 2 pages per page and I get very bad results. When I choose the automatic "2 per page" in the Print box, and first print the odd pages (horizontal orientation) and t

  • Checks to be escheated

    u2018Statusu2019 of checks after pulled for unclaimed property reporting.  Can we establish an (E)scheated status? Does SAP have any functionality for handling checks that need to be escheated? I know the checks can be voided and then using FB05 the

  • I have forgotten my password to my Account, not my ID, how do I retreive it?

    I have forgotten my password to my Account, not my ID, how do I retreive it?

  • Error explaining ???? Don't know this error?mythtv/open-sasc/HVR4000

    Hey guys! I got some Hauppauge HVR4000 in my mythtv - setup ! Using these settings: Kernel 2.6.31 MythTV 0.22 Drivers to HVR4000: s2-liplianin-hg Firmware:  FW version 1.23.86.1 OpenSasc-ng from AUR(build with this kernel) - but allso build without t