Change (Resize) Image on DELPHI 7

Posted on 2007-10-18
Medium Priority
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

mikelittlewood earned 500 total points
ID: 20100285
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Loops Section Overview
Screencast - Getting to Know the Pipeline
Suggested Courses

839 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