Change (Resize) Image on DELPHI 7

Posted on 2007-10-18
Last Modified: 2012-08-13
i  load image that real size is  700x500 and would like to change image size on run time to 300x200.  Please show me examples how to do it. My Image is JPG format.
Question by:selas
    1 Comment
    LVL 15

    Accepted Solution

    Do you have a TImage component on the form of size 300x200 that you are loading the larger image into?

    Ill assume this is what you are doing and that a TImage component ( call it image1) is on the form, and that you are holding the larger 700x500 image (call it myImage) in memory.
    I think the stretchDraw command is all you would need
    image1.canvas.stretchDraw( image1.canvas.clipRect, myImage);

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
    Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    730 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