picture resampling

Posted on 2009-04-24
Last Modified: 2012-06-27

what controls are available to do resampling in the code? I need to resample the pictures to a final size equal 1MB. How can I do this? Generally, for the re sampling they require to change  the width and height. What we need is to enter the size = 1 MB and generate the picture with a specific width and height.
Question by:janeli1
    LVL 26

    Expert Comment

    by:David Brugge
    How do you want to implement this and how much resampling are you referring to?

    Author Comment

    We have a Windows desktop application that allows user to add photos to a database.
    Upon selecting a photo from the HD, the app should automatically re sample the picture and save it in the database with the new size equal 1 MB.
    The width and height don't matter, once the size is approx 1 MB (as long as the ratio is kept).
    What 3rd party control can accomplish this?

    LVL 26

    Accepted Solution

    There are a great many stand alone applications  as well as code sources  for asp, php and C+ on the Internet.

    One of the best documented and the program with the largest coder community support is Imagemagick (

    It can be used in conjunction with magick-core (,  low-level interface between the C programming language and the ImageMagick image processing libraries, or the more simple magick-wand
    ( which uses a smaller and simpler library.

    Or you may want to look at a simple application such as or many people's favorite...


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
    This article shows how to convert a multi-page PDF file into multiple image files, with one image file created for each page of the PDF. It does this by utilizing an excellent, free software package called GraphicsMagick. The solution is amazingly s…
    The goal of this is to tech the user how to export photos out of Lightroom and the different options they have. Select which photos you want to export : Select where you want to export and with which options : Export :
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now