BufferedImage Quality Very Bad

Hello,
I've looked all over for a solution, because I figure there is already one documented, but I've failed, so I turn to you. :) I'm trying to create a very simple graphic, but the image quality I'm getting is TERRIBLE. It's a small 15x15 pixel graphic that is a rounded corner.
Here is a url to a page where you can see a blown up version of the original image I'm trying to recreate and my flawed image.
http://www.anathema.net/bufferedimage.html
Here's my code:
BufferedImage image = new BufferedImage( 15 , 15 , BufferedImage.TYPE_INT_RGB ) ;
Graphics2D g2 = image.createGraphics() ;
g2.setRenderingHint( RenderingHints.KEY_ANTIALIASING , RenderingHints.VALUE_ANTIALIAS_ON );
// First set the whole image to outsideRGB (which is orange)
Rectangle2D rect = new Rectangle2D.Double( 0 , 0 , image.getWidth() , image.getHeight() ) ;
g2.setPaint( new Color( outsideRGB ) );
g2.fill(rect);
// Create an arc to be the inside color field (the white in the example)
Arc2D arc1 = new Arc2D.Double( 1.0 , 1.0 , image.getWidth()*2.0 , image.getHeight()*2.0 , 90.0 , 180.0 , Arc2D.PIE ) ;
// Create an arc to be the dark border between the orange and white
Arc2D arc2 = new Arc2D.Double( 0.0 , 0.0 , image.getWidth()*2.0 , image.getHeight()*2.0 , 90.0 , 180.0 , Arc2D.OPEN ) ;
// Paint the white "inside" area
g2.setStroke( new BasicStroke(2) );
g2.setPaint( new Color( insideRGB ) ) ;
Area a = new Area(arc1) ;
g2.fill(a) ;
// Paint the border arc between the two color areas
g2.setPaint( new Color( borderRGB ) ) ;
g2.draw(arc2);
g2.dispose();
// Code using Sun's JPEGCodec to write it out to a file is not shownCan anyone help me figure this out? I've tried looking for an answer in this forum, but I can't find anyone with the same problem.

Save the image as something other than a jpeg (png or gif) because your image is suffering from the jpeg compression. The other solution is when you create your jpeg, set the quality level to 1.0 which will lead to no loss of data due to quantization.

