- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Image rotation
Hi,
I cannot rotate an image. The script in the "Scripting Index" is also not rotating the image.
Names Default To Here( 1 );
New Window( "Example", pb = Picture Box( Open( "$SAMPLE_IMAGES/tile.jpg", jpg ) ) );
image = pb << Get Image();
image << rotate left;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Image rotation
Cool. There is something broken about the scripting index example though... (edit: sent note to dev team)
Before I saw Jim's answer, I modified the example a different way:
Use <<rotate(-90) and then show the new image in a separate window.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Image rotation
I agree that there is an issue with the Scripting Index - the way I look at the code is that in one you get a handle to the Picture Box object and in the other you get a handle to the image. So rotating the image doesn't matter until you then display it as you showed.
If you put a "Wait (1);" in @txnelson code before the "pb << rotate left;" line, you will see the image displayed and then rotated in place.
Thanks for your answers - not something I have tripped over yet, but would have soon!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Image rotation
Try this
Names Default To Here( 1 );
New Window( "Example", pb = Picture Box( Open( "$SAMPLE_IMAGES/tile.jpg", jpg ) ) );
pb << rotate left;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Image rotation
Cool. There is something broken about the scripting index example though... (edit: sent note to dev team)
Before I saw Jim's answer, I modified the example a different way:
Use <<rotate(-90) and then show the new image in a separate window.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Image rotation
I agree that there is an issue with the Scripting Index - the way I look at the code is that in one you get a handle to the Picture Box object and in the other you get a handle to the image. So rotating the image doesn't matter until you then display it as you showed.
If you put a "Wait (1);" in @txnelson code before the "pb << rotate left;" line, you will see the image displayed and then rotated in place.
Thanks for your answers - not something I have tripped over yet, but would have soon!