Remove extra white space from an image

I want to remove the extra white space in my image while writing it into a jpeg file using JPEGImageEncoder.
Any help is welcome .

ok.. Am having a JPanel whose width is set to 77000. But almost 60% of right hand side of the Panel is empty. I will create a BufferedImage from this component and then write it into a file using JPEGImageEncoder.
The empty portion of the panel is coming as a white space in the image.
Now how to remove this ? Was that clear enough ?

Similar Messages

  • How do I remove the white space from the bottom and side of my document?

    How do I remove the white space from the bottom and side of my document? (I'm not talking about printing, just viewing it on the screen.) There are about 6 inches of white space at the bottom and at the right hand side. I don't like this. On a blank new spreadsheet it's triple that amount of white space.

    The infinite canvas convention doesn't make a lot of sense for Numbers. When I'm viewing a spreadsheet and mistakenly scroll into white, empty space I think, "this is ridiculous - all of my content is fits on one screen. there's nothing over there."
    A (relatively) infinite canvas is logical for Microsft Excel because it's one big table. There are 256(?) columns by default and hundreds of rows on a sheet - there are cells outside what a user is looking at to see. However, when viewing a Numbers spreadsheet with a single 10 column 10 row table that fits on the screen, there's nothing else on it to scroll to.
    Numbers should distinguish between viewing a spreadsheet and editing one. When I'm just viewing, when there's no content outside the window it shouldn't scroll there. This window behavior is beyond annoying for Numbers on my iPad and iPhone.
    (Adding user-defined canvas size setting to my view mode / edit mode thinking would probably be the most complete solution to this now that I think about it.)
    Until now the way scrolling worked in Numbers has defied logic. Actually it still does lol. That said, thank you Yellowbox for providing a clear explanation. Much appreciated.

  • How do I remove extra white spaces in a string?

    How do I remove extra white spaces in a string?
    trim() removes before and after spaces.
    If I have a string "This is Test"
    I want to remove extra spaces between words and also I want to keep SINGLE space
    between words. So output should be "This is Test". Thanks.

    replaceAll dosen't support with my version. Actually this works..............!!!!!!!!! Thank you.
                        java.util.StringTokenizer st = new java.util.StringTokenizer(brn, " \t");
                        StringBuffer buf = new StringBuffer();
                        while (st.hasMoreTokens()) {
                             buf.append(" ").append(st.nextToken());
                        String brn1 = buf.toString().trim();

  • How to extract ALL text on a line, including extra white space, from PDF?

    I have written my first scripts to parse thru PDF files and successfully locate the beginning and ending of text portions that I wish to copy/extract.  For example, one of the scripts reads thru PDF files and locates patterns that allow me to copy/extract a lengthy Title that spans several lines on the page.  My remaining problem is that sometimes the text I wish to copy/extract has tabs or lots of white space between the words, and I need to retain ALL the "white space" between words.  Basically, I am successful at using getPageNthWord(j, i, false) along with "Quad coordinate sets" to get a word-at-a-time for all the words on the multiple lines but it seems to be skipping over the tabs and extra white spacing beetween the words.   Another way to say this is that I need to extract/copy a full line at a time, including all white space, instead of being limited to just a word at a time. 
    Can anyone help me with an algorithm to extract/copy text, not just the words but also including tabs and other extra white space characters? Is there some type of Regular Expression I should be using, or maybe some additional parameter used for getPageNthWord that would retain all the extra white space?
    Thanks in advance,
    Ted L

    Did you try setting the bStrip parameter of getPageNthWord to false? It will
    preserve some of the whitespace, but not all of it.
    As far as I know, that's the only way to do it via a script.

  • How to remove extra blank spaces from log file.

    i have created a log file which contain the logs of a program. the logs are getting created fine for the first execution of the program but from the second time the log file is getting blank space's after every character.
    i have used the code to append the text in log files few examples : 
     'Clean up process started....' >> $log
    File name :'+ $files +'Time-Stamp: '+ $endtime +'Search complete.' >> $log 
    .i want to remove the extra spaces after each character but not all the spaces from the file. Thanks in advance.

    hi  mjolinor
    add-content is used to insert text it does not append text at the file .i used >> to append the text on log file ..
    from 
    Get-Help ADd-Content
    Synopsis
    Appends content, such as words or data, to a file.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Stripping extra white space from a string

    I am trying to strip extra spaces from a string, so it there are 2 or more spaces between a word I want to remove all but one. I am trying the following code
    getStringTwo().replaceAll("/\s+/is","");
    but all I get is an error saying Invalid escape sequence
    Thanks
    G

    >
    This strips out all the whitespace. I ended up
    getting round it by walking through the string and
    checking the values of each char and comparing that
    to the next value. What a wast of effortt A small modification of my earlier post gives -
    public class Test040320a
        public static void main(String[] args)
            String str = "this    is       a \t test";
            str = str.replaceAll("\\s+"," ");
            System.out.println(str);
    }

  • Extra White Space from Hidden Menu Bar

    This seems to be a problem introduced by LV 2013. I have a VI that runs with the menu bar hidden. When I hit ctrl-m to see how it looks in run mode, it looks fine. When I run the VI, instead of fully hiding the menu bar, it leaves white space. This only seems to be a problem when the VI is the top level. When the VI is opened from another VI, it looks fine. I've attached screenshots when the VI is running as a top level, ctrl-m is used and running when launched from another VI. This was not an issue in LV 2012. It's only been a problem since switching to 2013.
    Solved!
    Go to Solution.
    Attachments:
    Settings Screen Running Dev.png ‏86 KB
    Settings Screen CTRL-m.png ‏84 KB
    Setting Screen - Launch as SubVI.PNG ‏107 KB

    Greetings thutch79,
    I replicated the settings shown at Window Appearance Dialog.png on a new VI, ran it, and did not reproduce the problem.
    I wonder if you experience the same behavior with a new VI? If not, you can copy paste the code to a new VI to fix a potential corruption issue.
    Regards,
    Alejandro | Academic Program Engineer | National Instruments
    Attachments:
    Window Appearance.JPG ‏119 KB
    Running VI.JPG ‏21 KB

  • How do I remove a white outline from an image

    I have created a logo in photoshop using text and original drawing. I keep getting a white line around each letter and drawing in dreamweaver. I then saved it as a jpeg and it still comes up with the same problem. In photoshop and/or fireworks it does not show a white line yet in dreamweaver it does no matter what I save it as PSD, EPS, GIF or JPEG. It also shows up in the "show in bowser button" in dreamweaver." As soon as I "save for web" it creates a white border. I also see two white dots at randon points in the image. I have tried numerous times to erase these randon points and border to no avail. I also created my own web buttons and do not have this problem.
    Can you please help we with this? I cannot try it on a live website because I do not have an active site yet. I am new to this and trying to build my own webpage.
    Thank you, any assistance will be greatly appreciated.

    Use the camera icon in the forum to paste your image into a reply.
    It could be artifacts in the native image, open it in Photoshop and hit Ctrl+++++ to zoom in on it.
    Or it may be the default browser borders on linked images.  To remove borders from all linked images add this line of code to your CSS.
    a img {border:none}
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Conditional Build Tab for image leaves extra white space

    I've applied the "Print" Conditional Build Tag to an image in
    my online help. When I generate the help and view it in the
    browser, extra white space is inserted between the steps. For
    example, instead of the steps being:
    1.
    2.
    3. etc.
    They now look like this:
    1.
    2.
    3. etc.
    Why is there extra white space where the image used to be?
    Thanks in advance for your help. Using RoboHelp7 -- WebHelp.
    Bill

    Probably there is a paragraph break or a space that you can't
    see but is not enclosed in the conditional tag.
    Check the html code immediately before and after the tag.
    Harvey

  • How do I remove a white background from a photo of a watercolour painting.

    How do I remove a white background from an image of a botanical watercolour painting?

    Is the logo in a pixel layer surrounded by white?
    You could make it a layer if it isn't already, then use the Layer Style dialog and set the Blend If parameter so that it will make light colors transparent...
    You can composite it into a web page with transparency by saving it as a PNG file, as JJMack has noted.
    -Noel

  • How to remove the white space that is now above the main images on each page?

    http://www.nydogworks.net
    Hello,
    I took over updating some things on my site from my web designer. The main images on each page used to be flush with the navigation bar on each page. Now there is a white space in between each one. Can you tell me how to remove the white space?
    <div id="container">
    <div id="imgholder"><img src="images/feature-aboutus.jpg" width="951" height="341" alt="" />
    </div>
    <div id="pageContentNoside">
       <div id="sideSub">
         <form action="form.php" method="post" name="form2" id="form2"> <table width="250" border="0" cellpadding="2" cellspacing="2">
           <tr>
             <td width="273"><h2>Quick Contact</h2></td>
             </tr>
           <tr>
             <td class="mainContent">Your Name</td>
             </tr>
           <tr>
             <td><span class="style9">
               <input name="forname" type="text" class="colorfieldssmall" id="forname" size="20" />
               </span></td>
             </tr>
           <tr>
             <td class="mainContent">Your Email Address* (required)</td>
             </tr>
           <tr>
             <td><span class="style7 style9">
               <input name="admail" type="text" class="colorfieldssmall" id="admail" size="25" />
               </span></td>
             </tr>
           <tr>
             <td class="mainContent">Phone Number</td>
             </tr>
           <tr>
             <td><span class="style7 style9">
               <input name="phone" type="text" class="colorfieldssmall" id="phone" />
               </span></td>
             </tr>
           <tr>
             <td><span class="mainContent">Type of Dog Training</span></td>
             </tr>
           <tr>
             <td class="mainContent"><span class="style9">
               <select name="need" class="colorfieldssmall" id="need">
                 <option value="select one">select one</option>
                 <option value="Basic Obedience">Basic Obedience</option>
                 <option value="Behavior Therapy">Behavior Therapy</option>
                 <option value="Board and Train">Board and Train</option>
                 <option value="Off Leash Training">Off Leash Training</option>
                 <option value="Puppy Training">Puppy Training</option>
                 </select>
               </span></td>
             </tr>
           <tr>
             <td> </td>
             </tr>
           <tr>
             <td><div align="left">
               <input type="submit" name="submit" id="submit"  value="Submit" />
               </div>
               </td>
             </tr>
           </table></form>
         <h2><br />
           Dog Training Services<br />
           </h2>
         <ul id="subnav">
           <li><a href="basic-obedience.html">Basic Obedience</a></li>
           <li><a href="dog-behavior-therapy.html">Behavior Therapy</a></li>
           <li><a href="board-and-train-dog-program.html">Board & Train Program</a></li>
           <li><a href="off-leash-training.html">Off Leash Training</a></li>
           <li><a href="puppy-training-program.html">Puppy Training</a></li>
           </ul>
         <br />
         <br />
         <br />
         </div>
      <div id="suggestPost"><a href="https://www.facebook.com/pages/NYDogWorks/219268038151244?fref=ts" ></a></div>
       <div id="mainContent">
         <h1 class="copyrightType">About NY DogWorks</h1><br />
         <h2> <span class="testimonal">The Owner of NYDogWorks</span>      </h2>
         <p><span class="copyrightType"><img src="images/dogpic.jpg" alt="Dog Behavior Therapy" width="183" height="275" class="h_img_float_right" /></span><strong>NYDogWorks L.L.C. is owned and operated by Master Certified Dog Trainer and Behavior Specialist Brian DeMartino. </strong><br />
           <br />
           His training is hands down the best out there. He has become one of the most sought after dog trainers throughout Long Island, Manhattan, &amp; New York.<br />
           <br />
           With over 15 years experience training and rehabilitating some of the toughest cases of dog behaviors. He’s Mastered the Art of teaching top knotch obedience and manners with outstanding results and has developed the most full proof and guaranteed system to fully housebreak any puppy or dog in the shortest amount of time.<br />
           <br />
           He is Certified in dog training and dog behavior and is an Official Evaluator for the American Kennel Club’s (C.G.C) Program.<br />
           <br />
           <br />
           <strong>All About NYDogWorks</strong><br />
           </p>
      <p><br />
      </p>
         <p>NYDogWorks Dog Education, is a Professional Dog Training Company offering dog training for puppies and older dogs through customized in-home training programs by Master Certified Trainers in Nassau County, Suffolk County, Hamptons, Long Island, Manhattan, Brooklyn, Bronx, Queens, Rockland County, Westchester County, Orange County, and Bergen County New Jersey. NYDogWorks offers obedience training, Housebreaking, Manners, socialization for your dog,  Puppy Training and Education, Behavior Therapy, Trick Training, Agility, Complete Off Leash Training, Sport Work, and Personal Protection Training. <br />
           <br />
           <strong><br />
             NYDogWorks Boarding &amp; Training Programs</strong><br />
           </p>
      <p><br />
        We offer boarding and training programs done in the home of owner, Brian DeMartino. This is a customized 2-6 week program to suit your dog's needs, great for someone who feels they do not have the time or patience to train or rehabilitate their dog at their home. This is a 100% guaranteed program. Your dog will stay with us for no additional charge if we feel that he or she has not learned all that was agreed upon. We guarantee that if there is any regression within 3 months of your dog being back home with you, he/she will come back to us for no additional charge.<br />
        <br />
        <a href="board-and-train-dog-program.html">View Boarding &amp; Training Programs</a></p>
         <p><br />
           </p>
         <p><br />
           <br />
      </div>
       <div id="breadCrumbs">
         <p><a href="index.html">Home</a> &gt;  NY DogWorks - About Certified Dog Trainer Brian DeMartino<br />
           <strong>Serving all of Long Island, Nassau &amp; Suffolk County, Manhattan, Brooklyn &amp; Queens</strong></p>
         </div>
    </div>
        <div id="footer">
          <div id="footermenu">
          <div id="footermenu1">
          </div>
        </div>
       <div class="phoneNumber" id="copyright"> Copyright © 2014  NY DogWorks</div>
         <div class="websiteDesign" id="sitedesigner">Long Island Website Design by <a href="http://www.wetribet.com" title="Wet Ribet" target="_blank" class="medlink">Wet Ribet</a>     </div>
    </div>
    </div>

    You should be able to add the following snippets of css to your stylesheet to fix that.
    In the mainstyle.css file, change...
    #imgholder {
    width: 950px;
    margin-top: 0px;
    padding: 0px;
    margin-right: auto;
    margin-left: auto;
    to
    #imgholder {
    width: 950px;
    margin-top: 0px;
    padding: 0px;
    margin-right: auto;
    margin-left: auto;
    overflow:hidden;

  • When Importing Images, How Do I Remove The White Space Around The Corners?

    When Importing Images, How Do I Remove The White Space Around
    The Corners?

    u may use magic wand (and magic wand setting) from Lasson
    Tool to select and delete that white space, but u must break a part
    to the picture first.

  • How do I remove the white space when importing a site from Flash?

    Okay, so I've dragged and dropped my created Flash site into Dreamweaver. One problem though, when I view it in a web browser (any web browser), it displays the site fine, however with a huge white space to the side of it. You'll see what I mean in this screenshot:
    What can I do then to remove that white space and make the site fill up the whole web browser? I've tried resizing it using a number of ways, but cannot seem to get it right.
    Thanks.

    function(){return A.apply(null,[this].concat($A(arguments)))}
    What can I do then to remove that white space and make the site fill up the whole web browser? I've tried resizing it using a number of ways, but cannot seem to get it right.
    You can do two things:
    1) Change the width of the container to 100%;  OR
    2) Post a link to your test page here (not the code nor picture) so that we can see ourselves what your code looks like.
    hth

  • Extra white space in Firefox, not IE

    Hello. I'm new to Dreamweaver and am having an issue I can't
    figure out. I was hoping someone might have insight into where my
    problem is.
    In the following site,
    http://www.firststepshr.biz,
    it previews as designed in Internet Explorer. However, in Firefox,
    extra white space (or blue background on the home page) is
    appearing above and below the Flash header. I can't, for the life
    of me, figure out why there's this difference.
    Anyone have any ideas? Thanks, in advance, for the advice.
    Jeremy

    I don't see extra white space in FF2x.
    If you want to use Flash for navigation, consider this -
    1. Some people don't have Flash installed - what do they do?
    2. Search engines may not parse Flash links - your site will
    not be
    spidered
    3. Screen assistive devices don't parse Flash links - what
    will those users
    do?
    4. DW cannot maintain links within a Flash movie, so if you
    move or rename
    a linked file, your navigation will break - what will you do?
    You will have
    to remake those buttons.
    It's usually a very bad idea for these reasons - and for
    these reasons,
    Adobe has removed Flash buttons and Flash text from the next
    version of
    Dreamweaver.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "dwellingproductions" <[email protected]>
    wrote in message
    news:gckfd0$odl$[email protected]..
    > Hello. I'm new to Dreamweaver and am having an issue I
    can't figure out.
    > I
    > was hoping someone might have insight into where my
    problem is.
    >
    > In the following site,
    http://www.firststepshr.biz,
    it previews as
    > designed in
    > Internet Explorer. However, in Firefox, extra white
    space is appearing
    > above
    > and below the Flash header. I can't, for the life of me,
    figure out why
    > there's this difference.
    >
    > Anyone have any ideas? Thanks, in advance, for the
    advice.
    >
    > Jeremy
    >

  • Extra White Space Around Header Graphic & NavBar

    I have a header graphic and Navigation Bar (rollover images)
    positioned inside a table. Unfortunately, there is about 1-2 pixels
    of white space on the left, right, and top of the header graphic.
    Same with the NavBar--there's 1-2 pixels of white space on the
    edges (left & right sides). By default, cell padding for the
    table is set to zero. If cell padding is set to zero, why am I
    seeing white space between the edge of the graphic and the edge of
    the table?
    You can see what I'm referring to here:
    http://newstartinvestment.com
    What is causing this extra white space, and how do I get rid
    of it?

    On 26 Mar 2007 in macromedia.dreamweaver, csbridges wrote:
    > I have a header graphic and Navigation Bar (rollover
    images)
    > positioned inside a table. Unfortunately, there is about
    1-2 pixels
    > of white space on the left, right, and top of the header
    graphic.
    > Same with the NavBar--there's 1-2 pixels of white space
    on the edges
    > (left & right sides). By default, cell padding for
    the table is
    > set to zero. If cell padding is set to zero, why am I
    seeing white
    > space between the edge of the graphic and the edge of
    the table?
    >
    > You can see what I'm referring to here:
    >
    http://newstartinvestment.com
    (Btw, I
    > don't like the yellow rollovers--they'll be removed
    shortly.)
    >
    > What is causing this extra white space, and how do I get
    rid of it?
    Personally, I thought that the white border was a feature,
    but... In
    addition to the cellpadding, add cellspacing:
    <table width="780" border="0" align="center"
    cellpadding="0"
    cellspacing="0" bordercolor="#000000" bgcolor="#FFFFFF">
    Joe Makowiec
    http://makowiec.net/
    Email:
    http://makowiec.net/contact.php

Maybe you are looking for

  • Scheduling agreement delivery schedule for a next month.

    Hi! What are the setting I have to maintain so that delivery schedules are transmitted for particular month not beyond that ? Thanks and regards, Suranjana

  • How do I reinstall jaguar if my dvd drive doesn't work?

    My powerbook g4 will not go past the grey startup screen. I have tried everything to repair it, except for a reinstall due to the fact that my dvd drive is broken. I have run data rescue II from my girlfriends macbook pro and was able to recover the

  • Airport Utility on XP SP3 can't discover Airport Express  BUT IP works

    Airport Utility will not "discover" the airport express device, BUT it can connect to it when I type in the IP address in the "configure other" field. I suspect this is also why I cannot get the remote speakers button on my Itunes 10.1.1.4. Win 7 com

  • Cannot connect locally on android device.

    Hello, I'm using JDeveloper 11.1.2.3. I created a mobile application by which i can access a table from the database. I did this by creating a web service from data controls. I deployed the application to the android emulator. Everything works great

  • MacBook 13" Notebook Cases

    I have looked here as well on other sites for cases. I am looking at getting just a sleeve, I think. I want a case that will protect my new toy for years to come. I wanted to see what others are using and where they got them. I almost bought the blac