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: 06:15:42 07/08/00 Sat
Author: Seraj S Dhaliwal
Subject: Re: Get Dibfailed with doing brightness or some transformations??
In reply to: Michel 's message, "Re: Get Dibfailed with doing brightness or some transformations??" on 20:34:10 07/05/00 Wed

The size of the graphics is variable, can be less than 1024 or greater than 2megs. Most of this is less than 500k.

>
> Dear Seraj,
>
> It is indeed strange. Usually, GetDib can fail when
> the image is very large. In your case, what is the
> size and image format?
>
> Best regards,
>
> Michel
>
> > Below is the code it gives error "Get DIB Failed" if
> I
> > perform it after another transformation action??
> >
> > procedure TfrmMain.IncreaseBrightness1Click(Sender:
> > TObject);
> > var lTransform: TBrightnessTransform;
> > lUndoGraphic, lDestGraphic: TDibGraphic;
> > begin
> > {.. here we adjust the image to increase
> > brightness ..}
> > Screen.Cursor := crHourGlass;
> > lUndoGraphic := TDibGraphic.Create;
> > lDestGraphic := TDibGraphic.Create;
> > lUndoGraphic.Assign(Image1.Picture.Graphic);
> >
> > lTransform := TBrightnessTransform.Create;
> > try
> > try
> > lTransform.Percent := 3;
> > lTransform.ApplyOnDest(lUndoGraphic,
> > lDestGraphic);
> > // ============= ERROR !! ERROR =============
> > // above line results in error, after a emboss or
> > other
> > // transformation, but works fine if tried the first
> > time??
> > // look below for the emboss routine, it works fine
> >
> > Image1.Picture.Assign(lDestGraphic);
> > finally
> > lTransform.Free;
> > lUndoGraphic.Free;
> > lDestGraphic.Free;
> >
> > Screen.Cursor := crDefault;
> > end;
> > except
> > end;
> > end;
> >
> > procedure TfrmMain.btnIMGEmbossClick(Sender:
> TObject);
> > var lTransform: TEmbossTransform;
> > lUndoGraphic, lDestGraphic: TDibGraphic;
> > begin
> > {.. here we adjust the image to emboss ..}
> > Screen.Cursor := crHourGlass;
> > lUndoGraphic := TDibGraphic.Create;
> > lDestGraphic := TDibGraphic.Create;
> > lUndoGraphic.Assign(Image1.Picture.Graphic);
> >
> > lTransform := TEmbossTransform.Create;
> > try
> > try
> > lTransform.ApplyOnDest(lUndoGraphic,
> > lDestGraphic);
> >
> > Image1.Picture.Assign(lDestGraphic);
> > finally
> > lTransform.Free;
> > lUndoGraphic.Free;
> > lDestGraphic.Free;
> >
> > Screen.Cursor := crDefault;
> > end;
> > except
> > end;
> > end;

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