cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
TWE
TWE
Level III

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;

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Craige_Hales
Super User

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.Use <<rotate(-90) and then show the new image in a separate window.

Craige

View solution in original post

andersonmj2
Level IV

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!

View solution in original post

3 REPLIES 3
txnelson
Super User

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;

txnelson_0-1674559046975.png

 

Jim
Craige_Hales
Super User

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.Use <<rotate(-90) and then show the new image in a separate window.

Craige
andersonmj2
Level IV

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!

Recommended Articles