?
Solved

resizing image

Posted on 2001-06-03
3
Medium Priority
?
206 Views
Last Modified: 2010-04-06
there is a part in my program for loading pictures(bmp and jpeg). Sometimes pictures are with resolution of 100DPI and they are just ok for showing in my program. But sometimes they are with diferent resolutions. For example 75DPI or even 300DPI. i want to resize them and to show them in my program as they are with 100DPI (program's default resolution). Does anyone knows how can i do that?

thanks in advance.
0
Comment
Question by:zastava101
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
edey earned 140 total points
ID: 6151335
Well I can sugest three way.

1)draw them using canvas.stretchDraw instead of canvas.draw. This prob. won't look so good if you're reducing iages with text/lines in them

2)Write your own strechDraw routine.  This is a fair bit of work and should prob. be used only as a last resort

3)Use the TJPEG object. Assign your bit map to a jpeg, resize then assign back again.  This method is also usefull for converting images to greyscale.  It may seem like overkill, but there's a lot of good gfx code wrapped up in the jpeg spec/implementation

GL
Mike
0
 

Author Comment

by:zastava101
ID: 6154785
yes.
method 3) is what i needed. thanks for your help Mike.
0
 
LVL 6

Expert Comment

by:edey
ID: 6154948
Excellent, Glad to be of service :)

GL
Mike
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

743 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