Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1558
  • Last Modified:

jai image overlay

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);
      JAI.create("filestore",im3,"newFile.gif");

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?

Thanks
0
steeks
Asked:
steeks
  • 4
  • 3
1 Solution
 
yongsingCommented:
JAI does not support transparent gif.
0
 
MoondancerCommented:
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.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
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.
http://www.experts-exchange.com/questions/Q.11686878.html
http://www.experts-exchange.com/questions/Q.20174450.html
http://www.experts-exchange.com/questions/Q.20174444.html
http://www.experts-exchange.com/questions/Q.20179760.html
http://www.experts-exchange.com/questions/Q.20188778.html
http://www.experts-exchange.com/questions/Q.20195508.html
http://www.experts-exchange.com/questions/Q.20239488.html
http://www.experts-exchange.com/questions/Q.20250391.html
http://www.experts-exchange.com/questions/Q.20290851.html




*****  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.
 
Moondancer
Moderator @ Experts Exchange
0
 
yongsingCommented:
Moondancer, this question is not even one week old.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
MoondancerCommented:
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.

Thanks,
Moondancer - EE Moderator
0
 
steeksAuthor Commented:
Thats all very well and good, but it would be nice if someone could actually post some comments that actually help with the problem..
0
 
yongsingCommented:
steeks, post your question in the JAI discussion group. One of the Sun Engineer should be able to help you. Here's the URL:

http://archives.java.sun.com/cgi-bin/wa?A0=jai-interest
0
 
MoondancerCommented:
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
0
 
MoondancerCommented:
More than two months later, please update and finalize this.
Moondancer - EE Moderator
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now