The effect is to let the user define a round "cookie" selection in an image and then "twist" it -180 to 180 degrees.
Unzip into a folder. Copy a large picture into the Project folder and rename it "sample.jpg" or update this line:
The "work image" is scaled to fit the Form. You can click the Restore button in the caption bar and then drag to resize the Form as usual.
That actual clipping and rotation occurs on the original image however, which can be larger or smaller than the area displayed within the Form.
The user interface isn't very refined, but should give you the idea. The scale factor in % is displayed in the caption bar to give you some idea of the scaling that is active.
The Pic object holds the original or edited image, so you can use any code you can already find here in the CodeBank for saving a bitmap-type IPicture/StdPicture to disk with or without compression. Even VB's SavePicture works, though it can only save as an uncompressed BMP image file.
Unzip into a folder. Copy a large picture into the Project folder and rename it "sample.jpg" or update this line:
Code:
Private Const SAMPLE_PIC_FILE As String = "sample.jpg"
- Run the program.
- Make a circular selection by left-clicking at the center then dragging out to establish the radius.
- Then you can use the Up/Down control to set a rotation angle in degrees.
- After that you can click on the rotation Command button linked to the Up/Down to perform the desired rotation.
- Make a new selection, or click on the Reload button.
The "work image" is scaled to fit the Form. You can click the Restore button in the caption bar and then drag to resize the Form as usual.
That actual clipping and rotation occurs on the original image however, which can be larger or smaller than the area displayed within the Form.
The user interface isn't very refined, but should give you the idea. The scale factor in % is displayed in the caption bar to give you some idea of the scaling that is active.
The Pic object holds the original or edited image, so you can use any code you can already find here in the CodeBank for saving a bitmap-type IPicture/StdPicture to disk with or without compression. Even VB's SavePicture works, though it can only save as an uncompressed BMP image file.