How can add a images file  to anothere image file

hi
Requirement is: i have one image in data base , i is show to user in my application
know we want add another image file in to a current image file (just append)
at end .
i was tried with following code below
i was read the previous(Old) image content from the data base and placed into c:\\ReArchive\\test_content.tiff
ResultSet rs2=dbBean.getSQLRows("select binarycontent from ContentVersion where contentindex="+IndexValue+"");
byte[] bTempData_content=new byte[65536];
while(rs2.next()){              
File f = new File("c:\\ReArchive\\test_content.tiff");
f_content.delete();
f_content.createNewFile();
FileOutputStream dest_contentVersion = new FileOutputStream(f_content);
while(rs2.next()){              
InputStream is_content=rs2.getBinaryStream("Binarycontent");
nActualRead_content=is.read(bTempData_content,0,65536);
while(nActualRead_content>0)
dest_contentVersion.write(bTempData_content,0,nActualRead_content);
nActualRead_content=is.read(bTempData_content,0,65536);
Then i was took New image file from data base and place in to c:\\ReArchive\\test.tiff");
int nActualRead=0;
ResultSet rs1=dbBean.getSQLRows("select * from Object_Store where Barcode_ID='"+strBar_Code+"'");
byte[] bTempData=new byte[65536];
File f = new File("c:\\ReArchive\\test.tiff");
f.delete();
f.createNewFile();
FileOutputStream dest = new FileOutputStream(f);
while(rs1.next()){
InputStream is=rs1.getBinaryStream("Obj_Content");
nActualRead=is.read(bTempData,0,65536);
while(nActualRead>0)
dest.write(bTempData,0,nActualRead);
nActualRead=is.read(bTempData,0,65536);
then i tried add two images by converting InputStream to String and i am trying add to images
but i was failed ,i think i am in not correct way , how can i solve this problem
thanks advance
gss

Don't you think it would be a good idea to tell us how you failed?

Similar Messages

  • How to add a internal dtd to my xml file

    I am using the xml parser for PL/SQL, how can add a internal dtd to my xml file..
    Thanks in advance...

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jinyu Wang ([email protected]):
    Sorry, there is not an API to set internal DTD.
    But you can set external DTD by using:
    PROCEDURE setDoctype(doc DOMDocument, root VARCHAR2,sysid VARCHAR2, pubid VARCHAR2)<HR></BLOCKQUOTE>
    Thanks for your replay...
    null

  • How can I get the resolution of an image file in JSP?

    how can I get the resolution of an image file like jpg,gif,png in JSP ?

    Hii,
    If by the resolution, u mean size..this is how u can come to know....
    String add = "path/to/some.jpeg";
    javax.swing.ImageIcon chain = new javax.swing.ImageIcon(add);
    int height = chain.getIconHeight();
    int width = chain.getIconWidth();
    Hope that helps.
    regards
                   

  • How can I save an EXE front panel image to a file?

    The methods to save a VI front panel image to a file don't work on executable applications. How can I save an EXE front panel image to a file? (LabVIEW 6.1)

    Hi,
    i wrote some vi that save FP to image and created exe and it works fine. How do you save FP to image in VI?
    If you use VI server method "Get Panel Image" and use "Write JPG file" ( or BPM) it works fine.
    Attachments:
    fp.zip ‏40 KB

  • How can I control a button from one swf file to another swf file?

    Hi,
    I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
    Now, how can I write code on my main.swf file for the button which is on my external.swf file?
    Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
    Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
    Thanks.

    Here's some example code that you should be able to adapt to your needs.
    // create a new loader object instance...
    var loader:Loader = new Loader();
    // make the download request...
    var request:URLRequest = new URLRequest("external.swf");
    // add a complete event listener to the loader
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    // start the actual loading process...
    loader.load(request);
    // create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
    var externalMovie:MovieClip;
    // this function is called when the download has finished and the file is ready to use...
    function completeHandler(event:Event):void {
       // set the contents of the loaded movie to the new empty movieClip...
               externalMovie = MovieClip(event.target.content);
       // add this new movie to the display list...
       addChild(externalMovie);
    Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
    externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
    function btnClickClose(event:MouseEvent):void {

  • How can i scan multiple pages in a single file in pdf.

    How can i scan multiple pages in a single file in pdf using 1536 dnf.

    Hi @veerendrajain ,
    I see that you would like to save multiple PDF documents into one file. I would like to help you out today.
    In the HP Scan Software, select Advanced scan settings, click on the File tab and uncheck Create a separate file for each scanned image.
    Hope this helps.
    Have a nice day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • How can i link a video to a text file on iPad2

    how can i link a video to a text file on iPad2

    Alrite mate,cheers for replying....You are right,my mistake,,It is Frame and not Panel...therefore Frame 1 is home and Frame 2 is Add User. Frame 1 has a button called Add User,which if i press it should run and open up my Frame 2. I can run Frame 1 and 2 seprately and it works fine,but Now i want to link them. So When i run Frame 1 at first i only get Frame 1,but then when i press Add User button my program should start Frame 2.Resuting in 2 Frames opened. I dont know how to link them.

  • How can I save a region of an image into another image?

    How can I save a region of an image into another image? Should I use JAI?
    Java2d? Is there an example?
    Thank you.

    Here is what I try, but I find out I just get a black square for my output image, can you please tell me what am I missing?
              ImageIcon file=new ImageIcon("images/clouds.jpg"); // You can't open bmp files
                   // width, height looks correct:
                   System.out.println (" width" + file.getIconWidth());
                   System.out.println (" height" + file.getIconHeight());
                   BufferedImage bi = new BufferedImage(file.getIconWidth(), file.getIconHeight(),
                   BufferedImage.TYPE_INT_RGB);
                   int x = 0;
                   int y = 0;
                   BufferedImage subimage = bi.getSubimage(x, y, 40, 40);
                   File outputFile = new File("newimage.png");
                   ImageIO.write(subimage, "png", outputFile);

  • How can add captions or title to a picture now that iPhoto doesn't work after updating to iOS 8.

    I Have updated to iOS 8 and iPhoto is dismissed. How can add a caption /title (not in the image) like I was used with iPhoto? Photos has not this feature.
    please, could anyone help me. I'm a real beginner. Thanks,

    I Have updated to iOS 8 and iPhoto is dismissed. How can add a caption /title (not in the image) like I was used with iPhoto? Photos has not this feature.
    please, could anyone help me. I'm a real beginner. Thanks,
    The photos.app does not (yet) have the option to add captions or tags. It is not possible right now. You can however search for the captions you added previously using the search field.  You can also search for album names.  So, as a work-around, put photos that should have the same caption into an album with a name like the caption.
    See:  Migrating from iPhoto for iOS to Photos on iOS 8
    You may want to send feedback to Apple, that captions and tags are essential and need to be added in an update. Use this form:   Apple - iPhoto - Feedback

  • How can I reduce the size of a pdf file for emailing?

    I want to send a pdf file which is 8 mb, it has bounced in an email because it is too big, how can I reduce the size of the pdf file for emailing?

    Sometimes a simple "Save As" will reduce the file size slightly, but probably not enough to pass the <8 mb threshold of your recipient, as you need.
    You've probably seen it, try the next option in the Save As menu, "Reduced Size PDF," and make it compatible with the latest version possible, again considering the recipient. This suggestion assumes Acrobat X. You don't say which version you're using, but this tool was available at least going back to Version 8, but in a different place, you'll have to hunt.
    If all that doesn't work, you could remove some images from the source document, which also will reduce the overall size.
    Best luck.

  • How can I remove people tags from MULTIPLE images in Organizer 13?

    How can I remove people tags from MULTIPLE images in Organizer 13?  The strategy for removing keyword tags does not work. It appears that keyword tags and People tags are considered something completely different in 13.  I highlight multiple images, right click, and under keyword tags it says there are no keyword tags. There does not appear to be an option for people or other tags. Can anyone help? It is going to take literally hundreds of hours for me to do this one photo one tag at a time.  ??

    Comp. 792 wrote:
    Hi, my linked images all have dashed lines at the bottom of the images. I searched for an answer and someone said to add:
    img a {text-decoration:none:}
    to the end of my CSS,
    That CSS is complete nonsense. The correct way to remove borders from around links is here: http://forums.adobe.com/thread/417110.
    If you want to get rid of dotted lines, they are almost certainly caused by the outline property. However, outlines around links are there for a reason: it provides a visual "you are here" clue to people who navigate the web with the keyboard, either through preference or because of disability. You shouldn't remove the dotted outline without providing a different visual clue.

  • How can I set up a repeatable bulk image size reducer?

    How can I set up a repeatable bulk image size reducer?

    File > Scripts > Image processor.  It's pretty straight forward.
    Although I used the free Irfanview for many years.

  • How to add extra options for style of images.   iPad version has far more options than Mac version

    How to add extra options for style of images in pages.   iPad version has far more options than Mac version

    Thank you, you made me go look again and I realised the ones I use on the iPad are under Borders not style and they are on Mac also.  I feel a bit silly but I wouldn't have got there without your prompting.  Do you mean by "create your own"  using the borders and then saving as a style or can you create something that is not in either?
    Thanks again

  • How can I keep metadata on an embedded EPS file in AI?

    How can I keep metadata on embedded EPS images (from Photoshop) in Illustrator, like it does for JPG?
    The top image is an eps I embedded, and the bottom one is a JPG. They are both located on a remote server.
    Any help will be appreciated.
    Thanks!

    I do the same thing as you do...
    My music is on an external drive as to not use up gigabytes of storage that need not be used for media.
    There are a couple basic principles to iTunes that I believe you should know.
    1. iTunes is not a media storage program. It does not store your media "in iTunes". It simply is an organization tool for your media already on a hard disk.
    2. As iTunes is not a storage mechanism, it has no way to "know" whether or not the media that is listed is actually there. This is where the "design" of iTunes comes into play.
    I like to think of iTunes as a bread-crumb trail. The "music" in iTunes, isn't actually there. The bread crumb is the location on the external hard drive.
    If that bread crumb trail disappears (in this case the external drive you use). If said external drive is not plugged in, that bread crumb trail is not able to be followed. iTunes is "lost" and unable to find the media. The only way to remedy this is to place the media on your local drive.
    To address your issue of the library. If you hold down shift, you can select your library on your external drive. It will be a file with an .itl extension. The folder name will be your external drive.
    I go into edit > preferences > advanced and set my library to the correct location. Make sure you check the box "Copy to iTunes Folder when importing" (or whatever it says).
    You can't fix the issue of iTunes not seeing the media if your drive is unplugged unless you physically move the content to your OS HDD...Or any other HDD you use.

  • How can I take an item from one image and move it to another image?

    How can I take an item from one image and add it to another image, and rotate it to fit?

    Carefully select the objects of interest in one image and then copy, scale and position them into the other image. Then touch up the composite.
    Have to Love Photoshop for Retouching Images!

  • How can I write new objects to the existing file with already written objec

    Hi,
    I've got a problem in my app.
    Namely, my app stores data as objects written to the files. Everything is OK, when I write some data (objects of a class defined by me) to the file (by using writeObject method from ObjectOutputStream) and then I'm reading it sequencially by the corresponding readObject method (from ObjectInputStream).
    Problems start when I add new objects to the already existing file (to the end of this file). Then, when I'm trying to read newly written data, I get an exception:
    java.io.StreamCorruptedException
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    Is there any method to avoid corrupting the stream? Maybe it is a silly problem, but I really can't cope with it! How can I write new objects to the existing file with already written objects?
    If anyone of you know something about this issue, please help!
    Jai

    Here is a piece of sample codes. You can save the bytes read from the object by invoking save(byte[] b), and load the last inserted object by invoking load.
    * Created on 2004-12-23
    package com.cpic.msgbus.monitor.util.cachequeue;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    * @author elgs This is a very high performance implemention of Cache.
    public class StackCache implements Cache
        protected long             seed    = 0;
        protected RandomAccessFile raf;
        protected int              count;
        protected String           cacheDeviceName;
        protected Adapter          adapter;
        protected long             pointer = 0;
        protected File             f;
        public StackCache(String name) throws IOException
            cacheDeviceName = name;
            f = new File(Const.cacheHome + name);
            raf = new RandomAccessFile(f, "rw");
            if (raf.length() == 0)
                raf.writeLong(0L);
         * Whne the cache file is getting large in size and may there be fragments,
         * we should do a shrink.
        public synchronized void shrink() throws IOException
            int BUF = 8192;
            long pointer = getPointer();
            long size = pointer + 4;
            File temp = new File(Const.cacheHome + getCacheDeviceName() + ".shrink");
            FileInputStream in = new FileInputStream(f);
            FileOutputStream out = new FileOutputStream(temp);
            byte[] buf = new byte[BUF];
            long runs = size / BUF;
            int mode = (int) size % BUF;
            for (long l = 0; l < runs; ++l)
                in.read(buf);
                out.write(buf);
            in.read(buf, 0, mode);
            out.write(buf, 0, mode);
            out.flush();
            out.close();
            in.close();
            raf.close();
            f.delete();
            temp.renameTo(f);
            raf = new RandomAccessFile(f, "rw");
        private synchronized long getPointer() throws IOException
            long l = raf.getFilePointer();
            raf.seek(0);
            long pointer = raf.readLong();
            raf.seek(l);
            return pointer < 8 ? 4 : pointer;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#load()
        public synchronized byte[] load() throws IOException
            pointer = getPointer();
            if (pointer < 8)
                return null;
            raf.seek(pointer);
            int length = raf.readInt();
            pointer = pointer - length - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            byte[] b = new byte[length];
            raf.seek(pointer + 4);
            raf.read(b);
            --count;
            return b;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#save(byte[])
        public synchronized void save(byte[] b) throws IOException
            pointer = getPointer();
            int length = b.length;
            pointer += 4;
            raf.seek(pointer);
            raf.write(b);
            raf.writeInt(length);
            pointer = raf.getFilePointer() - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            ++count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCachedObjectsCount()
        public synchronized int getCachedObjectsCount()
            return count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCacheDeviceName()
        public String getCacheDeviceName()
            return cacheDeviceName;
    }

Maybe you are looking for

  • Urgent Help no sound

    Urgent Help required G4 power book latest IMove 6 updated etc Started to edit an existing project to day, but cant here any of my imported audio, blue boxes ticked etc. Quit the project, ran disk utilities no problems restarted still no Audio. Opened

  • Single Sign-On for OS X 10.8 Server/AD

    Hi All - I know that in OS 10.7 Server it was possible to bind my Mac Mini running Lion Server to an AD Domain Controller, set up Open Directory and then Kerberize the Open Directory Master in order to give Mac clients single sign-on access to resour

  • Converting flac films into iTunes format ?

    I have a series of films that are in flac format, and wish to put them into iTunes and on my iPad. I have searched on other forums but all of the converters are only for music (flac into mp3). Is there a free converter to put flac into mp4 or another

  • 11G upgrade exam - can someone answer this question

    The study guide I have says the answer is "C"... isnt the answer "D". How does this guy get the resolve privilege? confused??? Evaluate the following block of code: BEGIN DBMS_NETWORK_ACL_ADMIN.CREATE_ACL ( acl => 'mycompany-com-permissions.xml', pri

  • Complex select query

    Hi again! Now here's another question... I need to make a request to find which rep gave the most rebates to his clients. The tables goes as such REP *(rep_num*, last name, first name, etc..) <--- CUSTOMER (*customer_num*, last name, first name, rep_