?
Solved

jai image overlay

Posted on 2002-04-18
8
Medium Priority
?
1,552 Views
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);
      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
Comment
Question by:steeks
[X]
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
8 Comments
 
LVL 9

Expert Comment

by:yongsing
ID: 6952514
JAI does not support transparent gif.
0
 
LVL 1

Expert Comment

by:Moondancer
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.
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
 
LVL 9

Expert Comment

by:yongsing
ID: 6957627
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.

 
LVL 1

Expert Comment

by:Moondancer
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.

Thanks,
Moondancer - EE Moderator
0
 
LVL 1

Author Comment

by:steeks
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..
0
 
LVL 9

Accepted Solution

by:
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:

http://archives.java.sun.com/cgi-bin/wa?A0=jai-interest
0
 
LVL 1

Expert Comment

by:Moondancer
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
0
 
LVL 1

Expert Comment

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

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month11 days, 12 hours left to enroll

752 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