Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to shrink a jpeg image?

Posted on 2002-03-07
4
Medium Priority
?
320 Views
Last Modified: 2013-11-19
i have a big area jepg image , i want it shrink into
smaller, how to realize it in program ?

for example , a 200 * 200 jpeg image shrink into a
100 * 100 jpeg image
0
Comment
Question by:escaper
[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
  • 2
4 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6847201
convert it to a bitmap,
shrink the bitmap (maybe with bitblt)
convert back to jpeg
0
 
LVL 6

Accepted Solution

by:
DrDelphi earned 200 total points
ID: 6848414
var bmp:Tbitmap;
    jpg:TJpegImage;
begin
   jpg:=TJpegimage.create;
   Bmp:=Tbitmap.create;
   with bmp do
   begin
     height:=100;
     width:=100;
   end;
   Jpg.loadFromfile('z:\parsonsd\maya.jpg');
   bmp.Canvas.StretchDraw(Bmp.canvas.ClipRect,jpg);
   jpg.assign(bmp);
   jpg.SaveToFile('z:\new.jpg');
   freeandNil(jpg);
   FreeAndNil(bmp);
end;
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6848433
yep, thats it
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 6848460
<g>

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
In this Micro Tutorial viewers will learn how to remove an unwanted object using Photoshop’s feature known as content-aware fill.
Learn how to set up basic frames and paths in Prezi and understand the open space that Prezi allows you to create presentations in.
Suggested Courses

715 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