cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

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

Zooming into Picture Box Image

I have a window that pops up with an image, I would like to have the users able to zoom into the image to see more details but I don't see any zoom capabilities in the window. How can I accomplish this?

dt = Current Data Table();
// Plot bitmap bitmap = New Window( (dt << Get Name()) || " Bit Map", pic_file = Open( file_path, png); pic_file << Set Size( {500, 500} ); pb = Picture Box( pic_file ); );
3 REPLIES 3
jthi
Super User

Re: Zooming into Picture Box Image

Offering images through Graph Box is one option which would allow the users can use Magnifier tool from toolbar.

Edit: forgot to add example script

Names Default To Here(1);

imgBox = Graph Box(frameSize(500, 500), SuppressAxes);
win = New Window("Image", imgBox);

img = Open("$SAMPLE_IMAGES/tile.jpg", "jpg");
img << Set Size({500,500});

fb = win[framebox(1)];
fb << AddImage(Image(img));
img_seg = fb<< FindSeg(PictSeg(1));

img_seg << Fill Graph;
img_seg << lock(1);

Write();
-Jarmo
hogi
Level XIII

Re: Zooming into Picture Box Image

wow, very creative/useful workaround !!!

 

hogi
Level XIII

Re: Zooming into Picture Box Image

After defining imageZoom, one can use it wherever it's needed:

PictureBoxZoom = Function( {filename},
	window:img = Open( filename, "jpg" );
	Graph Box(
		frameSize( 300, 300 ),
		SuppressAxes,
		<<AddImage( Image( window:img ), Fill Graph, Lock( 1 ) )
	);
);

New Window( "Image",
	Outline Box( "Zoom Image",
		Text Box( "press CTRL to zoom"),
PictureBoxZoom( "$SAMPLE_IMAGES/tile.jpg" ) 
	)
);

Recommended Articles