[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


jai image overlay

Posted on 2002-04-18
Medium Priority
Last Modified: 2007-12-19
I am trying to dynamically watermark an image, so that it can be served via an applet.

I will be starting with a tiff image, that I would like to overlay a water mark with "sample" over the original image.

I have been experimenting with gif imagages to start with and have thought about using a transparent gif image; the watermark with JAI.create("overlay",src1,src2) to create the output RenderedImage.

The problem I am having with this, is that when I create a RenderedImage based on the transparent gif file, it is not decoding it properly, thus the resulting image is simply all black.

i'm not sure how to decode/encode the images properly and the following code is my attempt at opening, combining and saving images:
       public RenderedImage im1;
       public RenderedImage im2;
       public RenderedImage im3;
       private final String baseImFile = "base.gif";
       private final String waterImFile = "trans.gif";

      im1 = JAI.create("fileload",baseImFile);
      im2 = JAI.create("fileload",waterImFile);
      im3 = JAI.create("overlay",im1,im2);

How can I encode/decode the images properly to get the resulting image I'm after?

Once I get this to work, can i use a "base" tiff image with a "transparent" gif overlay? If not, any clues on how I go about this?

Question by:steeks
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3

Expert Comment

ID: 6952514
JAI does not support transparent gif.

Expert Comment

ID: 6956293
This question is current, others below are not.  Some have had zero activity, for which you may wish a refund so you can ask them again to draw current attention.  Let us know please.

ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.

*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations if this item remains inactive another seven (7) days.  If you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643 
POINTS FOR EXPERTS awaiting comments are listed here -> http://www.experts-exchange.com/commspt/Q.20277028.html
Moderators will finalize this question if in @7 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
Thank you everyone.
Moderator @ Experts Exchange

Expert Comment

ID: 6957627
Moondancer, this question is not even one week old.
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


Expert Comment

ID: 6957976
ypongsing ->  True, but as you see the list, one item dates back to the year 2000.  The goal is to provide ALL open/locked questions to request that everyone manages all their open questions, en toto.  This is why I added this verbiage to the beginning of this follow-up request.
This question is current, others below are not.  Some have had zero activity, for which you may wish
a refund so you can ask them again to draw current attention.  Let us know please.

Moondancer - EE Moderator

Author Comment

ID: 6959300
Thats all very well and good, but it would be nice if someone could actually post some comments that actually help with the problem..

Accepted Solution

yongsing earned 400 total points
ID: 6959908
steeks, post your question in the JAI discussion group. One of the Sun Engineer should be able to help you. Here's the URL:


Expert Comment

ID: 6961002
Just to clarify, steeks, the urgency to close is not with this question.  The term "abandoned" question refers to any that have been inactive 21 days or longer.  I posted the above reminder to let you see all your open items as of that date, some of which are quite old.

Thank you, yongsing, for your help and ongoing support.  It is appreciated.

Moodancer - EE Moderator

Expert Comment

ID: 7118724
More than two months later, please update and finalize this.
Moondancer - EE Moderator

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question