Similar Messages

  • PAR Correction Quality very bad in CS5

    Hi,
    in earlier versions of After Effects it was possible to set the quality of the Pixel Aspect Ratio Correction to "high" resulting in a very nice and clean preview. In CS5 this seems to be not possible anymore, because the standard and already set option in CS5 is "high". Anyway - the PAR correction looks very bad in CS5, giving me choppy vertical lines. Is there any chance to get a clean result like in CS4?
    Thanx!

    The Zoom Quality preference also affects pixel aspect ratio correction for previews.
    Keep in mind that the pixel aspect ratio correction setting in viewer panels is just a preview setting; it has no effect on final output.

  • Slo-Mo quality very bad using Speed Change

    I haven't been using FCP for quite a while now (I had to change to a PC based system for all my pro work because off Apple's Blu Ray hang-ups), however I still have a lot of family video clips on my Mac Pro which I want to edit and transfer to DVD.
    Like a good dog I did update my FCP to 7.0.3 a little while ago but this is the first time I've used it since.
    I'm trying to create some slow motion football clips at a rate of 20%....something I had done many times before of my previous version of FCP.
    The trouble is that the new version's slo-mo looks terrible compared to the old, it is very blurred indeed.
    With the old version all I did was use the default Change Speed settings which basically meant writing in a figure of 20% in the rate box. I didn't alter anything else.
    The same info in v7.0.3 produces something unusable. I have noticed that there are extra fields in the new version's Change Speed dialog box so I experimented with ticking OFF Frame Blending, which stopped the blurring but of course the entire clip went "juddery", again unwatchable.
    All I want to do is to get the same results I used to before this update.
    I have to be honest and say that I cannot remember the version number of my previous FCP but if it helps the Capture Preset I use is ProRes 422(HQ) and the Sequence Preset is ProRes 422 (HQ).....exactly as it had been before in fact.
    I changed no basic Audio/Video settings since the new version....all the old ones still seemed to be there.
    Is there someting I have to do in the new dialog box that I'm missing?.

    OK, I have had some more time to spend on this and it seems that the problem is wider spread (I had only been working on slo-mo up to now).
    I started noticing that the quality of the normal speed videos within the timeline were not as good quality as I expected.
    Any video containing any motion had a distinct "fuzziness" around the edges of the moving object. This fuzziness seemed to be made up of thin parallel lines.
    I exported a short clip as .mov file (using the original sequence settings) and the used Compressor to create the best quality DVD file to burn in DVD SP.
    The resulting DVD video looked totally unwatchable. The parallel lines "fuzziness" had become hugely magnified making every moving object a mess of blurring.
    I really need some help here because I am totally baffled. As far as I can see all the settings I have in this version of FCS are the same as I had in my previous version. When I checked my older DVDs they all looked great.
    But when I used exactly the same source video files in the new version it looked diabolical.
    Another slight weirdness as well, I used to quickly run a section of video from FCPs timeline via "Print-to-Video' back onto my Sony camera just to check how it looked on my HDTV. And guess what?, since the software upgrade even this has suffered a big quality loss, it now almost looks like there is a lower frame rate, about 10-15 FPS rather than the 25 it should be.
    As I said previously I now do all new work on a PC but the problem is I have about 800 GB of unedited video on one of my Mac internal drives, I don't reaaly want to have to transfer all that to the PC or another drive because of time and cost. So I need to use FCS for this.
    If anyone has any clues as to what is going on here I would be most grateful.
    I can give some technical info if it helps.
    My camera is the Sony HDR-HC7.
    The FCP capture preset I use is HDV-Apple ProRes 422 (HQ).
    Sequence Preset is Apple Pro-Res 422(HQ) PAL 48kHz, FS 1280*1080,FD Upper, PAR HD 1280*1080.
    In Compressor I use the DVD:Best Quality 90 minutes setting.
    It could be that I'm missing something very basic here, but I've checked through these settings and can't spot anything obvious to me.If anyone else can then please let me know.
    I can try and provide more technical details if needed.
    Sorry if this post is too long and rambling.

  • Photos quality very bad in iDVD

    Photos in iMovie are great. Added music and all is good. But, once I send off to iDVD the picture quality is terrible. Any line in the photo that is not vertically or horizontally straight is wavy. Plus, the border of the pictures (I'm using Snapshots theme from iPhoto) are wavy as well. It looks so good in iMovie, I just want the same quality when I burn the DVD. Slide show is only 6 minutes. Number of photos probably 75. I would appreciate any help in understanding the easiest way to understand exactly what the settings should be before I send the project off to iDVD. Thanks for the help.
    Ann

    There are many ways to produce slide shows using iPhoto, iMovie or iDVD and some limit the number of photos you can use (iDVD has a 99 chapter (slide) limitation).
    If what you want is what I want, namely to be able to use high resolution photos (even 300 dpi tiff files), to pan and zoom individual photos, use a variety of transitions, to add and edit music or commentary, place text exactly where you want it, and to end up with a DVD that looks good on both your Mac and a TV - in other words end up with and end result that does not look like an old fashioned slide show from a projector - you may be interested in how I do it. You don't have to do it my way, but the following may be food for thought!
    Firstly you need proper software to assemble the photos, decide on the duration of each, the transitions you want to use, and how to pan and zoom individual photos where required, and add proper titles. For this I use Photo to Movie. You can read about what it can do on their website:
    http://www.lqgraphics.com/software/phototomovie.php
    (Other users here use the alternative FotoMagico: http://www.boinx.com/fotomagico/homevspro/ which you may prefer - I have no experience with it.)
    Neither of these are freeware, but are worth the investment if you are going to do a lot of slide shows. Read about them in detail, then decide which one you feel is best suited to your needs.
    Once you have timed and arranged and manipulated the photos to your liking in Photo to Movie, it exports the file to iMovie 6 as a DV stream. You can add music in Photo to Movie, but I prefer doing this in iMovie where it is easier to edit. You can now further edit the slide show in iMovie just as you would a movie, then send it to iDVD 7, or Toast, for burning.
    You will be pleasantly surprised at how professional the results can be!
    To simply create a slide show in iDVD 8 from images in iPhoto or stored in other places on your hard disk or a connected server, look here:
    http://support.apple.com/kb/HT1089

  • When i transfer an photoshop image in Indesign, this one come out in very bad quality and pixelise even once print

    Hello,
    I have an issu, every image i bring or change trough Photoshop CS6 and transfer to Indesign CS6 or Illustrator CS6 comes out in very bad quality and very pixelated whyle printed.
    The original image in photoshop is 29x32 cm with 300 ppp.
    When i transfer in Indesign, i have to reduce the site via the adjustment button and it comes in terrible quality.
    It never happen before, its just recently, and i didn't change my way to save or the properties of my Photoshop, so if someone can help me to resolve this problem, i will be glad.
    Regards,
    Marie

    Before I should save the image as a PSD (without Clipping Mask and dont flatten the image). the print would come out different colours...not the same.
    Are you saying the printer can't get a .PSD to output, or a PSD's color is unpredictable? Sounds like your printer can print .PSDs, but you  have a color management problem. By different colors do you mean that the printed CMYK color values are different than what was in the placed PSD? If that's the case it may be that the PSD had a profile that conflicted with the InDesign document profile and you are getting unexpected color conversions somewhere in the workflow.

  • Very bad mic quality during VoIP calls

    I tested Skype and Viber but the app doesn't matter. My conversationalist hear me very, very bad: there are crackle, sometimes he nothing hear or hear very quiet. Simply he he can understand every other my word.
    I've got very good conection quality from Wi-Fi, conversationalist also. He talks with other people on Skype and he doesn't have any problems with them.
    Lenovo A7-50 A3500-H

    Do you have a case on your phone?   Try removing it and see if call quality improves.

  • Video project saved to MPEG 4 has very bad quality

    I need instruction for saving in MPEG 4 because when I saved the project in MPEG 4 the quality is terrible what am i doing wrong? - I saved the same project in QuickTime and quality looked very good.

    I was just able to produce a good quality video, but when I made a small change and used the same settings, it turned out very bad. I have been messing with the settings but I cannot re-produce the same quality video I just created.
    The settings I did were H.264 MOV:
    Frame Rate - Current fps
    Key Frames - Every 24 with Frame Reordering checked
    Compressor - Quality at Best with Encoding as Best (Multi-pass)
    Data Rate - Automatic.
    I do not have a preview anymore. I did when it produced the good quality version, but now I do not get a preview. I used these EXACT settings and it produced great quality, but I simply cut out the last 1 second of the video and it produces crappy quality again. I even restarted FCE, used the same source (the MOV), made NO changes, and used these settings again but the quality is worse now.

  • Very bad microphone quality with LCCS on Android

    Hello,
    I have created two applications with LCCS (audio and video conferencing), one for Windows and one for Android devices.
    From my PC, all work very well. When I speak with my desktop microphone, the sound delivered to my phone is good.
    But, when I speak with my phone, the sound delivered to my PC is very bad.
    Maybe LCCS doesn't configure mobile microphone correctly ?
    By the way, on mobile Microphone.getEnhancedMicrophone returns null and falls back to getMicrophone instead.
    Any idea ?

    OK I found that SPEEX codec result on Android (and maybe on iOS) is very bad when streamed. If I use instead the old NELLYMOSER codec, the result seems to be correct. Not fantastic, but correct.
    I thought that SPEEX codec was fully supported and very good on Android... Am I wrong ?
    Is there somebody here who try to use SPEEX codec on mobile ?

  • Brand new E7-00, wity *very* bad image quality

    Yes I did remove the protective film from the camera cover.
    And Yes, I deed clean the glass in front of the camera.
    But the 8M camera produces images worse than a 0.1 megapixel webcam!
    Is this normal? Anything I can do?
    See for a sample:
    https://twitter.com/joosteto/status/242554441247641600/photo/1/large
    Solved!
    Go to Solution.
    Attachments:
    Picture 007.jpg ‏491 KB

    I haven't touched any of the settings so they all are default values, but I'll list the current setting here anyway:
    (my phone switched to Dutch language, and I don't know how to revert it to EN, so I'll try to translate the entries here)
    ColorTone: Normal
    WhiteBalance: Automatic
    Lightening: 0
    ISO_A: Automatic
    Contrast: shows slider in the middle of range
    Sharpness: Normal
    Settings:
      Imagequality: 6M - 16:9
      Record Location: Yes
      Show recorded images: Yes
      ImageTone (??): Camera1 (I now tried camera1..Camera4, they all look similar)
      Use memory: E:MassStorage
    And when the camera is active, the information bar on the bottom of the screen shows the flash is set to "A", to the right of that is again an "A" (I suppose the picture type setting).
    So as far as I know, everything is set to "Automatic", "normal", or "middle of range".
    Also, I don't see a "**bleep** up image quality really bad" option, so whatever the other settings, I wouldn't expect images to be this vague...
    Any recommendations?

  • Fios Internet connection is very bad! Please help!

    Hello,
    I play an online game called Final Fantasy XIV.  I use a program called WTFast in order to have a solid gaming experience, one without or very little lag or disconnects.
    Recently, within the last 3-4months, I have noticed I get EXTREME lag and DISCONNECTS.  I contacted WTFast with a tracert that they analyzed, and here is their response:
    "Your internet connection is very bad. There is a "plateau" spike. This will cause WTFast to spike as well, and for such a long "spike" it is not surprising that the connection was dropped.
    The previous report showed a very unstable internet connection as well (the one where you got a 30 second freeze).
    Present the same reports you sent to us to your ISP (Verizon FIOS) and ask them to try to make their connection better. The report will help them see the quality of the current connection."
    Here is the information in the more readable form (except for the last four as I figured you would probably get the idea by then). Yes, 4 shows 100% packet loss, so the connection dropped then. Also, in 5 the standard deviation is high (16.35 ms) which indicates a huge fluctuation in the signal. The flux column also shows large numbers, which indicates a large variance in the signal speed. Finally, there are a lot of hops just within the ISP, ie rows 2-8, and all this data is for the ISP itself, not the WTFast connection. In fact, that connection is the last one, and there you can see good numbers. Hope this helps.
    015-02-25 00:09:36
    Hop Name No. Loss % Sent Received Best (ms) Avg. (ms) Worst (ms) Last (ms) Spikes Flux (ms) Std.Dev (ms)
    Wireless_Broadband_Router.home 1 0.00 497 497 0 0 12 0 0 0 1.67
    lo0-100.PHLAPA-VFTTP-304.verizon-gni.net 2 0.00 497 497 3 8 84 7 4 72 8.39
    T1-1-0-5.PHLAPA-LCR-21.verizon-gni.net 3 0.00 497 497 4 8 19 9 0 0 2.51
    —— 4 100.00 —— —— —— —— -1 —— —— —— 0.00
    0.so-6-0-1.XL3.IAD8.ALTER.NET 5 0.00 497 497 10 19 137 12 12 92 16.35
    TenGigE0-6-0-4.GW1.IAD8.ALTER.NET 6 0.00 497 497 11 18 50 18 0 0 4.68
    teliasonera-gw.customer.alter.net 7 0.20 497 496 12 24 43 27 53 30 3.80
    cloudflare-ic-309918-ash-b2.c.telia.net 8 0.00 497 497 10 14 46 13 0 0 3.04
    Target WTFast.com 9 0.00 497 497 9 12 25 12 0 0 1.94
    February 25, 2015, 11:56
    I did a tracert from my computer to sites like MSN.com; Verizon.com etc, and EVERY SINGLE 4 shows a 100% loss.  I did the same tracert from my computer at work that uses a different IP provider, and those same sites show a response from 4.  
    Can anyone help me out with this please!  Thank you for reading!

    bap4201 wrote:
    I'm trying to, but can't seem to format it properly
    Open a command prompt and enter the tracert command
    then select the cmd prompt icon - top left of the cmd prompt window
    select edit, mark
    highlight the data you want to copy - the tracert data
    select the cmd prompt icon again
    select edit copy
    put the cursor in the post window in the forum
    and hit ctrl-v - as below
    C:\Users\Peter>tracert wtfast.com
    Tracing route to wtfast.com [190.93.243.228]
    over a maximum of 30 hops:
    1 <1 ms <1 ms <1 ms Westell [192.168.1.1]
    2 3 ms 2 ms 3 ms L101.BSTNMA-VFTTP-66.verizon-gni.net [96.233.107
    .1]
    3 7 ms 6 ms 6 ms G102-0-0-3.BSTNMA-LCR-22.verizon-gni.net [100.41
    .212.48]
    4 3 ms 3 ms 3 ms so-5-0-0-0.BOS-BB-RTR2.verizon-gni.net [130.81.1
    51.220]
    5 11 ms 12 ms 10 ms 0.ae11.XL4.NYC1.ALTER.NET [152.63.20.117]
    6 * * * Request timed out.
    7 37 ms 28 ms 43 ms 3.et-2-0-1.TL2.NYC1.ALTER.NET [140.222.227.34]
    8 20 ms 21 ms 23 ms TenGigE0-7-0-1.GW5.NYC4.ALTER.NET [152.63.17.66]
    9 12 ms 10 ms 11 ms teliasonera-gw.customer.alter.net [152.179.163.1
    78]
    10 13 ms 13 ms 11 ms nyk-bb2-link.telia.net [213.155.130.244]
    11 11 ms 11 ms 12 ms nyk-b2-link.telia.net [213.155.130.30]
    12 12 ms 17 ms 19 ms cloudflare-ic-309915-nyk-b2.c.telia.net [62.115.
    52.174]
    13 11 ms 12 ms 11 ms 190.93.243.228
    Trace complete.

  • My ipad4 camera resolution was very bad.

    hi,
    my ipad4 camera resolution was very bad. not expected this poor quality!!!. i dont know whether its a problem or like that only..
    do you haveany idea?
    picture clarity not good as compare to iphone 4S. but i read in website it has greate camera.

    (A) Reset iPad
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.
    (B) Reset all settings
    Settings>General>Reset>Reset all settings
    Note: Data will not be affected but settings will be reset.

  • Retina Macbook pro audio quality is bad in windows 8.1

    Like the title states, my Retina Macbook pro's (2012 model) audio quality is very bad in windows 8.1. It is unbearable to listen to music on it. I am using the latest bootcamp drivers, 5.1. I believe this is a driver problem, as it sounds fine in OS X. I tried to find the proper driver myself with no luck. I feel this is unacceptable on a computer I spent so much money on. Any help would be greatly appreciated.

    Yes...
    I also just recently purchased a MacBook Pro retina 15 (mid-2014) with bootcamp (windows 8.1) installed.  While using my windows partition, the MBP seems to be running a bit hot, at least hotter than the OS X partition.
    As for comparison, I have the 2012 MacBook Pro retina 13 with bootcamp (windows 8.1).  It does not get as hot as the 15, and in fact, I don't think it runs hotter than OS X...
    Any thoughts?  Is it perhaps because I have the NVIVIDA dedicated graphics and in the windows partition, IRIS PRO isn't running?

  • Final Cut Express to H.264 MP4 HI DEF Workflow - My quality is bad

    Hi, all
    I have some hidef footage that I am editing in FCExpress. My source is 1080p - 1920x1080 and looks great. It looks like the bitrate of my MPEG2 source is around 9MB/s.
    When I export using Quicktime conversion in my final project, I tell it to use MP4, H.264, 1920x1080 at 10MB/s but my quality is markedly worse than my original footage.
    The output info shows 1920x1080 but I am seeing very bad "jaggies".
    What should I be looking for to correct the issue?

    OK. It is certainly not my bitrate. I cranked that to 50MB/s and I still have the grain.
    So maybe this is whats going on - if I selected DV in easy setup, dragged in clips without changing format and did my whole project, if I output to high resolution, I assume it is simply blowing up the DV quality.
    If I indeed did this, how do I tell FCE to convert the project to HD?

  • Have a very bad experience at MCC SIAM DISCOVERY in Bangkok , Thailand

    About six months ago my iPad have some problem about Wi-Fi, a very bad signal and hard to connect. I already buy an AppleCare Protection Plan for iPad online, so it was still have warranty. I went to MCC SIAM DISCOVERY (http://www.maccenter.co.th/mcc/Home.html) have a very long queue with a very boring face of customer service guy. When it was my turn they check my iPad about 5 sec and said that my iPad are out of warranty because it has too much scratch. They also said that if I want to buy AppleCare Protection Plan, I must buy it there. So my problem was unfix, it's ok because my iPad work with Wi-Fi sometime. Until yesterday 2 NOV 2013, my iPad have another problem it was hold in headphone mode all the time. I went to that place again (MCC SIAM DISCOVERY) so I found this “Due to computer's queue overload, our computer service will resume again on Nov 18th, 2013. Please visit others nearby other service providers. “(http://upic.me/show/47961640, http://upic.me/show/47961641). It was a very bad experience about this apple service center, please check your authorized service provider quality, especially this MCC SIAM DISCOVERY (http://www.maccenter.co.th/mcc/Home.html). Apple have a very successful sale in Thailand but you don't have enough after service? Today my iPad is fully broken its show only apple logo when it's open and will show logo until battery out. Thanks for a very bad experience (twice) MCC SIAM DISCOVERY.
    Ps. this is my iPad Serial Number: DL*******KNW
    I use apple product almost everything I use iPhone, have an iPad, Mac book Pro. From now on I must think carefully about using apple product in Thailand.
    <Edited By Host>

    Hi Abbie. You have every reason to be upset. These issues normally happen in our country. You can send them an email regarding your concern here:
    http://www.apple.com/feedback/macbook.html
    Regarding your battery, you can probably reset the SMC and see if that improves your battery life. Here are the steps.
    http://support.apple.com/kb/ht3964

  • The application DOCS doesn't work. Doesn't have HELP. it is very bad. Help me. My ID is regobarros.thanks in advance

    The application DOCS doesn't work. Doesn't have HELP. it is very bad. Help me. My ID is regobarros.thanks in advance

    Also it was not and never has been jailbroken if that helps.

Maybe you are looking for

  • Trouble setting up wireless cameras with airport extreme

    I am trying to set up my alarm dot com wireless cameras and am having trouble getting them to connect to my Airport Extreme. With my prior D-Link router, there was no issue, but since upgrading to the Extreme, I can get them to locate the network, bu

  • Internet sharing seems to conflict with ichat video and theatre

    I don't use a base station. I broadcast wifi from my imac using internet sharing. With this option enabled, ichat 4.0 video and theatre will not work on my machine

  • Vectors in 1.5

    I was trying to use an application based on vectors from 1.2.4 and compiler throws a warning on me: that I was using unchecked or unsafe operations Then I go to api and notice an <E> next to vector class. I've seen this letter and some others like <T

  • Itunes will not shuffle songs

    I can't shuffle songs in a playlist anymore. I used to be able to do it, then one day it just stopped. I clicked the icon, went to "control-shuffle songs", held down the alt button and clicked the icon, and even hit F5 as stated in the trouble shooti

  • Antivirus program blocks iPod version 2.0 update

    If you've been trying to download the iPod software version 2.0 on Windows without success, and you have an antivirus program (NOD32) running, try turning it off. It fixed the problem for me. When I tried to get the update the full 222 MB downloaded