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: 123456789[10] ]


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

Date Posted: 07:11:31 05/16/00 Tue
Author: Michel
Subject: Re: How can I save a paintbox into a bitmap file
In reply to: Carlos Ramírez 's message, "How can I save a paintbox into a bitmap file" on 00:28:40 05/15/00 Mon


Hi Carlos,

The easiest way to transfer images from one type of component or class to another is usually to search for a Canvas property in both objects. For example, to transfer the contents for a paint box to a TJpegGraphic,

JpegGraphic := TJPegGraphic.Create;
JpegGraphic.NewImage(
PaintBox.Canvas.Width,
PaintBox.Canvas.Height,
ifTrueColor, nil, 0, 0 );
JpegGraphic.Canvas.Draw(0, 0, PaintBox.Canvas );
JpegGraphic.SaveToFile(...);
JpegGraphci.Free;

For the minimize and scroll box problems I am not sure what is wrong. Also, I think you made the right decision to draw an a TPaintBox rather that a TImage as the refreshes will be faster.

Best regards,

Michel


> I´m developing an image editor in Delphi 5 and I don´t
> know how to save the paintbox's content into a bitmap
> or jpeg file.
>
> Another problems:
> When I minimize the form, the paintbox's image
> disapperars. How can I avoid this?
> When I draw a bitmap or jpeg image on the paintbox
> that is larger than the paintbox's area, the
> scrollbars don´t appear although the paintbox is on a
> scrollbox. How can I do a scrollable paintbox?
>
> The above problems don't happen if I use a Timage
> component, but when I draw on it, the image blinks.
> Why? How can I avoid that?
>
> I`ll be very greateful if somebody can help me.
>
> Carlos Ramírez E-mail: zenius@yupimail.com

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

[ 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.