[Gambas-user] image rotate

Ondrej Beranek rainbof at ...626...
Sun Apr 10 12:18:02 CEST 2011


but it not worki'n

I solve that with copy pictrure to separate variable, rotate it by property
rotate() and after that bring it back...

this code

  DIM mypic AS image
  mypic = PictureBox1.Picture.Image
  mypic = mypic.Rotate(Rad(95))

  PictureBox1.Picture = mypic.Picture

but this is very slow solution. Any idea how to make it faster ?



2011/4/10 Kevin Fishburne <kevinfishburne at ...1887...>

> On 04/09/2011 05:37 PM, Ondrej Beranek wrote:
> > Hi,
> >
> > i am new user of gambas. I write small webcam application. I need rotate
> > image i try PictureBox1.Picture.Image.Rotate(95)  but it does not work...
>
> My experience with rotation is by rotating an image buffer directly
> (rather than by using a DrawingArea or PictureBox), so this may not
> apply, but you might want to convert your "95" number to radians.
> Something like "rotateshit(Rad(95))". Rotations use radians rather than
> degrees, but gb has a nice Rad() function for converting degrees to
> radians.
>
> If that doesn't work then the logic behind rotating a PictureBox is
> flawed (yours or gb's).
>
> I use something like:
>
> rotatedimage = nonrotatedimage.Rotate(Rad(angle_in_degrees))
>
> You're trying to deal with a PictureBox directly, but that's outside my
> expertise.
>
> --
> Kevin Fishburne
> Eight Virtues
> www: http://sales.eightvirtues.com
> e-mail: sales at ...1887...
> phone: (770) 853-6271
>
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list