Hiding the Image in another Image using Java

Hi all,
I have to implement the Steganography using Java, i have to get two images and have to hide one image in another , please give me some ideas or sample links where i can explore to implement it...
Thanks & Regards,
Justin

Try the ImageConsumer class. The Image's getSource method returns an ImageProducer that can be linked to the consumer.
Some images (such as BufferedImage) also provides a Raster, which gives access to its contents through a DataBuffer. I don't know which is the easiest way, though...

Similar Messages

  • Can anyone help me to add method to rotate the image using mouse?

    Hi everyone, i am currently creating a game which require the user to be able to drag and rotate the image
    on the screen..but sadly...i'm only able to do the dragging part..
    Can anyone be able to help me add the method to rotate the image using the mouse?
    Thanks :-)
    the code
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.*;
    import java.awt.geom.*;
    class Game extends JFrame {
         DisplayCanvas canvas;
         public Game() {
              super("My Game");
              Container container = getContentPane();
              canvas = new DisplayCanvas();
              TitledBorder border = new TitledBorder("Game Window");
              border.setTitlePosition(TitledBorder.BOTTOM);
              canvas.setBorder(border);
              container.add(canvas);
              addWindowListener(new WindowEventHandler());
              setSize(450,400);
              show();
              class WindowEventHandler extends WindowAdapter {
                   public void windowClosing(WindowEvent e) {
                        System.exit(0);
              public static void main(String arg[]) {
                   new Example();
         class DisplayCanvas extends JPanel {
              int x, y;
              BufferedImage bi;
              DisplayCanvas() {
                   setBackground(Color.white);
                   setSize(450,400);
                   addMouseMotionListener(new MouseMotionHandler());
                   Image image = getToolkit().getImage("duke.gif");
                   MediaTracker mt = new MediaTracker(this);
                   mt.addImage(image, 1);
                   try {
                        mt.waitForAll();
                   catch (Exception e) {
                        System.out.println("Exception while loading image.");
                   if (image.getWidth(this) == -1) {
                        System.out.println("***Make sure you have the image "
                        + "(duke.gif) file in the same directory.*****");
                        System.exit(0);
                   bi = new BufferedImage(image.getWidth(this),
                   image.getHeight(this),
                   BufferedImage.TYPE_INT_ARGB);
                   Graphics2D big =bi.createGraphics();
                   big.drawImage(image, 0, 0, this);
              public void paintComponent(Graphics g) {
                   super.paintComponent(g);
                   Graphics2D g2D = (Graphics2D) g;
                   g2D.drawImage(bi, x, y, this);
              class MouseMotionHandler extends MouseMotionAdapter {
                   public void mouseDragged(MouseEvent e) {
                        x = e.getX(); y = e.getY();
                        repaint();

    research a bit on AffineTransforms. you can set the rotated instance of the Graphics2D class and it will do the rotations for you :-D

  • When I'm travelling I import photos onto my laptop's external hard drive and work on the images using virtual copies to develop them. When I get home, I want to import all the photos together with the developed virtual copies fromt the laptop's external H

    When I'm travelling I import photos onto my laptop's external hard drive and work on the images using virtual copies to develop them. When I get home, I want to import all the photos together with the developed virtual copies fromt the laptop's external HD into LR5 on my PC desktop. But if I use the import button in LR I only get the original photo, not the developed copies. What am I doing wrong?

    Since your current editing workflow is based around Virtual Copies there are no actual files containing the edit data. Therefore, you'll need to use the 'Import from another catalog' option ( see File menu).

  • How to change the images used in the "Named people" tiles?

    After working on adding people/faces for a while, I find that in many cases the image used in the "Named people" tile for a particular person is the worst one possible.
    Is there a way to tell Lightroom to use a different image?

    Agreed. The people grid looks horrible after a while. I went looking for a way to identify a key tile and couldn't find it.

  • Can I sort the images used in a book's browser by the # of times used?

    I'm also producing a DVDSP slideshow of the event's (selected) photos not included in the book.
    Q2: Can I sort the images used in a book's browser by the # of times used?
    That way I don't have to search thru hundreds of photos. When used in a book, each photo gets a badge showing the # of times used. Can this badge be used in a sort?
    Or must I apply a keyword to the used (or unused) photos?
    Thanks.

    But if the file has been embedded, the file name is lost.

  • Finding the images used in my Forest Screensaver to use as a Desktop

    I guess the question is fairly self explanatory from the subject.
    Is it possibe for someone to tell me the location of the images used in the Forest Screensaver that comes with OSX so that I can use the images a desktop images, because I like them.
    I realise some of them are in the nature desktop folder, but there are many others that aren't. I've tried to spotlight search it to no avail, all it finds is the screensaver itself
    Thanks
    James K

    Applications are special folders and you can view their contents.
    Open HD/System/Library/Screen Savers folder.
    Hold down the Control key as you click on one of the app icons. Choose Show Package Contents from the pop-up menu.
    Open the Contents/Resources folder to view the image files. Use the Option key (hold down while dragging from the folder) and drag those you want to a new Desktop folder where they will copy.

  • How to resize image using java imageio

    Hello ,
    I want to know how to resize image using java imageio.
    I dont want to use java awt because i am writing a web application.
    help is very much needed
    thank you.

    Just use an AffineTransform !
    Its much easier

  • How do I overlay n number of  bitmap images using Java.

    Hi All,
    I have a task of creating a composite bitmap or a .gif image from "n" number of bitmap images , so that the resulting composite image will look like as if all those "n" images were placed side by side . How can I achieve this ? Can you point me to some place where I can understand the concepts behind this?

    Create a new BufferedImage with the dimensions of all the images you want combined, then paint all the images into it through the Graphics object you can obtain from the BufferedImage. Then write out the image using the ImageIO class.

  • Does illustrator list the images used in a particular file. I want to know the file names of the images used.

    Does illustrator CS5 list the images used in a particular document.
    By this I mean does it tell you the name of the actual images.

    But if the file has been embedded, the file name is lost.

  • Print image using java

    Dear All,
    Can any one help me, how to print the image in java.
    Thanks in Advance.

    [http://java.sun.com/products/java-media/2D/index.jsp|http://java.sun.com/products/java-media/2D/index.jsp] will help you . Java 2d also have print api.
    you look at this
    [http://java.sun.com/javase/technologies/desktop/printing/|http://java.sun.com/javase/technologies/desktop/printing/]

  • Why does a pop up screen ask me to extract the image using Lightroom Installer, when all I want to d

    Why does a pop up screen ask me to extract the image using Lightroom Installer, when all I want to do is view it ?

    My local computer shop solved the problem. Apparently when you download cloud it changes a lot of settings.
    So second issue.
    Why do I now get asked to burn to disc rather than saving to my hard drive when I want to export from Lightroom ?

  • How do I change the image used on an movie project icon? iMovie seems to select an image at random from the images I imported.

    How do I change the image used on an movie project icon?
    iMovie seems to select an image at random from the images I imported.

    Not sure I understand how to use what you have posted. Here's what my init() looks like:
    public void init()
    setLayout(new BorderLayout());
    p=new Panel();
    p.setLayout(new GridLayout(1,1));
    callnowButtonURL = getURL(callnowButtonFilename);
    if (callnowButtonURL != null)
    callIcon = new ImageIcon(callnowButtonURL,"call");
    endcallButtonURL = getURL(endcallButtonFilename);
    if (endcallButtonURL != null)
    endIcon = new ImageIcon(endcallButtonURL);
    b=new JButton(callIcon);
    b.setBorder(new EmptyBorder(0,0,0,0));
    b.setBorderPainted(false);
    b.addActionListener(this);
    p.add(b);
    add(p,"Center");
    Now the ActionListener is basically:
    public void actionPerformed(ActionEvent e)
    if (mybool == false)
    <Perform actions here set mybool to true>
    Change JButton b to use EndIcon
    else
    <Perform actions here set mybool to false>
    Change JButton b to use CallIcon
    Can you clarify how to perform the action I require? You can have a couple of Dukes if you can help me sort this out.

  • As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 also how we can insert,update,delete records in list using ECMA script.

    As i am fresher Please share the doc of ECMA script using java script in SharePoint 2013 step by step also how we can insert,update,delete records in list using ECMA script.
    Thanks and Regards, Rangnath Mali

    Hi,
    According to your post, my understanding is that you want to use JavaScript to work with SharePoint list.
    To create list items, we can create a ListItemCreationInformation object, set its properties, and pass it as parameter to the addItem(parameters) function
    of the List object.
    To set list item properties, we can use a column indexer to make an assignment, and call the update() function so that changes will take effect when you callexecuteQueryAsync(succeededCallback,
    failedCallback). 
    And to delete a list item, call the deleteObject() function on the object. 
    There is an MSDN article about the details steps of this topic, you can have a look at it.
    How to: Create, Update, and Delete List Items Using JavaScript
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.

    We have a requirement to print the w2 forms for employees using java application, how can i implement this. Please give some suggestion.

    Anyone any ideas to help please?

  • Hiding the header of a group using dynamic programming

    Hi,
    I had a requirement where we needed to place a border around the UI elements. For this purpose i had used a group UI element. But the group UI element by default has an attached header (Setting the visible property of header to "None" only disables the header text). Hence as per the suggestions in the following thread i had set the caption dynamically (in WDDOMODIFYVIEW) which removed the group header completely.
    Hiding header of a group
    Now, when i was browsing through the forum i came across the reply by Thomas in the below thread,
    Setting value in cookie using ABAP code
    //if someone does post a "hack" or "illegal" way of setting the client cookie directly from Web Dynpro; this would not be supported by SAP and could stop working at any time.//
    Truly said, it might stop working at anytime. This might apply to my case as well as i am setting the caption dynamically. I am not sure is the right allowed way or if i am using one of the "illegal" ways (which would stop working at some SP levels).
    Can someone clarify if hiding the header of a group using the above method is allowed?
    Regards,
    Prasath N

    The usage of WDDOMODIFY method for dynamically altering the view (e.g. hiding or showing UI elements) is perfectly "legal".
    The manipulation of a cookie by the developer is not intended inside the Web Dynpro framework.
    These are two completely unrelated issues, as per my understanding Thomas warned about the second.
    I think you're mixing things up.

  • I can not get any updates and therefor not use Java as it only run updates for Mac 10.7. and later? How do i get the updates to install and use Java?

    I can not get ny updates and therefore not use Java, as it only run updates for MAC 10.7. and later. How do i get the updates to install and use JAVA ?

    In Snow Leopard you update Java from Software Update (in the Apple menu). You can check your version by opening Terminal and typing
    java -version
    (don't get creative and type anything else)
    The latest version is 1.6.0_65.

Maybe you are looking for

  • Output report to file

    I am trying to get our reports to be saved directly to file from the parameter form prompt. When I run the report from Report Builder, I designate that I want to save to file by selecting 'File' in the DESTYPE field and file's location in DESNAME. I

  • How to create the Exit Variable

    Dear all, I want to create the exit Variables  for query. But How to create the exit variables. Dose Anyone could share some document? Thanks Best regards, Leon

  • How to disable navigator buttons for editable rowset

    Hi All! Is it possible easily to disable delete button for editable rowset?

  • Whenever I restart firefox, my proxy settings are changed and my homepage too.

    Basically, My friend has told me that a computer worm has been eating away at my computer, but I'm asking you if you know how I can make it so that whenever i launch Firefox again it won't reset the proxy settings to where it says: 'Firefox cannot co

  • Find total count for Address Book?

    In Snow Leopard it was easy to find the "Total Count" for ALL CONTACTS. As soon as you clicked on ALL CONTACTS or even a GROUP in all contacts the amount showed at the bottom of the screen. LION appears to be different. I know you can click on ALL CO