Rotating an image, omg I cant !!! - Printable Version +- Forums (http://mitov.com/forum) +-- Forum: VCL Components (/forum-6.html) +--- Forum: VideoLab (/forum-19.html) +--- Thread: Rotating an image, omg I cant !!! (/thread-1306.html) |
Rotating an image, omg I cant !!! - oliveiracarlos - 01-03-2013 01:11 AM Please people help me to rotate a simple image. I´m using Delphi. My code is working. In my form i have one TVLDSImageDisplay and one TLVRotate. I dont know how to rotate the image after display. Inside the "TLVRotate.InpuPin" property, there is nothing to select. This is my code: Code: procedure TForm1.Button1Click(Sender: TObject); Pleaseeeeee !!! thanks. RE: Rotating an image, omg I cant !!! - Dave - 01-03-2013 01:26 AM Hi! After setting the angle try the VLRotate ProcessBitmap method. Regards, Dave RE: Rotating an image, omg I cant !!! - oliveiracarlos - 01-03-2013 01:47 AM Dave, it works... But after set the angle value the image do not rotate over the center ! Take a look please. http://s9.postimage.org/lwf1m5s33/knob_Img1.jpg http://s9.postimage.org/4kep0pylr/knob_Img2.jpg http://s9.postimage.org/uh8ddc29b/knob_Img3.jpg thanks. RE: Rotating an image, omg I cant !!! - Dave - 01-03-2013 05:10 AM Check the VLRotate.RotateOffset.Mode, make sure it's set to cmCenter. Regards, Dave RE: Rotating an image, omg I cant !!! - oliveiracarlos - 01-03-2013 06:46 AM Thanks for reply Dave. But yes, its cmCenter. No matter what I do, I cant center the button. If you have some time to help, appreciate that: https://docs.google.com/open?id=0B-WCIyMlx7bxOHZKTlI4dDlBdWc (Its a Delphi XE project) all the code is as following... Code: unit uKnobButton; Code: object Form1: TForm1 thanks in advanced. RE: Rotating an image, omg I cant !!! - Dave - 01-03-2013 10:54 AM Try this: procedure TForm1.TrackBar1Change(Sender: TObject); begin VLRotate1.Angle := TrackBar1.Position; VLRotate1.ProcessBitmap(img,img); VLDSImageDisplay1.DisplayBitmap(img); You'd probably want to re-assign the original image to img once you did this. If it still fails i can have a look at the project tommorow. Is the original image 121x121 btw? Regards, Dave RE: Rotating an image, omg I cant !!! - oliveiracarlos - 01-04-2013 05:28 AM Sorry Dave, but it doesnt work... Adding this last line the image flicks a lot and still not rotating in center. Yes the image has 121x121. :/// thanks for your help. RE: Rotating an image, omg I cant !!! - Dave - 01-04-2013 09:16 AM Try Image2.Center=true; Regards, Dave RE: Rotating an image, omg I cant !!! - oliveiracarlos - 01-05-2013 04:31 AM Simple and perfect solutions, thanks a lot mr Dave. RE: Rotating an image, omg I cant !!! - Dave - 01-05-2013 06:07 AM You're welcome |