[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

resizing image

Posted on 2001-06-03
3
Medium Priority
?
208 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
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…
Suggested Courses

649 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