Improving scaled image quality

i am a newby in scaling images issues.
i am scaling an image with the following code, but the resulting quality is not satisfying comparing it with the scaled image done with paint shop pro (for example).it is not as sharp as the good one.
is there a better way to scale the image with a higher quality.
Image image = getImageFromDatabase();
Image newImage = image.getScaledInstance( iw, ih, Image.SCALE_SMOOTH );
//iw = resulting width
//ih = resulting height
thanx for your help.
marc

If you need to scale down your image from a factor smaller than 0.5, do the reduction twice, using factors that when multiplied give 0.4. For example, first reduce it using 0.8 then reduce the result using 0.5.
Weird, but should work. I've heard that reducing images in JAI with factors < 0.5 yield poor results.
Rafael

Similar Messages

  • TIFF SCALED IMAGE QUALITY

    HI,
    I am scaling a scanned image to fit into my application screen.
    But the scaled image quality is very bad.
    I am using the following code to scale the image.
    PlanarImage im0 = JAI.create("url", new URL (sURL));
    Interpolation interp = Interpolation.getInstanceInterpolation.INTERP_BICUBIC);
    ParameterBlock params = new ParameterBlock();
         params.addSource(im0);
         params.add(0.4F); // x scale factor
         params.add(0.4F); // y scale factor
         params.add(0.0F); // x translate
         params.add(0.0F); // y translate
         params.add(interp); // interpolation method
    /*Create an operator to scale image1. */
    JAI xx = JAI.getDefaultInstance();
    Map hints = new HashMap();
    hints.put(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);
    hints.put(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);
    RenderedImage image2 = xx.createNS("scale", params,new RenderingHints(hints));
    ANy idea helpful,
    Thanks,
    Ram

    If you need to scale down your image from a factor smaller than 0.5, do the reduction twice, using factors that when multiplied give 0.4. For example, first reduce it using 0.8 then reduce the result using 0.5.
    Weird, but should work. I've heard that reducing images in JAI with factors < 0.5 yield poor results.
    Rafael

  • Can I improve the image quality in Safari?

    As a photographer one of the things I was most looking forward to doing on my iPad was browsing flickr and other photo sites.
    Unfortunately safari seems to re-compress the images it displays (to save memory?) and the resulting JPEG artifacts are so distracting that it's not even worth looking at my contacts photos until I'm back on my laptop.
    To reproduce this just go to flickr on your normal computer and on the iPad and compare some images - it's a pretty big difference.
    I can't see any settings for image quality anywhere. Is there anything I can do, or am I stuck waiting for an iPad version of the Flickr app?

    jbt99 wrote:
    Alley_cat, you're right... I just installed an AirPort last night and over WiFi everything looks fantastic! For the record I'm getting 3G from O2 in the UK, so I guess that means they're compressing the images?
    Looks like it.
    I've noticed it too on my O2 connection and the image quality is abysmal.
    A quick search hasn't yielded a solution - changing the O2 username to bypass in some setups apparently bypasses the proxy, but someone on O2 forums was asking before iPad was released, and the inference was that unless you had a long term contract, all the pay as you go type options didn't allow this to work.
    I also tried a different server setting for O2 and it told me I had no allowance left - fortunately this went when I reset the setting.
    I may try contacting O2 and would urge others to do so as it really I pairs the user experience.
    Vodafone does the same with a USB dongle I have but in theory I can get them to disable the proxy.
    Btw, I've just had the chance to have a proper play with my iPad this morning, downloading apps and stuff, and I have to say it's exceeding my expectations in every way (and my expectations were high!). What an amazing machine

  • Improve image quality?

    Hello,
    I was given a pdf file which is a scanned copy of a Japanese language craft book/booklet, and because the text is in Japanese it's extra important to be able to see the pictures and diagrams.  The contrast is not very good on screen, especially for the black and white diagram pages, and doesn't improve much by tweaking the printing options.  I have the most current version of Adobe X Reader, and, while I don't know how to use it, I also have Photoshop Elements 9, which came w/ my laptop, which has Windows 7 OS.  I can't think of any other resources I have that are pertinent . . .  Is there any way I can improve the image quality, particularly the contrast, or is squinting  and saying bad words my only realistic option?  TIA!
    Kathryn 

    The quality of a scanned document is decided during the scanning.  However, high-quality scans result in very large document sizes, so the quality is often reduced after the scanning, resulting in a smaller PDF file.  That process cannot be undone.

  • Improve image quality of VI when published on Internet

    I'm using LabVIEW 6.02 and are publishing VI on the Internet. When I do that and are viewing them with the browser Explorer the grafichs details is bad. I have set the quality to be 100 and tried both png and jpeg format!Is there other things that I can do to improve the image quality in explorer? When I use the Netscpe browser, the graphics is perfect....I was hoping that is possible to do in Explorer as well....
    If you want you can go and have a look at the VI display
    at: http://134.7.139.176/.monitor?Performance%20Displa​y.vi&type=png&refresh=20&lifespan=240
    Hope someone can help me!Best regards Anne

    Hi Michael, and thanks for your answerI did as you said, disabled the autosizing and it worked!!But It would be better if I could size the panel relativ to the resolution of the monitor in IE. I tried that in LabVIEW, I went to the front panel of the VI, selceted file>>VI properties. Then I selected Window size and placed a checkmark in the Maintain proportion of window for different Monitor resolutions chechboks. I also placed a check mark in the scale all objects on panel. But this didn't work?Is there another way of doing this?
    Regards Anne

  • Improving image quality of transferred video

    I transferred old home movies from 8mm to dvd and then saved as .mov files on the mac for use in imovie. The video is grainy and a bit fuzzy and I want to improve the quality as much as possible for viewing the movie on a larger screen. I am thinking they will be improved if I reduce the image size of the video clips but cannot figure out how to do this.

    Part of the problem is you transfered your movies to a DVD. DVD content is mpg-2 compressed, and mpg-2 is a highly-compressed delivery format and not an editing format.
    There really isn't anything you can do to improve the image quality now - it is what it is.
    You could add a black-mask around the movies that would reduce the displayed size of your 8mm content and would avoid the quality issues of enlarging your content.
    A page I put together at http://homepage.mac.com/profpixel/QT_Pro_7xmasking.html describes how to reduce the size of video content to fit in the action/title safe area with Quicktime 7 Pro. You can adjust the mask size and offset to get the results you want.

  • Poor image quality? Why do Jpeg's look so bad?

    If anyone has tips on how to improve the image quality of jpeg's in acrobat.com I'd really like to hear them. I've edited the images in Photoshop (CS4), exported them as jpeg's, and inserted them into my acrobat.com presentation. They look horrible, and there are many artifacts. If I insert the same image into Powerpoint, they look considerably better, but I'd prefer not to have to use it. Is there an image quality setting that I'm missing?
    Thanks for any help,
    Rob

    Hi Rob,
    Thanks for posting - and sorry you're having trouble. It sounds as though the image's quality is suffering because it's being down-sized upon insertion. In Presentations, any images larger than 1024 on a side are resized to fit within a 1024 bounds (we do this to optimize performance - important for a web application).
    Here are some tips from one of our fine engineers:
    For the best looking images, pre-scale your images to fit the size of the presentation before you upload them; for reference, the slide canvas is 720 pixels wide and 540 pixels tall. Any image larger than those dimensions is larger than it needs to be on the client so you and your audience are downloading more data than they will ever see. If you resize your images to fit the size it will appear on the screen, you will have a better looking image.
    The choice of image format makes a difference at this scale as well. For image with smooth transitions like photographs of landscapes, jpeg is a good format. For computer generated diagrams like charts, or images with lots of details like text, PNG is a better format.
    It is important that the image be scaled to the appropriate size before uploading because the server will recompress any image it needs to scale using JPEG compression. So if you are uploading a PNG image with transparency, you will loose any transparency effect if the image is large enough to require scaling on the server.
    I hope this is helpful, Rob. Please let us know if you have any further questions.
    Best regards,
    Rebecca

  • Poor webcam image quality (HP Touchsmart Notebook

     I recieved a HP touchsmart Notebook as a Christmas gift and the image quality is  horrible! Even in a well lit environment, the image is still not clear. I have adjusted the settings to try to improve the image quality, but there is still not much of a difference in the way the images appear. I have also tried to reinstall the Cyberlink YouCam application but the image quality is still the same (poor). I like some features on my laptop, yet I'm still getting aquainted with it. However, the image quality along with a few other technical issues such as (freezes), has negatively impacted how I view this product. I hope that there is something that could be done! Please help!

    Hi @mzdymond01 
    Thank You for the inquiry, I will do my best to assist you!
    I understand you received this notebook at Christmas and image quality of the WebCam is poor.
    Have you done all your Windows updates?
    Have you tried Using automated troubleshooting (Windows 8)?
    Have you ran the HP Support Assistant to assist with HP updates?
    Here is a link to Webcam Troubleshooting (Windows 8) that will guide you through some steps.
    If the issue should remain I suggest contacting HP support for further assistance. As this is a new product you want to ensure everything is performing as it should.
    Please call our technical support at 800 474 6836. If you live outside the US/Canada Region, please click the link below to get a support number for your region.
    World Wide Phone Support
    Best of Luck!
    Sparkles1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!

  • Low image quality in pics

    Hi: I have a ipad 2 and when taking are blurry photos in low image quality. I have to do something to improve the image quality?
    I wait your comments...Thanks.

    Two main points:
    1.  Use good lighting.
    2.  Remember the photo is actually taken when you release the shutter ("take photo") button.  Make sure you do not move the iPad when you release the button.

  • Image quality on @nywhere master

    1.How cand I improve the image quality on this tuner? It looks worse than my ex tuner (wayjet) on the same os(xp) and system(radeon7000,p41800,256ddr).
    Where is the Invincible video quality supported by Silicon Tuner?
    2.What can I do to see both cable and antenna programs in the same tv list?
    I`ve tryed with free scan but it doesn`t work.
    3.The software in soo buggy  

    The signal of the cable is strong, i don`t hve problems with catching any tv station..
    The ideea is that the image quality is not as i expected(is not clear.I had two other tv tuners before and the quality of image of then was superior.I dont`t know what to do to improve de image.I`m not interested of capture, I want only to see my tv programs in a good conditions.So, pleasse help me someone to solve the problem...

  • Bad image quality when importing from word

    When importing from MS Word 2003 to RH X5.0.2, embedded
    images are converted to jpg whith an obviously quite moderate
    compression qulity. This is particularly evident for screenshots.
    Is there a way to improve the image quality?

    Peter , these images were copied and pasted directly in to
    the Word-document (using the Print Screen button) but I did find
    out something. RoboHelp generates two image files of the types PNG
    and JPG for each Word image (named, e.g., image102.png and
    image103.jpg). Regretably, the lesser quality JPG is always
    referenced in the topics instead of the much better PNG. Sometimes
    the two images greately differ in size (pixel size), but most of
    the time they are about the same size.
    So the task might be to change the references in all topics
    using a script and then manually checking the images for their
    size.
    An observation: Any GIF images in the Word file (i.e., real
    *.gif files that were inserted over the Insert menue) remain GIF
    files after the import, they are not converted and maintain a good
    quality.

  • Image quality of movie transferred from VHS

    I’ve recently begun using EyeTV 200 to transfer old VHS home movies to DVD using iMove and iDVD. The movies look OK on my monitor, but on the burned dvd, they don’t look as good – especially during quick pans (this is especially a concern for another movie I am working on as the camera was manned by a friend who had no reservations about whipping the camera around from scene to scene). I realize that I can expect some image quality loss due to the compression (and also due to the fact that the VHS tapes aren’t that great in quality to begin with), but I was wondering if there were other ways to improve the image quality through settings in iMovie or iDVD. Also, I am getting iLife ’06 this weekend. Are there any improvements in the compression in that version?
    Thanks,
    George

    Hi, George,
    I don't use Eye TV, but I have copied many hours of old VHS family movie tapes onto DV tapes using my camcorder.
    I was surprisingly pleased that the quality of the DV tapes was a big improvement over the original VHS tapes. I then imported the DV tapes into iMovie and have been creating DVDs of my old photos and movies.
    I have found that those VHS clips were darker and less clear when viewed in iMovie, but on the burned DVD they came out better. "Better" is a subjective term, because VHS quality is much less than digital to begin with, and the older the VHS tape, the worse quality. So, I am not sure why you are finding that the burned DVDs are not so good. I would expect them to be better, as I have found.
    Maybe it is because I recorded the tapes to digital first, before importing into iMovie. I did it this way because I wanted to have the DV tapes to preserve the VHS movies in addition to the iMovies and iDVDs that I am making.
    I have not yet purchased iLife 06 because of the problems I have been following in these forums. I have everything working well in v5, so I am going to continue on with that until I get more of my movies completed. I started with 1979, and am finishing 1990 this week! Only 15 more years-worth to go!
    Good luck to you!

  • How to get good image quality for an icon

    In the constructor of the main class which extends JFrame I set an icon by saying:
    this.setIconImage(new ImageIcon("image.jpg").getImage());
    This does not only set an icon on the title bar and the minimized window, it also creates an icon on my saved files (which are created with JFileChooser and ActionListener). However, the image quality of the icon on my saved files is bad, even though the image quality of the other icons is ok.
    The bad quality image has broken lines where it is supposed to have smooth lines. The size of the image I am providing is close to the size of the icon on my saved files, but the image I am providing looks a lot better (in Photoshop) than the icon.
    How did the icon get created for my saved files? Is it possible to improve the image quality?
    Thanks for looking at this!

    Well, it wasn't Java that created the icon on the saved files. It was the operating system, which used the icon that I had on my executable, once I said "open with" this executable.
    Well, now I am using a better icon maker program from Axialis, which creates icons at different sizes, and the icon on my saved files look perfect.
    Sorry for taking your time thinking about this.

  • Maximize image quality

    Under Preferences I have set the image quality to 'high' but
    I still get blurring in images (SnagIt) screen shots which I insert
    into PowerPoint. When viewing in PPT the images are very clear. But
    after Presenter has converted them to Flash and published them to
    Adobe server the images become significantly blurred. Is there any
    other way to improve the image quality? For example - using a
    certain file type to insert images into PPT, a setting in PPT, a
    setting in SnagIt, or a different setting in Presenter? Or, is this
    just the reality of converting PPT to Flash?
    Any help is appreciated
    thanks

    Unfortunately, Breeze applies some rather heafty compression
    on bitmap images, including gifs/jpgs and pngs.
    Others have reported that you can improve detail of
    screenshots a bit by using Captivate to capture the screenshots and
    then export the imagery as a .swf. Then, go back to the Breeze menu
    and trace down to the Insert Flash option to import the swf created
    in Captivate. Results are usually better, but it does require
    having to take an alternative approach. And for folks who don't
    have Captivate, it might not be a practical approach either.
    Two other possible solutions, but both require the right kind
    of software to do it: If you have other applications that export as
    .swf (like Illustrator, Freehand, etc), you might want to try
    importing your screenshot and then exporting as a swf from there,
    or you could do the same thing right from Flash if you have it.
    Hope that helps!
    Rob

  • Image quality reduced when scaled down on black background

    I am trying to view two tracks at the same time so I have scaled them down. Once I rendered them, the quality was horrible and then I changed the background to checkerboard instead of black, which worked, but I would like a black background for viewing, so how do I fix the poor image quality problem?

    I'm guessing you're making this judgement in the Canvas. You really can't. Check it on an external CRT, and make sure your render settings are all set to their highest. Just because it plays back or evven has a proxy render doesn't mean you're seeing its highest quality.
    Are you saying that when you put them over a different background the quality improved? I don't know why that would be, bbut if it works then try putting a slug on V1 as a black background.
    Or by checkerboard you mean you set the Canvas to a different mode...?

Maybe you are looking for