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


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

Date Posted: 07:37:12 11/14/00 Tue
Author: Michel
Subject: Re: How can I save contents of printer DC to Bitmap file
In reply to: Alex 's message, "Re: How can I save contents of printer DC to Bitmap file" on 04:19:10 11/14/00 Tue


Hi Alex,

TPrinter has a Canvas property so you can transfer the canvas of Printer to the canvas of a TJpegGraphic. If I got the parameters right it should look like:

JpegGraphic := TJpegGraphic.Create.

JpegGraphic.NewImage(...);

JpegGraphic.Canvas.CopyRect( DestRect, Printer.Canvas, SourceRect);

Best regards,

Michel

{

> > I captured a screen one screen using
> > hdc = GetDC(DeskHwnd);//change
> > hdcMem = CreateCompatibleDC(hdc);
> > hBitmap = CreateCompatibleBitmap(hdc, fwidth,
> fheight);
> > SelectObject(hdcMem, hBitmap);
> > BitBlt(hdcMem, 0, 0, fwidth,
> > fheight,hdc,rect.left,rect.top,SRCCOPY);
> >
> > Now the captured screen is in Device context memeory
> >
> > Please help me how to save this screen from Device
> > context
> > as jpeg file
> >
> > Thank you
> > Hemanth

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