Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8503229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:42:05+00:00 2026-06-11T01:42:05+00:00

I am currently using http://code.google.com/p/java-image-scaling/ this library to generate scaled images for my web

  • 0

I am currently using http://code.google.com/p/java-image-scaling/ this library to generate scaled images for my web app.But when I scale down the image to about 100×100 size there are some leftover artifacts visible in some images. Is this an issue with antialiasing? And how do I use antialiasing with this library.The api documentation doesn’t say any thing about it.

Here is the code

File f = new File("C:\\Users\\ad min\\Pictures\\30-whisky-3d-wallpaper-1152x864.jpg");
        BufferedImage src = ImageIO.read(f);

        //ResampleOp resampleOp = new ResampleOp(76, 76);
        ResampleOp resampleOp = new ResampleOp(200,200);
        resampleOp.setUnsharpenMask(AdvancedResizeOp.UnsharpenMask.VerySharp);
        BufferedImage rescaled = resampleOp.filter(src, null);

        ImageIO.write(rescaled, "JPG", new File(
                "C:\\Users\\ad min\\Pictures\\scaleddown.jpg"));

what am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:42:06+00:00Added an answer on June 11, 2026 at 1:42 am

    I finally didn’t need antialiasing I simply used this code given in the foloowing link and it worked 🙂 whewww

    http://www.universalwebservices.net/web-programming-resources/java/adjust-jpeg-image-

    compression-quality-when-saving-images-in-java
            Iterator<ImageWriter> iter = ImageIO
                    .getImageWritersByFormatName("jpeg");
            ImageWriter writer = (ImageWriter) iter.next();
            // instantiate an ImageWriteParam object with default compression
            // options
            ImageWriteParam iwp = writer.getDefaultWriteParam();
            iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
            iwp.setCompressionQuality(1); // an integer between 0 and 1
            // 1 specifies minimum compression and maximum quality
            File file = new File("C:\\Users\\ad min\\Pictures\\scaleddown.jpg");
            FileImageOutputStream output = new FileImageOutputStream(file);
            writer.setOutput(output);
            IIOImage image = new IIOImage(rescaled, null, null);
            writer.write(null, image, iwp);
            writer.dispose();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently I'm using the Java mail library at http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_(no_Intents)_in_Android to accomplish this; however I
I am using the following test runner: http://code.google.com/p/migen/source/browse/trunk/java/src/uk/ac/lkl/common/util/testing/LabelledParameterized.java?r=3789 What it does is change the
I am using this plugin http://code.google.com/p/bvalidator/ $('#vendorDetailsForm').bValidator(); if ( $('#vendorDetailsForm').data('bValidator').isValid() ) { $(#addVendorsTabs).tabs('select', 4);
currently i using this code in phonegap application var xmlhttp = new XMLHttpRequest(); xmlhttp.open(GET,http://192.168.1.19:8080/searchMobile?categoryRequest=true,
I'm currently using Brendan Tompkins ImageQuantization dll. http://codebetter.com/blogs/brendan.tompkins/archive/2007/06/14/gif-image-color-quantizer-now-with-safe-goodness.aspx But it doesn't run in medium
Currently, I'm trying to get a list of advertisers (See http://code.google.com/apis/gan/v1beta1/advertisers/list.html ) with my
I'm using cocoaasyncsocket to send data Google Protocol Buffers (using http://code.google.com/p/metasyntactic/wiki/ProtocolBuffers ) to a
I am creating an android game using opengl and a cocos2d port (http://code.google.com/p/cocos2d-android-1). I
Something like this. http://code.google.com/p/squiggle-sql/wiki/Tutorial . This is required for cases where It is required
I found a sat solver in http://code.google.com/p/aima-java/ I tried the following code to solve

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.