Board index » delphi » How to copy one image to a nother.

How to copy one image to a nother.

I have an image on a hidden form and I need to copy the image to a printer the regular BitBlt commands don't work because the image is not visible at the time of the copy.

Is there another way to copy an image without the BitBlt ?

thanks,

 

Re:How to copy one image to a nother.


Is that a TImage? You can use Canvas.CopyRect (but I think it call Bitblt also).

P.S. You cannot copy invisble the Form, as the image of Form is not save in memory!

--

Samson Fu
- http://www.SamsonFu.com
- http://www.HKprogrammer.com

Quote
"Eran Eldar" <era...@hotmail.com> wrote in message news:3d5d74fa$1@dnews...

> I have an image on a hidden form and I need to copy the image to a printer the regular BitBlt commands don't work because the

image is not visible at the time of the copy.
Quote

> Is there another way to copy an image without the BitBlt ?

> thanks,

Re:How to copy one image to a nother.


I think canvas.copyect() works on invisible images.

Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net

Quote
Samson Fu wrote:

> Is that a TImage? You can use Canvas.CopyRect (but I think it call Bitblt also).

> P.S. You cannot copy invisble the Form, as the image of Form is not save in memory!

Re:How to copy one image to a nother.


Quote
> I think canvas.copyect() works on invisible images.

It works for offscreen bitmaps (TBitmap, TPicture...).

But all TwinControl do not save the image in memory. So cannot copy invisible TWinControl's image.

--

Samson Fu
- http://www.SamsonFu.com
- http://www.HKprogrammer.com

Quote
"Rene Tschaggelar" <tschagge...@dplanet.ch> wrote in message news:3D5E2BB6.E87A8469@dplanet.ch...
> I think canvas.copyect() works on invisible images.

> Rene
> --
> Ing.Buero R.Tschaggelar - http://www.ibrtses.com
> & commercial newsgroups - http://www.talkto.net

> Samson Fu wrote:

> > Is that a TImage? You can use Canvas.CopyRect (but I think it call Bitblt also).

> > P.S. You cannot copy invisble the Form, as the image of Form is not save in memory!

Re:How to copy one image to a nother.


Quote
Eran Eldar <era...@hotmail.com> wrote in message news:3d5d74fa$1@dnews...

> I have an image on a hidden form and I need to copy the image to a printer

the regular BitBlt commands don't work because the image is not visible at
the time of the copy.

Quote

> Is there another way to copy an image without the BitBlt ?

> thanks,

If a window isn't displayed on screen it can't have a device context
associated with it. If it is only partially displayed, the DC only refers to
the visible part. So you can't bitblt from it (not can you use copyRect,
which uses bitblt).

What you have to do is get at the graphic that is loaded in the Image's
Picture property (Image1.Picture.Graphic), and print that. How you do that
depends on what type of graphic it is. bitmap, jpeg ... whatever.

Other Threads