How to make a better trace

Using CS5.
I'm trying to take our old (probably) hand-drawn logo and turn it into a smooth vector image.  I've removed most of the color in Photoshop, blurred it a little, and then opened it in Illustrator.  I then did a LiveTrace.  I end up with lettering that is kindof funky looking. I messed around with the different trace options, but noe of them seem to do the trick.  Thetraced sample below is "detailed illustration".  Is there a way to retain the look of the original logo without having to sacrifice a bunch?  I'm VERY new at this, so I may be describing this all wrong.  I've included the photoshop image and the post-live-trace image.
After Trace:
As you can see, there's some weirdness going on in the lettering, for example:the shape of the "S".  How can I make this lettering look "normal"?
Thanks.
-Mike

The answer is what you're probably dreading, if you're new to all this - you must do it yourself. It's pen tool time!
This is a case where filters/effects/automation is only going to hurt your end-result.
Get your best cleaned version on the logo. Put it on a new layer and lock it. You might want to make it partially transparent - I don't like drawing on top of high-contrast images when doing a manual re-draw. All you need to see are the edges/outlines, afterall.
Lock your reference layer.
Draw on a new layer, on top of your logo reference. Take your time. Make it look good. Carefully craft each path, paying attention to each bezier curve.
If you know the font originally used, you might try and use that as a base. Manually warp each letterform correctly to match the logo. Might try a Warp or Mesh Envelope Distort.

