Transparent Graphics Image

Hey all,
I have a couple questions regarding using a JPanel's Graphics object to get a an Image object and use that object as a "face" of 3D cube in Java3D.
Right now, thanks to the help of many of you guys, I have gotten what I want. That is a cube that has painted on it the Graphics stuff from some JPanel. Now I want more.
Is there a way to set the background to transparent instead of a certain color. I want to do this because I have two parallel planes that have something painted on them. I want to look straight onto the top one, and where there are "gaps" (where you would usually see the background color), you will instead see the plane behind it.
Another thing is that I have mouse stuff implemented so you can move and rotate the 3D figure. If I flip around this 3D cube thing, of course I can't see the back (its just black). Is there anyway to have the back just show the front.
What I am going for here is like drawing the Graphics stuff on a clear glass. Where there is nothing drawn, you can see through, and from the back, you can see through the glass to see the contents (backwards of course).
Any ideas?
Let me know if my descriptions are too vague.
Thanks,
armand

Ok here is when I'm actually drawing the panel painting on the plane (i do the same for each plane):
//... define points for plane
Appearance appear = new Appearance();
TextureLoader loader = new TextureLoader(bimage);
ImageComponent2D image = loader.getImage();
Material m = new Material();
m.setDiffuseColor(0.1f,0.9f,0.9f);
m.setSpecularColor(1.0f,0.0f,0.0f);
m.setAmbientColor(0.9f,0.9f,0.9f);
m.setShininess(25.0f);
appear.setMaterial(m);
// can't use parameterless constuctor
Texture2D texture = new Texture2D(Texture.BASE_LEVEL, Texture.RGBA,
image.getWidth(), image.getHeight());
texture.setImage(0, image);
appear.setTexture(texture);
TransparencyAttributes ta =
     new TransparencyAttributes(TransparencyAttributes.NICEST,0.7F);
appear.setTransparencyAttributes(ta);
return new Shape3D(plane, appear);
For the JPanel paintings, I tried to set the background color to transparent- the alpha value. While the JPanel's background is semi-transparent, I think when I capture it, it does not retain the semi-transparency. It just grabs whats on the screen- like if I wanted to print (I use the same idea for printing).
I know my planes are transparent, because if I comment out the line
appear.setTexture(texture);
I get two transparent planes- I can see through them. As soon as I add the above line- which actually paints the JPanel painting on the transparent planes- I loose transparency.
So I figure its something I need to do with the texture object, but I cant seem to get anywhere. Any help?
thanks,
armandfcdx

