VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 123456[7]8910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 06:18:26 11/01/01 Thu
Author: Michel
Subject: Re: Increasing the size of a JPEG
In reply to: Gregg Van Oss 's message, "Increasing the size of a JPEG" on 17:30:19 10/31/01 Wed


Hi Gregg,

You need to create a new image, and copy the smaller one into it.

For example,

NewGraphic := TDibGraphic.Create;
NewGraphic.NewImage( ... )
NewGraphic.Canvas.Draw( X, Y, SmallerGraphic );
ImageScrollBox.Graphic := NewGraphic;
ImageScrollBox.Redraw(True);
NewGraphic.Free;

Best regards,

Michel



>I’m working with JPEG images and I need to change the
>size if it’s below a certain minimum. For example, if
>the user loads a 300x300 image, I want to add a
>boarder on the right and bottom to make the image
>800x600. Not by stretching the image, but just adding
>a blank boarder. Cropping is easy with the transform,
>but this is proving to be trickier than I’d expected.
>If I change the width of the graphic, I get an
>exception that says I must use the NewImage method.
>But by calling ImageScrollBox.Graphic.NewImage, I get
>an entirely new blank image, rather than just changing
>the dimensions of the existing image. What should I be
>doing here?

[ Next Thread | Previous Thread | Next Message | Previous Message ]


Replies:


[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.