Similar Messages

  • How to make sound better quality?

    So I exported a preview of my animation but the sound isn't high quality. How can I make it better quality? It doesn't sound like when I press Enter in Flash CS5.

    Go to the publish preferences and see what bit rate is set for the compression of the audio. Be sure to check both stream and event.

  • Look this image, how to make it better

    Can anyone help me to have a look at this picture? It was captured by the camera, and the camera is connected with NI 1427. The middle of the image is so bright. The gap in the middle can not be recognized. Please give some advices on how to make the image better. There must be something with the hardware setting. What should I need to do with that? Thanks for any help.
    Jane
    Attachments:
    NIR1129000019.zip ‏428 KB

    I assume you need to have the overhead lamp on for testing the solar cell?  If you could turn it off during photos, that would improve your images.  Right now I am guessing you are getting a good reflection of the overhead lamp in the center of your image.  Having diffuse lights (like long flourescent bulbs) in multiple places would greatly improve your image quality.  A general rule in lighting for shiny surfaces is to avoid placing a light where you can see its reflection in the image.  This way you won't get any bright spots in the image.
    If you could even tip the solar cell or camera a little bit so the overhead light is not reflected directly into the camera, that would help.
    It is hard to make recommendations without knowing the limitations.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Found Out Why Reception is Bad and How to Make it Better (BT Required)

    When you hold the Iphone in your hand like the Commercial it actually looses reception because the Antena is on the bottom part of the iPhone, and you hand is blocking the anttena, so if u hold the top portion with two fingers careful not to drop it, it actually keeps better signal and less dropped calls, or when u leave it sitting in you lap or on a couter while on your bluetooth it keeps awsome reception, hope this works for all of you.

    Interesting. I've not found that to be entirely the case.
    I've used a BT handsfree kit in my car for a while and call quality and signal have always been stable, and remain so even if I have the iPhone in my pocket, lap or am holding it.
    I also don't find much difference between holding it as per the ad, or setting it down on my desk. Signal remains at the same level - AND subject to the same fluctuations. Those fluctuations seem rather less pronounced since the 1.0.2 update, but are consistent regardless of how the iPhone is held or positioned. Just to be sure, I placed my iPhone face down on a glass table top, and witnessed the same signal as before when it was in my hand.
    I think this device suffers two directly related issues: that it is less sensitive to signal than many other cellphones operating in the same bands, and that as a result it is more sensitive to even slight variations in those signals. Thus for some, in a strong signal area and with little or nothing to negatively impact signal, holding it almost any way won't change the signal. Others, in less strong signal areas or who suffer potentially interfering issues, will see significant variations in signal or call quality dependent on handling of the device or where it is located.

  • How to make a better Page Up/Page Down keyboard shortcut

    I don't like the standard Fn + Up/Down Arrow shortcut because it requires two hands.  How can I make a new one that can be done with just the right hand (like maybe Alt + Arrow or something)?

    @gooballala - the fn + up / down is the only way I can currently do a page up / page down - that's my issue.  For some reason it actually isn't listed anywhere in the keyboard shortcut settings...
    @SwankPeRFection - is there some setting I need to change to make this work?  As of now, Option + Up/Down does the same thing as Up/Down without Option - a very small scroll.

  • How  to make  Purging better in terms  of performance

    Hi
    I am trying to purge(delete) data from 4 tables on the basis of a flag in the lookup table.
    Now, there are 3 million records to be deleted from each of the 4 tables .
    My piece of code is like this
    for i in(select ids from lookup_table where flag_val='N')
    loop
    delete from table_a where id=i.ids;
    delete from table_b where id=i.ids;
    delete from table_c where id=i.ids;
    delete from table_d where id=i.ids;
    if commit_interval=5000 then
    commit;
    commit_interval:=0;
    end if;
    commit_interval:=commit_interval +1;
    end;
    I am trying to commit for 5000 records.
    its taking a lot of time
    like 10-12 hrs .
    Can anyone solve this issue its urgent .
    regards
    shubh

    Now in your code you have written delete statements for all the four tables. Now convert it to four different procedures each handling only a single table.
    something like this.........
    for i in(select ids from lookup_table where flag_val='N')
    loop
    delete from table_a where id=i.ids;
    if commit_interval=5000 then
    commit;
    commit_interval:=0;
    end if;
    commit_interval:=commit_interval +1;
    end;
    for i in(select ids from lookup_table where flag_val='N')
    loop
    delete from table_b where id=i.ids;
    if commit_interval=5000 then
    commit;
    commit_interval:=0;
    end if;
    commit_interval:=commit_interval +1;
    end;
    Run these procedures simultaneously.... say thru different windows/terminals.
    Since these procedures are running simultaneously, the server efficiency will improve. Also make sure that the server is not used by other users/ less number of users so that max. resources are available for your code.

  • Noisy recording when using adobe audition _ how to make it better

    Hi there,
    I have just downloaded adobe audition cs5 for my recordings. When I record something, I have a noise at the back round which is created by I don`t know what. The computer doesn ot make noise and my room is quite.
    Configuration before recording :
    Primary recording :
    After the amplification :
    [0 to 1.8] ms shows the sounds that has been generated by I don`t know what.
    You can get a wave file "Untitled 1.wav" I made from http://dk0.ti1ca.com/get/27.18.148.125/1m7qm7qh/Untitled%201.wav
    I am using  Windows XP sp3
    Thanks for your help.

    @topomorto   Please find below the snaps you asked for.  
    Here is another test I have just done : http://dk1.ti1ca.com/get/27.18.148.125/2myov2k6/Untitled%201.wav

  • Flickr uploading is a horrible experience. Does anyone have any ideas on how to make it better?

    I am using iPhoto and I amd trying to upload several undred pictures to Flickr at a time.
    The native iPhoto exporter hangs and crashes.
    The Flickr Exporter plugin by ConnectiveFlow does the same.
    The web based importer will also do the same and it can only do 200 pictures at a time.
    I am considering Apeture, but does anyone have better experience with Apeture's native uploader?
    Thanks

    I don't believe there's a solution to that. I don't believe there's a way to upload hundreds at one go. But you could contact Flickr support and see what they suggest.

  • Layout suggestions...how to make it better?

    Hi all,
    Just wondering if anyone might be willing to critique my
    site. Please note that I have not yet begun styling the type, which
    I will do later with CSS. Overall I am happy with my direction but
    it's not quite singing yet...
    http://www.bittybox.com/home.html
    Feedback appreciated.
    Thanks!
    V

    Hi all,
    Just wondering if anyone might be willing to critique my
    site. Please note that I have not yet begun styling the type, which
    I will do later with CSS. Overall I am happy with my direction but
    it's not quite singing yet...
    http://www.bittybox.com/home.html
    Feedback appreciated.
    Thanks!
    V

  • How could I make Siri better?

    On the Siri official page, Apple states that Siri gets better by learning owners' accent.
    Here comes the question: how does Siri get better?
    I mean, once you used Siri and found the words are slighty off from what you actually said.
    Most people might just launch Siri again and re-spoke the sentence again until Siri finally got what they wanted.
    Is Siri able to learn the accent from this action?
    Siri sometimes got wrong on certain names especially they're ones Nickname and probably not even a complete word.
    Then Siri tried to make the whole senetence logical by changing the entire sentence which will result something completely off the original given command.
    Anyone knows how to make Siri better and more personalized?

    I'd suggest:
    1) don't have setNumeratorr and setDenominator methods. Make the numerator and denominator final fields in Rational. That is, make each Rational instance immutable.
    2) Give Rational a constructor that takes two longs. One is the numerator and the other is the denominator. The constructor removes common factors between the two and stores the values in their most reduced form.
    3) The add method can probably be cleaned up give (2).
    4) Don't name the argument to add "object". Of course it's an object. Call it "operand" or even just "other".

  • How can I change the insert SWF File, I need to add a few things and make it better?

    How can I change the insert SWF File, I need to add a few things and make it better? Is there an option inside of the dreamweaver menu that I am not looking at. It would make it easier on me if I changed some things around and didn't have to do it all myself each time I used it. Just incase you was needing to remember what swf flash was, It is not a swf video either.
      <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="640" height="480">
        <param name="movie" value="Sonic Kaboom.swf">
        <param name="quality" value="high">
        <param name="wmode" value="opaque">
        <param name="swfversion" value="9.0.115.0">
        <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
        <param name="expressinstall" value="../Scripts/expressInstall.swf">
        <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
        <!--[if !IE]>-->
        <object type="application/x-shockwave-flash" data="Sonic Kaboom.swf" width="640" height="480">
          <!--<![endif]-->
          <param name="quality" value="high">
          <param name="wmode" value="opaque">
          <param name="swfversion" value="9.0.115.0">
          <param name="expressinstall" value="../Scripts/expressInstall.swf">
          <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
          <div>
            <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
            <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
          </div>
          <!--[if !IE]>-->
        </object>
        <!--<![endif]-->
      </object>
    </div>

    If I understand correctly, Sonic Kaboom.swf needs to be edited in a separate Flash authoring program and then reinserted into your HTML document. 
    As Murray said, Flash is dead.  Nobody uses it anymore.   We use HTML5, CSS3 and JavaScript animations which have universal support from Smartphones, Tablets and other web devices that can't support Flash.   Look at Edge Animate.
    HTML animation | Download free Adobe Edge Animate CC trial
    Nancy O.

  • Need advice on how to make my website look better!

    ive made a website for a security company but im just not 100% happy with it, i dont know if it doesnt look professional enough or things need changing design wise. i am open to any ideas on how to make my website look better, i also dont mind if anyone wants to dramtically change it if their idea is better. I would just very much appreciate a review and constructive critisism and ideas for a newly designed version of the site please!
    [advertising slogan removed by host]
    Thanks!

    As a novice, some things I see: The footer has redundant, unecessary images (4 large images-for your services--REDUNDANT) odd? The text part of footer: text seems close, scrunched, have some space between heading and items, DO NOT CENTER TEXT!,
    One of the service links bought to page with SAME LARGE image on homepage-change picture, don't use same large image for 2 different pages.
    DO NOT use CONTACT US as 1 of 5 links on menubar. Do in another creative way, and/or use footer for contact. I think this looks amateurish (my opinion of course).
    If I remember, the homepage and the rest of site, have exact same page structure.--See if you can atleast change the structure of inner pages versus the homepage.
    Didn't look at enough, but..maybe...
    each of your services should be a main menu link on your menubar. I would not put contact us on menubar, and you also had another menubar link with no dropdown( of course ok, but maybe could restructure)--Also your last service (on right of menubar)---why is that one different, and not included with the other services??
    Seems like your menubar (items) structure could be reworked.--I would suggest, briefly looking at, to maybe have each service as a primary menu heading/title..YOU MAY NOT NEED A DROPDOWN MENU? Make sure if dropdown it is necessary.
    Local security should be one of your services.
    Have your footer logo, as is to left, but maybe put your footer links more to the right;;It will 'balance' the footer section
    Your top logo seems too close to your main LARGE image (Which btw, seems oddly large compared to the rest of your site?)--That LARGE top image(the same palce on every same looking page), seems too big for your page--Why doen't it line up with the rest off your page content?

  • Suggestions on how to make this coding better?

    Hey everyone, I was just wondering if anyone had any suggestions on how to make my code better. It's for a project and I want to get a good grade on it. It works fine but I just want to see what everyone thought before I hand it in.
    import java.io.*;
    import java.util.StringTokenizer;
         This class process the input expressions containing rational expressions and proecesses them and then outputs the results.
         @author *****
         @version 1.0
    public class Proj1
         private static String buffer = null; //User input
         private static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         private static PrintWriter outfile = null;
         private static int totCount = 0, goodCount = 0, badCount = 0; //Total, Valid, and Invalid counts
         private static boolean fileInput = false; //File to read data
         private static boolean fileOutput = false; //Output for the data
         private static boolean screenOutput = false; //Output so the user can view it
         private static String outFile = null; //File for output
         private static String inFile = null; //File for input
              Main method
         public static void main (String[] args) throws Exception
              Proj1 proj1 = new Proj1();
              proj1(args);
              runs the program
         private static void proj1(String [] args) throws Exception
              if (args.length == 0)
                   printBanner();
                   System.out.println("\n" + "\n" + "Please enter an expression, or type quit");
                   do
                        screenOutput=true;
                        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                        processData();
                   }while(!buffer.equals("quit"));//exits if quit is entered
              if (args[0].charAt(0) != '-')
                   badOption("Invalid Option Specified ");
              for(int i=1; i<args[0].length(); i++)
                   switch(args[0].charAt(i))
                        case 'f': fileInput = true;
                                    break;
                        case 'o': fileOutput = true;
                                    break;
                        case 'b': fileOutput = true;
                                    screenOutput = true;
                                    break;
                        default:  printBanner();
                                    invalidOption("Proj1: Invalid Option Found: " + args[0].charAt(i));
              if(fileInput && args[0].length() == 2)
                   screenOutput = true;
              if(fileInput && !fileOutput)
                   if(args.length == 1)
                        badOption("No Input File Specified.");
                   else
                        File inFile = new File(args[1]);
                        if(!inFile.exists())
                             nonExist("Input File " + args[1] + " not found");
                   br = new BufferedReader(new FileReader(args[1]));
                   printBanner();
                   processData();
                   closeFiles();
              if(fileOutput && fileInput)
                   printBanner();
                   if(args.length > 2)
                        outFile = args[2];
                   else
                        if(args.length > 1)
                             outFile = "proj1.dat";
                             noOut("No output file specified , defaulting to proj1.dat");
                   inFile = args[1];
                   br = new BufferedReader(new FileReader(inFile));
                   processData();
                   closeFiles();
              if(fileOutput && screenOutput)
                   printBanner();
                   if(args.length == 1)
                        outFile = "proj1.dat";
                        noOut("No output file specified, defaulting to proj1.dat");
                        System.out.println("\n" + "\n" + "Please enter an expression, or type quit");
                        BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
                        processData();
                        closeFiles();
                   else
                        outFile=args[1];
                        System.out.println("\n" + "\n" + "Please enter an expression, or type quit");
                        br = new BufferedReader(new InputStreamReader(System.in));
                        processData();
                        closeFiles();
         Processes the input data by the user by doing the specified operations and then displays the output
         private static void processData() throws Exception
              if(fileOutput)
                   outfile = new PrintWriter(new FileOutputStream(outFile), true);
              else if(fileOutput && screenOutput)
                   outfile = new PrintWriter(new FileOutputStream(outFile), true);
              buffer = br.readLine();
              while(!buffer.equals(""))
                   StringTokenizer reader = new StringTokenizer(buffer);
                   int count = 0;
                   String number1 = null;
                   String number2 = null;
                   String op = null;
                   boolean valid = true;
                   boolean secondNumber = true;
                   while (reader.hasMoreTokens())
                        switch(count)
                             case 1: number1 = reader.nextToken();
                                       break;
                             case 2: op = reader.nextToken();
                                       break;
                             case 3: number2 = reader.nextToken();
                                       break;
                        count++;
                   if(number1 == null || number1.equals("quit"))
                        printSummary(goodCount, badCount, totCount);
                        closeFiles();
                   if(number2 == null)
                        secondNumber = false;
                   char character;
                   int position = 0;
                   String s = "0123456789/-";
                   for(int i = 0; i < number1.length(); i++)
                        character = number1.charAt(i);
                        position = s.indexOf(character);
                        if(position == -1)
                             valid = false;
                   if(secondNumber)
                        for(int i = 0; i < number2.length(); i++)
                             character = number2.charAt(i);
                             position = s.indexOf(character);
                             if(position == -1)
                                  valid=false;
                   int denomin2 = 0;
                   int numer2 = 0;
                   String n1 = null;
                   String d1 = null;
                   int izerCount = 0;
                   StringTokenizer st2 = new StringTokenizer(number1,"/");
                   while(st2.hasMoreTokens())
                        switch(izerCount)
                             case 1: n1 = st2.nextToken();
                                       d1 = "1";
                                       break;
                             case 2: d1 = st2.nextToken();
                        izerCount++;
                   int numer1;
                   int denomin1;
                   int tokenCount = 0;
                   if(valid)
                        numer1 = Integer.parseInt(n1);
                        denomin1 = Integer.parseInt(d1);
                        String n2 = null;
                        String d2 = null;
                        if(secondNumber)
                             StringTokenizer st3 = new StringTokenizer(number2, "/");
                             while(st3.hasMoreTokens())
                                  switch(tokenCount)
                                       case 1: n2 = st3.nextToken();
                                                 d2 = "1";
                                                 break;
                                       case 2: d2 = st3.nextToken();
                                  tokenCount++;
                             numer2 = Integer.parseInt(n2);
                             denomin2 = Integer.parseInt(d2);
                             RationalNumber z1 = new RationalNumber(numer2, denomin2);
                        RationalNumber z = new RationalNumber(numer1,denomin1);
                        RationalNumber z1 = new RationalNumber(numer2,denomin2);
                        boolean lt = true; //whether the first number is less than the second
                        boolean gt = true; //whether the first number is greater than the second
                        boolean eq = true; //whether the first number is equal to the second
                        boolean le = true; //whether the first number is less or equal to the second
                        boolean ge = true; //whether the first number is greater than or equal to the second
                        boolean zeroDenom = true; //whether the denominator is zero
                        if(denomin1 == 0 || denomin2 == 0)
                             zeroDenom = true;
                             badCount++;
                        else
                             zeroDenom = false;
                        if(!zeroDenom && secondNumber)
                             if(op.equals("+"))
                                  RationalNumber z2 = z.add(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " = " + z2.getNumerator()+ "/" +z2.getDenominator());
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " = " + z2.getNumerator()+ "/" +z2.getDenominator());
                                  goodCount++;
                             else if(op.equals("-"))
                                  RationalNumber z3 = z.sub(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " = " + z3.getNumerator()+ "/" +z3.getDenominator());
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " = " + z3.getNumerator()+ "/" +z3.getDenominator());
                                  goodCount++;
                             else if(op.equals("*"))
                                  RationalNumber z4 = z.mlt(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " = " + z4.getNumerator()+ "/" +z4.getDenominator());
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " = " + z4.getNumerator()+ "/" +z4.getDenominator());
                                  goodCount++;
                             else if(op.equals("/"))
                                  RationalNumber z5 = z.div(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " = " + z5.getNumerator()+ "/" +z5.getDenominator());
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " = " + z5.getNumerator()+ "/" +z5.getDenominator());
                                  goodCount++;
                             else if(op.equals("<"))
                                  lt=z.lt(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " is " + lt);
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " is " + lt);
                                  goodCount++;
                             else if(op.equals(">"))
                                  gt=z.gt(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " is " + gt);
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " is " + gt);
                                  goodCount++;
                             else if(op.equals("="))
                                  eq=z.eq(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " is " +  eq);
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " is " +  eq);
                                  goodCount++;
                             else if(op.equals("<="))
                                  le=z.le(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " is " + le);
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " is " + le);
                                  goodCount++;
                             else if(op.equals(">="))
                                  ge=z.ge(z1);
                                  if(screenOutput)
                                       System.out.println(buffer + " is " + ge);
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println(buffer + " is " + ge);
                                  goodCount++;
                             else
                                  if(op==null)
                                       if(screenOutput)
                                            System.out.println("Invalid expression: " + buffer);
                                       if(fileOutput || fileOutput && screenOutput)
                                            outfile.println("Invalid Expression: " + buffer);
                                       badCount++;
                             else
                                  if(screenOutput)
                                       System.out.println("Invalid expression: " + buffer );
                                  if(fileOutput || fileOutput && screenOutput)
                                       outfile.println("Invalid expression: " + buffer);
                                  badCount++;
                        else
                             if(screenOutput)
                                  System.out.println("Invalid operand: " + buffer);
                             if(fileOutput || fileOutput && screenOutput)
                                  outfile.println("Invalid operand: " + buffer);
                   else
                        if(screenOutput)
                             System.out.println("Invalid operand: " + buffer);
                        if(fileOutput || fileOutput && screenOutput)
                             outfile.println("Invalid operand: " + buffer);
                        badCount++;
                   buffer = br.readLine();
         Prints the banner for the program
         private static void printBanner()
              System.out.println("+++++++++++++++++++++++++++++++++++++++++"+"\n"+"+Welcome to the expression connection   +"+"\n"+"+++++++++++++++++++++++++++++++++++++++++");
         Prints the total number of expressions, total number of valid expressions, and total number of bad expressions.
         private static void printSummary(int goodCount, int badCount, int totCount)
              totCount = goodCount + badCount;
              System.out.println("\n");
              System.out.println("+++++++++++++++++++++++++++++++++++++++++");
              System.out.println("+ Total Expressions:        "+totCount);
              System.out.println("+ Total Valid Expressions   "+goodCount);
              System.out.println("+ Total Bad Expressions     "+badCount);
              System.out.println("+++++++++++++++++++++++++++++++++++++++++");
         Prints the error message if there is no output file specified
         private static void noOut(String errorString)
              System.out.println("\n");
              System.out.println("Proj1: " + errorString);
         Prints the error message if there is an invalid option input by the user
         private static void invalidOption(String errorString)
              System.out.println("\n");
              System.out.println("Proj1: " + errorString);
              System.out.println("Proj1: Usage is: java proj1 [-fob] [input] [output]");
              System.exit(0);
         Prints the error message if there is a bad option input by the user
         private static void badOption(String errorString)
              System.out.println("\n");
              System.out.println("Proj1: " + errorString);
              System.out.println("Proj1: Usage is: java proj1 [-fob] [input] [output]");
              System.exit(0);
         Prints the error message if the input file does not exist
         private static void nonExist(String errorString)
              System.out.println("\n");
              System.out.println("Proj1: " +errorString);
              System.out.println("Proj1: Usage is: java proj1 [-fob] [input] [output]");
              System.exit(0);
         Closes the files used by the user
         private static void closeFiles( )
              if(fileOutput && !screenOutput)
                   outfile.close();
              System.exit(0);
    }

    Well working is good...
    The code itself is less than spectacular I'm afraid. There is very little
    OOness to this. For your future reference when you complete a program
    and it consists of nothing but static methods you have done something
    incorrectly.
    As far as the code you do have goes some refactoring would be nice.
    The two main methods you have (proj1 but especially processData) are
    too long and unwieldy. processData seems to be a program in an of
    itself. It's complicated and hard to follow.
    My recommendation to you would be to read this http://java.sun.com/docs/books/tutorial/java/index.html
    Especially focus on the sections dealing with explanation of Object
    programming. These terms and concepts can certainly be confusing to
    new programmers so you may also want to consider finding yourself a
    tutor to help you get a better grasp of these concepts.
    In short if it works that's good. And it's also good to see that you put the
    effort and time in that you have. However if I was grading your project
    I'd give it a C- at best because this is a Java program in syntax only.

  • How to make alaw_rtp's tonal quality better?

    I write my own alaw Encode , Decode and Packetizer. But i have a hard problem is thar the sound is so bad.
    The volume is so low and the sound have noise.
    How should i do to make it better?
    the code :
    encode:
    package media.codec.audio.alaw;
    import com.ibm.media.codec.audio.AudioCodec;
    import javax.media.Buffer;
    import javax.media.Control;
    import javax.media.Format;
    import javax.media.ResourceUnavailableException;
    import javax.media.format.AudioFormat;
    public class JavaEncode extends AudioCodec {
        private Format lastFormat = null;
        private int inputSampleSize;
        private boolean bigEndian = false;
        public JavaEncode() {
            supportedInputFormats = new AudioFormat[]{
                        new AudioFormat(
                        AudioFormat.LINEAR,
                        Format.NOT_SPECIFIED,
                        16,
                        1,
                        Format.NOT_SPECIFIED,
                        Format.NOT_SPECIFIED),
                        new AudioFormat(
                        AudioFormat.LINEAR,
                        Format.NOT_SPECIFIED,
                        8,
                        1,
                        Format.NOT_SPECIFIED,
                        Format.NOT_SPECIFIED)};
            defaultOutputFormats = new AudioFormat[]{
                        new AudioFormat(
                        AudioFormat.ALAW,
                        8000,
                        8,
                        1,
                        Format.NOT_SPECIFIED,
                        Format.NOT_SPECIFIED)};
        @Override
        public String getName() {
            PLUGIN_NAME = "pcm to alaw converter";
            return PLUGIN_NAME;
        @Override
        protected Format[] getMatchingOutputFormats(Format in) {
            AudioFormat inFormat = (AudioFormat) in;
            int sampleRate = (int) (inFormat.getSampleRate());
            supportedOutputFormats = new AudioFormat[]{
                        new AudioFormat(
                        AudioFormat.ALAW,
                        sampleRate,
                        8,
                        1,
                        Format.NOT_SPECIFIED,
                        Format.NOT_SPECIFIED)};
            return supportedOutputFormats;
        @Override
        public void open() throws ResourceUnavailableException {
        @Override
        public void close() {
        private int calculateOutputSize(int inputLength) {
            if (inputSampleSize == 16) {
                inputLength /= 2;
            return inputLength;
        //&#32593;&#32476;&#19978;&#30340;A&#24459;&#32534;&#30721;&#31243;&#24207;...
        private void initConverter(AudioFormat inFormat) {
            lastFormat = inFormat;
            inputSampleSize = inFormat.getSampleSizeInBits();
            bigEndian = inFormat.getEndian() == AudioFormat.BIG_ENDIAN;
        public int process(Buffer inputBuffer, Buffer outputBuffer) {
            if (!checkInputBuffer(inputBuffer)) {
                return BUFFER_PROCESSED_FAILED;
            if (isEOM(inputBuffer)) {
                propagateEOM(outputBuffer);
                return BUFFER_PROCESSED_OK;
            Format newFormat = inputBuffer.getFormat();
            if (lastFormat != newFormat) {
                initConverter((AudioFormat) newFormat);
            int outLength = calculateOutputSize(inputBuffer.getLength());
            byte[] inpData = (byte[]) inputBuffer.getData();
            byte[] outData = validateByteArraySize(outputBuffer, outLength);
            pcm162alaw(inpData, inputBuffer.getOffset(), outData, outputBuffer.getOffset(), outData.length, bigEndian);
            updateOutput(outputBuffer, outputFormat, outLength, outputBuffer.getOffset());
            return BUFFER_PROCESSED_OK;
        private static final byte QUANT_MASK = 0xf; /* Quantization field mask. */
        private static final byte SEG_SHIFT = 4;
        /* Left shift for segment number. */
        private static final short[] seg_end = {
            0xFF, 0x1FF, 0x3FF, 0x7FF, 0xFFF, 0x1FFF, 0x3FFF, 0x7FFF
        private static byte linear2alaw(short pcm_val) /* 2's complement (16-bit range) */ {
            byte mask;
            byte seg = 8;
            byte aval;
            if (pcm_val >= 0) {
                mask = (byte) 0xD5; /* sign (7th) bit = 1 */
            } else {
                mask = 0x55; /* sign bit = 0 */
                pcm_val = (short) (-pcm_val - 8);
            /* Convert the scaled magnitude to segment number. */
            for (int i = 0; i < 8; i++) {
                if (pcm_val <= seg_end) {
    seg = (byte) i;
    break;
    /* Combine the sign, segment, and quantization bits. */
    if (seg >= 8) /* out of range, return maximum value. */ {
    return (byte) ((0x7F ^ mask) & 0xFF);
    } else {
    aval = (byte) (seg << SEG_SHIFT);
    if (seg < 2) {
    aval |= (pcm_val >> 4) & QUANT_MASK;
    } else {
    aval |= (pcm_val >> (seg + 3)) & QUANT_MASK;
    return (byte) ((aval ^ mask) & 0xFF);
    private static void pcm162alaw(byte[] inBuffer, int inByteOffset,
    byte[] outBuffer, int outByteOffset,
    int sampleCount, boolean bigEndian) {
    int shortIndex = inByteOffset;
    int alawIndex = outByteOffset;
    if (bigEndian) { //bigEndian
    while (sampleCount > 0) {
    outBuffer[alawIndex++] = linear2alaw(bytesToShort16(inBuffer[shortIndex],
    inBuffer[shortIndex + 1]));
    shortIndex++;
    shortIndex++;
    sampleCount--;
    } else {
    while (sampleCount > 0) {
    outBuffer[alawIndex++] = linear2alaw(bytesToShort16(inBuffer[shortIndex + 1],
    inBuffer[shortIndex]));
    shortIndex++;
    shortIndex++;
    sampleCount--;
    private static short bytesToShort16(byte highByte, byte lowByte) {
    return (short) ((highByte << 8) | (lowByte & 0xFF));
    //&#22686;&#21152;&#22238;&#22768;&#25233;&#21046;
    @Override
    public java.lang.Object[] getControls() {
    if (controls == null) {
    controls = new Control[1];
    controls[0] = new com.sun.media.controls.SilenceSuppressionAdapter(this, false, false);
    return (Object[]) controls;

    the command of use alaw_rtp:
                    audio_format = new AudioFormat("ALAW_RTP", 8000.0, 8, 1);
                    switch (payload) {
                        case PayLoad_Ulaw:
                            try {
                                Codec[] codec = new Codec[3];
                                codec[0] = new com.ibm.media.codec.audio.rc.RCModule();
                                codec[1] = new com.ibm.media.codec.audio.ulaw.JavaEncoder();
                                codec[2] = new com.sun.media.codec.audio.ulaw.Packetizer();
                                ((com.sun.media.codec.audio.ulaw.Packetizer) codec[2]).setPacketSize(ptime * 8);
                                (tracks).setCodecChain(codec);
    } catch (Exception ex) {
    System.err.println("payload error:" + ex);
    break;
    case PayLoad_Alaw:
    try {
    Codec[] codec = new Codec[3];
    codec[0] = new com.ibm.media.codec.audio.rc.RCModule();
    codec[1] = new AlawEncoder();
    codec[2] = new AlawPacketizer();
    ((AlawPacketizer) codec[2]).setPacketSize(ptime * 8);
    (tracks[i]).setCodecChain(codec);
    } catch (Exception ex) {
    System.err.println("payload error:" + ex);
    break;
    default:
    break;
    tracks[i].setEnabled(true);
    the voice is so bad, have noise.
    Some one could tell what's wrong in my code?
    Thank you very much for your share!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    Hi my name is vishal
    For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
    Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Diagnostics;
    using System.IO;
    namespace DRRS_CSharp
    public partial class frmPDF : Form
    public frmPDF()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(6);
    table.TotalWidth =530f;
    table.LockedWidth = true;
    PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
    cell.Colspan = 6;
    cell.HorizontalAlignment = 0;
    table.AddCell(cell);
    Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
    para.Alignment = Element.ALIGN_CENTER;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(105f, 105f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("Reprocessing Date");
    table.AddCell("Patient Name");
    table.AddCell("Dialyzer(Manufacturer,Size)");
    table.AddCell("No.of Reuse");
    table.AddCell("Verification");
    table.AddCell("DialyzerID");
    while (dr.Read())
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
    table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
    table.AddCell("@count".ToString());
    table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
    table.AddCell(dr[0].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
    if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
    this.Close();
    The above code executes well with no problem at all!
    As you can see the file to which i create and save and open my pdf report is
    AssignedDialyzer.pdf.
    The column headers of table in pdf report from c# windows forms using iTextSharp are
    "Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
    "DialyzerID".
    However the problem i am facing is after execution and opening of document is my
    column headers in table in pdf report from
    c# and datas in it all appear in bold.
    I have browsed through net regarding to solve this problem but with no success.
    What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
    Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
    I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
    Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
    If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
    vb6,adodb with ms access using iTextSharp?
    I have approached Sound Forge.Net for help but with no success.
    I hope anyone/someone truly understands what i am trying to ask!
    I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
    Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
    I hope i get a reply in terms of solving this problem.
    vishal

    Hi,
    About iTextSharp component issue , I think this case is off-topic in here.
    I suggest you consulting to compenent provider.
    http://sourceforge.net/projects/itextsharp/
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Can Java do this

    Hi, I want to really learn Java after just taking classes to this point. I have a task I need to do, but cannot figure IF I can do it in Java, let alone how. I have about 40 tools on my SGI. They are written in Fortran, C, or a commbination of both.

  • LPCONFIG Error while activating logical port

    Hi While creating logical port to a proxy class via LPCONFIG, I get the following error message Message no. SRT_LPREG029 Configuration is valid but messages exist I am able to save it but not able to activate it. Please let me know the solution. Than

  • How to Run FormBuilder On Linux.

    Hi All, I have installed Oracle Application Server 10G on linux in one Home. I installed Oracle Developer Suit 10G on same machine in another Home. I configured Listner and service for Oracle Application Server. But How to set the Listner and service

  • Ipod is in recovery mode not restoring

    ipod is in recovery mode not restoring

  • X-fi softwear does't recongnize my sound c

    Today I took my network card out and put it back in. I also put my new xfi xtreme music in too. When I tried to install the driver/software for my network card and my xfi card, it wouldnt work. I've formatted 4 times already. I disable onboard sound