VoyForums

VoyUser Login optional ] [ 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: 2.94, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2008 Voyager Info-Systems. All Rights Reserved.