Similar Messages

  • Latest Adobe Acrobat X doesn't support PNG transparent graphic?

    So in the past using version 8.x I had no problem inserting graphics, including a signature that is a transparent PNG.  Now with the update to the latest studio 5.5 which came with Acrobat X 10.1.1 when trying to insert that graphic (which took a while to figure out how to do, edit object, right click ,insert image), it blocks out the lines/etc that are part of the document (it doesn't block out the other fields where I put edit fields), but it shouldn't be because it's a transparent graphic (PNG).

    After reading a few other articles in this forum  about smilar problems I found the answer myself: While Photoshop uses the ICA driver provided by Apple Acrobat doesn't. Acrobat requires the installation of the drivers and software provided by EPSON. This package can be found on the EPSON web site, but only when searching for drivers for Mac OS X.6 that also run on OS X.7.

  • I created a signature ID and customized the signature; however, when I go to sign it only shows the name layout or graphic image? How do I go back to using the certificate?

    Dear Forum
    I was using Adobe version XI and the signature feature disappeared from the menu. Now I downloaded Acrobat Reader DC. Using the menu and instructions I created a signature ID and customized the signature; however, when I go to sign a document it only shows the name layout or graphic image? How do I go back to using the certificate that I created?
    Any help would be greatly appreciated.
    Regards
    Carlos

    Firefox works fine on Windows 2000 SP4 for me.
    Any chance you have a dial-up connection that uses a web accelerator to speed the loading of content?

  • Spry Menu problem with using a transparent background image

    Hi-  I'm new to CS5 and Dreamweaver. I just finished the beginning webpage tutorial and I have started to work on a personal project. The Problem: when I use a transparent png image as a backgroun-image for my spry menu it shows up fine in live view, but doesn't work in browser view (safari), in fact the menu reverts to it's original grey and blue boredom. Does anyone have a solution for me? Does this mean it will be grey and blue when it goes live? Thanks, Ruth333333

    Please supply a link to your site.
    Gramps

  • I cannot insert a graphic image in a new composition: win 7, tb 24

    At times when composing a new e-mail I cannot insert a graphic image in the message. I have tried both the Insert button and the Insert icon. This does not happen all the time; but, when it does happen I can't seem to make it work. My system is a Win 7 with Thunderbird 24.3.0.5. I have tried inserting different graphic images and have tried all combinations in the Image Properties pop-up window.
    I have closed and reopened Thunderbird. I have restarted my system. I have closed all windows except Thunderbird. Nothing helps. Help! Thank you, Bill Gray

    Bill Gray here again. I find that if I open another Write window, then copy/paste my entire e-mail from the initial window -- I can insert graphics into the new window.
    What happens in Thunderbird to make this happen? This has happened a number of times. But, at least now I know that I can open a new Write window and get around the problem. Yet, I am still stuck with the nagging question: Why does this happen?
    Thank you and God bless, Bill Gray

  • How to save transparent background images to have transparent background thumbnails with Photoshop 2014?

    In old versions of Photoshop there was a feature that made thumbnail images have a transparent background.  I'm a CC member using Photoshop 2014 on a MacBook Pro running OS X 10.9.4 and every thumbnail of a transparent background image I've created in Photoshop 2014 appears on my desktop with a solid white box background that has a thin black outlined box inside of it.  How do I save the transparent background images I've created in Photoshop 2014 so they will appear on my desktop as thumbnails with a transparent background?   I'd like to continue to be able to replace the default background-less folder icon that that appears on files with transparent background thumbnails to customize my files as I use to do with older versions of Photoshop.

    If your layered document has a Photoshop background layer it visibility need to be set off when saving a PNG or Gif file for Photoshop background layers do not support transparency.
    Thumbnail may be a bit more complicated than you think. I do not use Lightroom, and only occasionally use the bridge.  I believe Lightroom and Bridge  keep thumbnails they develop for image files  in their library databases and caches.  Other programs do not have acces to  these.  RAW Files and Image files have Jpeg previews stored in then.  I believe most application use these previews jpeg to create thumbnails.  Jpeg format does not support transparency.
    Icon on the desktop are not always thumbnails some are embedded icons in application modules other are icon in dll these may well have transparency. However image file on the desktop have generated thumbnails.  However you can create a shortcut for an image png file and create a icon with a transparent background for the png file and change the shortcut's icon for the png file to the transparent ico file you created for it.
    Also many Photoshop release ago an Adobe module created Thumbnails for image files in Windows File explorer and most likely system file dialog. Adobe stopped supporting that stating Microsoft changes how windows works.
    Today I use FastPictureViewer Codec Package to generate image thumbnails for image files including RAW and PSD files in File Explorer and system file dialogs.
    I don't use a Mac don't know what available for your Mac.

  • How to import many large graphic images to fit into column width?

    I have a 2-column layout and about 150 large graphic images which must be imported so that they fit exactly into the column width. These are bitmaps which have all the same dimensions. All of them will need a border (stroke). And they should be inline graphics because they belong to exact positions in the text flow.
    What would be the sensible approach to that (apart from scripting which I have not done yet)? I tried to define an object style which has the attribute "Fit content to frame", but this does not scale the image to the column size. How can I avoid to format 150 those images manually?

    It may be easier to change the ppi in photoshop so the image can be placed at the exact size.
    so if the image is 10 inches and the file is 300 ppi
    with resample image unchecked change the width to whatever you want it say 2 inches no the ppi will automatically change to 1500 ppi. Save. If you are creating a PDF make sure these images are not downsampled if you need the resolution.
    another way if all images are the same size would be to size one and place it where all the images go and relink to the other pics, when you relink it should retain the properties of the previous pic.

  • Storing graphic images in a laser printer.

    I want to store small graphic images (.gif, .jpeg, etc.) in the laser printer's memory and use PLC to pull the image onto a sheet to print. Has anyone done this? Need some direction.
    Thanks

    You can't store images in the original source format (.gif, .jpg, etc.), but (assuming that the printer model in question supports the PCL5 Page Description Language) you can (using suitable software) convert these images to appropriate PCL-format raster or vector images, and embed these within PCL macros, which can be stored in the printer's RAM (or more permanently on a hard disk or other attached storage on more expensive models). 

  • Printing transparent marker images

    Hello,
    I'm using transparent PNG images (baloons) as markers for features of interest on my map application. Everything's just fine until we try to print from the browser. The marker images appear with blocks around the border, defeating the purpose of the transparency, and making things look rather messy.
    Has anyone had luck with printing transparent markers ? I am using GIMP to create the transparent PNG files. I spent the better part of yesterday afternoon creating various combinations, including transparent GIF files, indexed and non-indexed PNG's, etc...still no luck. Again, everything is fine when viewing on-screen -- the problems arise only when printing.
    Any insight would be appreciated.
    Thanks!

    FYI, this is fixed within MVMapView print() in one of the latest patch releases.

  • LOAD FILE INTO GRAPHIC IMAGE ON CANV

    How do I load file into graphic image on the canvas not the image item on the block?

    With the Layout Editor open, select Edit > Import > Image.

  • Using Transparent Photoshop images placed into Indesign CS5

    Placed a transparent photoshop image with clean/beautifully sharp mask inside my Indesign design.
    Added a drop shadow with Indesign and gave plenty of space with the outside frame thingy.
       However  when I export the PDF my round image mask shows a blunt ugly edge on my perfectly round masked circle.  The photoshop image is perfectly round...  How come Indesign blunts the right edge?
    The image is not being clipped by the frame, I have given it plenty of space.   This seems to be a CS5 issue as my coworkers who have similar file setups on their CS4 files get no circle blunting!    We just got the proofs back today and is not just a quirk of the pdf rendering on our screens.
    Thanks!

    Ah,  says I'm using acrobat 5 compatibility setting.  My flattener options seem to be greyed out at PMrip ?
    Does this look like it should?

  • Does iphoto support transparency in images?

    does iphoto support transparency in images?

    Import the photos and create a small test book -
    Before ordering your book preview it using this method - http://support.apple.com/kb/HT1040 - and save the resulting PDF for reference - the delivered book will match it.
    If the preview is what you want then you can go ahead and create the book, preview it and order knowing tha the printed version will match the preview
    LN

  • FCP 10.1.3 multiple graphic images into one frame

    Hi - How do I put multiple graphic images into one frame? - so it kind of looks like a video wall - except these are still images. I can do it manually but it's not precise. Anyone found a way other than this? Thanks.

    Here is my quick and dirty generator called "9 Pictures": https://www.dropbox.com/s/92c536wgesh2yzj/9%20Pictures.zip?dl=0
    To install it, unzip the file and place the folder inside /Users/yourname/Movies/Motion Templates/Generators
    It will look like this in FCP X. You just have to click each drop zone icon in the inspector and then select the desired clip from the browser. Use the Pan and Scale controls in the inspector to select which part of each image you want to use. Note: this was done in the hope that it may be helpful, but it is no more than a quick thing. You can also control-click the generator in the generator browser and choose open in motion (if you have it) to see how it was done and to modify it.

  • When opening a word doc in pages i am loosing the graphic images from powerpoint that were embedded in the word doc

    When opening a word doc in pages i am loosing the graphic images from powerpoint that were embedded in the word doc

    Are the images placed in a table? Many Word user have the habit of doing that. Tables are not handles the same way in Word and Pages so they get "hidden" in Pages. One way to find this out is to change the size of the paper of the document. You do that in the Page setup in the file menu. Create a document that is much longer that the default one and see if you images will pp up.

  • Graphic Images Behind Tables

    You can add graphic images behind your spreadsheets. Place the image and send to back. Select your table(s) so the corner / center drag icons show. With the Inspector change the table fill color to "None".
    Regards,
    Message was edited by: WWJD

    If you control-click in one of the images and copy the code to TextEdit, you might get the code being used. The image is hosted at photobucket.com and I paste the code from the HTML link provided.
    Regards,

Maybe you are looking for

  • Casting base class object to derived class object

    interface myinterface      void fun1(); class Base implements myinterface      public void fun1() class Derived extends Base public class File1      public myinterface fun()           return (myinterface) new Base();      public static void main(Stri

  • Real-time database or non real-time database

    I know the scheduling mechanism in Oracle database is somewhat like the Linux OS which is not real-time. Does Oracle provide real-time database which has some real-time scheduling guaranteeing each user transaction to meet with a deadline ? Thx a lot

  • IP Filtering of web service operations

    Our customer has a very specific security requirement. They want to restrict access to web service (on a operations level) based on IP Address Filtering. Besides the question whether this is wise or not (IP Spoofing ?!?) we are researching whether th

  • Setting up a File Back up system. Is time machine the right option?

    Hi I own a mac pro. I currently have a 2TB drive that uses time machine. If my computer was to break down then how can i take advantage of time machine. Can i simply plug the time machine drive into a different machine and get the files i need? Or ma

  • Problem with the firstcup tutorial

    Hi, I'm a developer that is new to Java. I walked through the "firstcup" tutorial using the netbeans 6.5.1 ide and glassfish 2.1 server. I thought I had successfuly completed all the code and xml config files. When I got to p14.html, "Building, Packa