How to change the image into byte and byte array into image

now i am developing one project. i want change the image into byte array and then byte array into image.

FileInputStream is = new FileInputStream(file);
byte[] result = IOUtils.toByteArray(is);
with apache common IO lib

Similar Messages

  • How to change the Default login script and the USER login script in Netware3.12

    I need to cut down the disk map from Neware 3.12 in Win98 client's PC.
    please tell me
    how to change the Default login script and the USER login script in
    Netware3.12 ?
    Or is there any other ways to do this thing?
    Thanks a lot!

    On 4/6/2006 [email protected] wrote:
    > how to change the Default login script and the USER login script in
    > Netware3.12 ?
    Please repost in the discontinued.forums.
    Edison Ortiz
    Novell Product Support Forum SysOp
    (No Email Support, Thanks !)

  • How to change the icon of JOptionPane and JFileChooser in swing

    Hi,
    Does any body know how to change the icon of JOptionPane and JFileChooser in swing.
    Please help me out in this.
    Thanx in advance.

    Try this
    import javax.swing.*;
    import java.awt.event.*;
    public class Untitled4 {
      public Untitled4() {
      public static void main(String[] args) {
        ImageIcon i = new ImageIcon("C:/TestTree/closed.gif");
        JOptionPane p = new JOptionPane();
        p.setMessage("This JOptionPane has my icon");
        p.setMessageType(JOptionPane.QUESTION_MESSAGE);
        p.setOptionType(JOptionPane.YES_NO_CANCEL_OPTION);
        final JDialog d = p.createDialog("test");
        d.setIconImage(i.getImage());
        d.setVisible(true);
        d.setModal(true);
        if(Integer.parseInt(p.getValue().toString()) == JOptionPane.YES_OPTION) {
            System.out.println("You Clicked Yes");
    }

  • How to change the ESS objects, iViews and Pages, translation in the portal?

    Hello everyone,
    I'd like to change the standard SAP translation for iView and Pages in the Portal level. Does anybody knows how to do this?
    My landscape is NW2004s and  ESS  for  ECC 6.0
    Regards
    Luciano

    you can change the standard SAP iViews and Pages using the Portal Content Translation feature of the Portal ( go to Content Administration->Portal Content Translation. Follow the instructions at
    http://help.sap.com/saphelp_nw04/helpdata/en/25/08174082fe1961e10000000a155106/frameset.htm
    all ESS iviews and pages have their content "ready for translation" and you can use the instructions above to translate that content.
    Tiberiu
    please award points if response was useful.

  • How to change the name / IP address and domain name for BOE Server

    Hello,
    We want to change the name / IP address and domain name for BOE Server, please could you indicate the steps or procedure to follow?
    I need your help
    thank you

    If it's 3.1 just change them, shouldn't cause any issues if by domain name you are referring to changing the domain the computer belongs to. If you are changing your domain for AD authentication then you will may have to take quite a few steps if the old domain is going away. Let us know.
    Regards,
    Tim

  • How to change the color of same coloured sections of an image according to the colorpicker..?

    Hi.. How r u all..?
    I'm doing a small program to change the color of those sections of an image which are having the same color, according to the color selected from the colorpicker..
    Say we have selected a color from the colorpicker, and then the mouseclick event on the image changes the color of those parts in the image which are having the same color as the clicked portion (or pixel) to the selected color.. If we've selected FF0000 from the colorpicker, then clicked on 3300CC coloured pixel in the image. This should change the color of all the 3300CC coloured pixels in the image..
    I've a colorpicker [colpickr] and a movieclip [mc] of the image on the stage. I created a bitmap of that same same image (imag1) using code. Selecting the color from the colorpicker and a mouse click on the movieclip (here I used getPixel) will change that color in the bitmap to the selected color (with setPixel). So here I've two images; one is a movieclip (inorder to add listener for click event) and one is a bitmap (inorder to set the property setPixel). But I need only a single image.
    Please help me regarding this.. Given below is my (horrible) code..
    import flash.events.MouseEvent;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.net.URLRequest;
    import flash.display.Loader;
    var c = 0;
    var myBitmapData:BitmapData;
    var bm:Bitmap;
    colpickr.selectedColor = 0xffffff;
    var preLoader;
    var urlReq;
    var preloader_img:MovieClip;
    preLoader =new Loader();
    preLoader.unloadAndStop();
    urlReq = new URLRequest("imag1.jpg"); // i've selected the same image as that of movieclip mc
    preLoader.load(urlReq);
    preLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,preLoaderComplete);
    //creates a bitmap image of mc..
    function preLoaderComplete(loadEvent:Event) {
        myBitmapData = new BitmapData(mc.width,mc.height);
        myBitmapData.draw(mc);
        bm = new Bitmap(myBitmapData);
        addChild(bm);
        bm.width = mc.width;
        bm.height = mc.height;
    mc.addEventListener(MouseEvent.CLICK, _onMouseClick);
    //gets the color of mc and sets the color to bitmap
    function _onMouseClick(event:MouseEvent):void {
        var myColor:uint = myBitmapData.getPixel(mc.mouseX,mc.mouseY);
        c = myColor.toString(16);
        for (var i=0; i<bm.width; i++) {
            for (var j=0; j<bm.height; j++) {
                if (myBitmapData.getPixel(i,j).toString(16) == c) {
                    myBitmapData.setPixel(i,j,colpickr.selectedColor);

    try this:
    import flash.events.MouseEvent;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.net.URLRequest;
    import flash.display.Loader;
    var c=0;
    var myBitmapData:BitmapData;
    var bm:Bitmap;
    colpickr.selectedColor=0xffffff;
    var preLoader;
    var urlReq;
    var preloader_img:MovieClip;
    preLoader =new Loader();
    preLoader.unloadAndStop();
    urlReq=new URLRequest("z_bitmaps/image1.jpg");// i've selected the same image as that of movieclip mc
    preLoader.load(urlReq);
    preLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,preLoaderComplete);
    //creates a bitmap image of mc..;
    function preLoaderComplete(loadEvent:Event) {
        bm = Bitmap(loadEvent.target.loader.content);
        addChild(bm);
    stage.addEventListener(MouseEvent.CLICK, f);
    function f(e:MouseEvent):void{
        if(bm.hitTestPoint(mouseX,mouseY) && !colpickr.hitTestPoint(mouseX,mouseY)){
            _onMouseClick(e);
    //gets the color of mc and sets the color to bitmap
    function _onMouseClick(event:MouseEvent):void {
        c=bm.bitmapData.getPixel(bm.mouseX,bm.mouseY);
        for (var i=0; i<bm.width; i++) {
            for (var j=0; j<bm.height; j++) {
                if (bm.bitmapData.getPixel(i,j)==c) {
                    bm.bitmapData.setPixel(i,j,colpickr.selectedColor);

  • How to change the main work center and  work center of each operation when generating work order by maintenance plan

    Dear experts,
    I face a problem that system get main work center from equipment master data as a default main work center in maintenance plan when creating maintenance plan. however, if main work center in equipment is changed later, the change will not synchronize to related maintenance plan. if work order is generated from maintenance plan, main work order in order is defaulted from maintenance plan instead of updated work center in equipment.
    another problem is that, for those orders generated by maintenance plan, the work centers in  operations is defaulted from task list in maintenance plan. in most case, work center in task list is dummy. Actually the work is done by work center in equipment master data.
    My expectation is how to auto replace the main work center and work center of operations in work order with the one in equipment master data if order is generated by maintenance plan? is there any standard configuration or enhancement/BADi that can help with this requirement?
    thanks!
    Wesley

    Wesley,
    Sorry - development is the only way.
    Another option is to create a batch program that runs before your IP30 run(s) and updates any maintenance items and task lists with the correct work centres.
    PeteA

  • How to change the font on headers and footers for printer HP Photosmart 6510

    How can I change the size and font style of the headers and footers on my  HP Photosmart 6510 e-All-in-One Printer series - B211  

    Hi friend,
    it's a really really strange tip... May be it's a Forms bug? I've tried with set_item_property..and.. you're right, it doesn't work..
    So.. you can try making this:
    - create a visual attribute with an specific font size....
    - use the
    SET_ITEM_INSTANCE_PROPERTY('block.item',CURRENT_RECORD,VISUAL_ATTRIBUTE,'you_visual_attribute');
    and call it from psot-change....
    It works
    Hope it helps,
    Jose.

  • How to change the color of circles and lines in Acrobat DC

    I'm using the Add Circle and Add Line tools in the Fill & Sign tool set to add markups to a PDF. Is it possible for me to change the color of these tools from the default Black to something else?

    Hi kevh,
    Currently, there is no way to change the properties for the Add Line and Add Circle tools.
    Best,
    Sara

  • How to change the effect of drag and drop from MOVE to COPY in alv tree.

    Hi,
    I am using a tool in which now the behaviour on drag and drop is MOVE. I want to change it to COPY.
    But I do not know which parameter needs to be set and where.
    please help.
    Regards,
    Smita.

    Hi,
    Thanks for quick reply.
    The code goes on like this
    METHOD set_dd_behavior.
      DATA: l_copysrc(1) TYPE c,
            l_movesrc(1) TYPE c,
            l_droptarget(1) TYPE c.
    Set the Drag and Drop Flavors.
      CREATE OBJECT dd_behavior.
      READ TABLE reg_functions WITH KEY name_function = 'COPY'
      TRANSPORTING NO FIELDS.
      IF sy-subrc = 0.
        l_copysrc = 'X' .
      ENDIF.
      READ TABLE reg_functions WITH KEY name_function = 'CUT'
      TRANSPORTING NO FIELDS.
      IF sy-subrc = 0.
        l_movesrc = 'X' .
      ENDIF.
      READ TABLE reg_functions WITH KEY name_function = 'PASTE'
      TRANSPORTING NO FIELDS.
      IF sy-subrc = 0.
        l_droptarget = 'X' .
      ENDIF.
      CALL METHOD dd_behavior->add
      EXPORTING
      flavor = 'MOVE'
      dragsrc = l_movesrc
      droptarget = l_droptarget
      effect = cl_dragdrop=>move.
      CALL METHOD dd_behavior->add
      EXPORTING
      flavor = 'COPY'
      dragsrc = l_copysrc
      droptarget = l_droptarget
      effect = cl_dragdrop=>copy.
      CALL METHOD dd_behavior->get_handle
      IMPORTING handle = dd_behavior_handle.
    ENDMETHOD.
    Here what changes needs to be done.
    As I see once COPY is added and next time MOVE is added.
    I am able to check because I am not able to edit while debugging the value of effect.
    Please suggest.
    Warm regards,
    Smita.

  • How to change the java control panel and the default java in windows.

    Hi,
    Please help on the above problem. I need the answer urgently.
    I have two java version 1.4 and 1.5. I first installed the java version 1.4.2_06 and then 1.5.0_19.Now the default java is 1.5.
    Now I want to chang the java settings to 1.4 by changing the envioronment variable (classpath,path,java_home)
    C:\Program Files\Java\jdk1.5.0_09;C:\j2sdk1.4.2_06
    C:\Program Files\Java\jdk1.5.0_09\lib;C:\j2sdk1.4.2_06\bin
    C:\Program Files\Java\jdk1.5.0_09\bin;C:\j2sdk1.4.2_06\bin
    But after setting these does not solve the problem. The java control panel which appears is the same what was appearing for java 1.5.
    I want to see the control panel for 1.4.2_06.
    Thanks for your help.
    Regards,
    Sarita

    sarita2320 wrote:
    ..Please help on the above problem. I need the answer urgently. ...Is it still urgent?
    When I opened your post and saw that line, I immediately moved it to the 'last in line' of a whole bunch of other stuff I did not have time to look at immediately. Now that all that other stuff that did not bore me with someone else's time constraints is out of the way/taken care of, I've returned to your post.

  • How to change the Validator's colour and thickness?

    Hi,
    I am using a custom skin for my TextInput and a Combobox component. I am also validating these two using StringValidator and checking if they are empty. If validation fails, it generally shows up a thin red line on it's border. But since, I am using custom skin, this red thin border is not shown up at all. If I remove the skin in my css file, it works fine.
    I was wondering, it would be visible if I increase the thickness of that thin red line, when validation fails. How can I do so? Also, is there a way to change that colour from red to something else? Any overrrides for it pls?
    Screenshots for your reference:
    TexInput without the custom skin style, which works fine:
    TextInput with the custom skin, whcih does not show up the thin red line:
    ComboBox without custom skin, which works fine:
    ComboBox with the custom skin, whcih does not show up the thin red line as the border:
    -Deepak

    Hi,
    You can change color of error border by using errorColor style:
    <mx:ComboBox errorColor="#00FF00"/>
    or in actionscript using setStyle().
    If you want to use your own skin the error border will not be visible because it will be overriden by your skin
    I think you have at least 2 options to solve this problem:
    1. Extend ComboBox and create new style for "errorSkin", handle the style change and create errorSkin programmatically or in Illustrator/Photoshop.
    2. User Flex 4 and its new skinning capabilities.
    Regards,
    Adrian Wiecek

  • How to change the text of Terms and Condition of PO.

    I have given an task to add some text to the current TERMS and CONDITIONS (T&C) of a PO. Idea is to decrease the size of fonts also as after adding the new paragraph, the T&C itself will print on 2 pages. So decrease in font size is needed to fit the T&C on one page.
    Kindly tell me how I can add text to T&C of PO and also decreasing the size of fonts
    Thanks,
    mini

    yes SO10 wont ask for the CTS.
    Please follow this steps.
    Run the report RSTXSCRP
    Please fill the selection screen.
    the name of the text should be in this fiels, Text key - name
    Hit execute
    The required should be selected and hit enter
    Push the push button on the top left - Trsfr texts to corr
    It will ask for a request.
    You will get the CTS and then move ahead.
    Shreekant

  • How to change the path for Home and Work in SQL Developer

    Hi,
    I am new to Oracle SQL Developer. Everytime when I open a file, it will default to the install directory. It is hurtingmy hand because I have to click back to the folder where I put my sql statements.
    Is there any way to set the Home or Work button to point to the location I like? or add anther button to point to my folder? I just don't want to click 5 to 10 times to open a file.

    SQL Developer (the SQL Developer forum) might be a better place to ask

  • How to change the default look and feel

    Hi.
    Does anyone knows how to change the default Caspian look and feel to, for example, Nimbus ?
    Or the skin feature turns look and feel setting, as We know in java, unnecessary in javafx ?
    I´m using javafx 1.2.
    Cheers

    Canspian is not a look&feel, it's a skin.
    Look&feel only change the SwingComponent,
    regards.

  • How to change the Arabic calendar display

    How to change the calendar display from Arabic to english

    Go into Settings > General > International and make sure that Calendar Format is set 'Gregorian' and also that Region Format is set to an English-speaking country e.g. UK, USA

Maybe you are looking for

  • Free goods item with mixed material

    I have a requirement in Free goods When the customer place a material  X  we are offering the  A, B or C material as free good item If the (A) material item category group in material master is (NORM) it will be determined as a free good If the Mater

  • Not able to Post PodCast Photo icon and description on iTune page...

    I Have been working hard and reading everything, Yet I have not been able to understand how to post my _photo icon_ and the description for my podcast page. I am working with Garage Band and iWeb '09. The photo shows up if you click on the podcast, b

  • Accessing value of a textfield mapped to an infobus column

    I am attempting to access the text value of a textfield mapped to an Infobus column. In this instance, I am trying to get an account type from the appropriate textfield to pass it to a new query. I have tried using getText - this returns a string of

  • I can't turn off sound alerts for mail arrival

    I have Mail in Lion configured to not play a sound when mail arrives. However, recently a sound started playing. It's still turned off in the config. I suspect a bug in a recent update to Lion. Has anyone else noticed this?

  • Can I access work's windows network from home mac?

    Can I use my Mac G4 running OS X Tiger to remote connect to my work pc running XP?