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:21:05 04/19/00 Wed
Author: Michel
Subject: Re: Converting TiffGraphic to TBitmap
In reply to: Maik 's message, "Re: Converting TiffGraphic to TBitmap" on 03:20:42 04/19/00 Wed


Hi Maik,

Yes there may be another way, but if your bitmaps are very large, it may be difficult.

I think the safest approach will be to use the ScanLine properties of the TDibGraphic and TBitmap classes.

For example, if your bitmap and tiffgraphic have the same color depth, for example, 24 bit.

Bitmap.PixelFormat := pf24bit;
Bitmap.Width := TiffGraphic.Width;
Bitmap.Height := TiffGraphic.Height;

If you get an EOutOfResources here, try setting the dimensions before the pixel format. I don't remember which way is less resource intensive.

Then copy every horizontal scan line from the source image to the destination image using the ScanLine property of each image.

Let me know if you need more assistance.

Best regards,

Michel

> Michel
>
> I tried, but I got an EOutOfResources Error.
> This is maybe because I use very large bitmaps.
> Is there another way to convert ???
>
> best regards
> maik
>
> >
> > Hi Maik,
> >
> > You can assign a TBitmap directly from any class
> > derived from TDibGraphic. For example,
> >
> > Bitmap->Assign( TiffGraphic );
> >
> > This works, because the TDibGraphic class has
> > overriden the AssignTo method.
> >
> > Best regards,
> >
> > Michel
> >
> > > Hi,
> > >
> > > I try to convert a TTiffGraphic into TBitmap,
> because
> > > I want to use a rotation function wich needs a
> > > TBitmap as parameter. Is this possible - how can
> > > I do it ?

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