Proble displaying transparent images

R
Posted By
Ramon
Jul 1, 2005
Views
311
Replies
2
Status
Closed
My Java application has a splash screen which was inspired on the ones that are displayed when the Adobe programs (Photoshop, Illustrator, InDesign) start up.

There is an outside invisible rectangle and some features that pretent to "come out" of an inside white rectangle.

You may have noticed how Photoshop has some feathers and Illustrator has some flowers; both have a white inside rectangle with a shadow that gives a 3-D impression.

My problem is: I cannot achieve the mentioned effect with my Java application.

Does anyone know whether Java has some limitation displaying the transparency part? I get a gray rectangle which should be transparent. The image is a GIF.

I really appreciate any tips and pointers since I spent a lot on that splash screen and now it makes my program look not so good.

-Ramon F Herrera

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

E
edjh
Jul 2, 2005
Ramon F Herrera wrote:
My Java application has a splash screen which was inspired on the ones that are displayed when the Adobe programs (Photoshop, Illustrator, InDesign) start up.

There is an outside invisible rectangle and some features that pretent to "come out" of an inside white rectangle.

You may have noticed how Photoshop has some feathers and Illustrator has some flowers; both have a white inside rectangle with a shadow that gives a 3-D impression.

My problem is: I cannot achieve the mentioned effect with my Java application.

Does anyone know whether Java has some limitation displaying the transparency part? I get a gray rectangle which should be transparent. The image is a GIF.

I really appreciate any tips and pointers since I spent a lot on that splash screen and now it makes my program look not so good.
-Ramon F Herrera
Just a shot in the dark — try PNG.


Comic book sketches and artwork:
http://www.sover.net/~hannigan/edjh.html
Comics art for sale:
http://www.sover.net/~hannigan/batsale.html
T
Tacit
Jul 2, 2005
In article ,
"Ramon F Herrera" wrote:

My Java application has a splash screen which was inspired on the ones that are displayed when the Adobe programs (Photoshop, Illustrator, InDesign) start up.

There is an outside invisible rectangle and some features that pretent to "come out" of an inside white rectangle.

You can not make a standard window which is transparent. If you create a window, then put a transparent image in the window, you will not see through to the Desktop; you will see through to the background color of the window. Windows are opaque, not transparent.

There are two basic ways to do what you are trying to do.

1. Use an operating system API call to capture an image of the entire screen. Create a borderless window. Put the image of the screen, cropped and positioned appropriately, in the borderless window. Put your transparent graphic on top of that. The window is actually a rectangle, and no part of the window extends beyond that rectangle; but since it is filled with the contents of the screen, you create the *illusion* that the window is not rectangular and part of the window extends beyond its borders.

2. Draw directly onto the screen without creating a window at all. This requires using operating-system-dependent APIs directly. It will not work cross-platform (you need to rewrite the code for each platform) and I do not believe you can do this in Java.


Art, photography, shareware, polyamory, literature, kink: all at http://www.xeromag.com/franklin.html

How to Improve Photoshop Performance

Learn how to optimize Photoshop for maximum speed, troubleshoot common issues, and keep your projects organized so that you can work faster than ever before!

Related Discussion Topics

Nice and short text about related topics in discussion sections