Re: Auto Scale Image View to 100%

Posted by Cochella Chris on
URL: http://imagej.273.s1.nabble.com/Auto-Scale-Image-View-to-100-tp3693384p3693387.html

Thank you for the reply.

I am loading images with the applet parameters like:

<applet codebase="."
        code="ij.ImageJApplet.class" archive="./ij-1.42h.jar"
        width=750 height=550
        security=all-permissions>

<param name=url1 value="https://my.site.com/4029.jpg">
<param name=url2 value="https://my.site.com/4030.jpg">
       
</applet>


I would prefer not to output all the javascript code as the above is a  
nice simple solution.

Are there any attributes I can put in the "param" element and/or the  
applet element?


Thanks,
Chris



On Mar 4, 2009, at 11:06 AM, Wayne Rasband wrote:

> On Mar 4, 2009, at 6:27 AM, Albert Cardona wrote:
>
>> Cochella Chris wrote:
>>> Hi All,
>>>
>>> Is there a way to give imagej a parameter for each image loaded  
>>> via a URL so that it loads and scales the image for 100% view?
>>>
>>>
>>> We have images larger than the current window size and would like  
>>> them to load so that the complete image is viewable on first load.
>>
>>
>> Hi Chris,
>>
>> You could run the "Zoom Exact" plugin from my website on each  
>> opened image.
>> Something like (in javascript):
>>
>> var imp = IJ.openImage("http://path/to/image.tif");
>> imp.show();
>> IJ.run(imp, "Zoom Exact", "zoom=100");
>>
>>
>> The Zoom exact plugin lets you set 35, 134, whatever magnification  
>> you want, in percent, while keeping the size of the canvas limited  
>> to the screen dimensions.
>>
>> The plugin is here:
>> http://albert.rierol.net/software.html#ImageJ%20plugins: 
>> %20miscellaneous
>
> Albert's plugin is built into the ImageJ 1.42k daily build as the  
> Image>Zoom>Exact command so you can open an image from a URL at 100%  
> using macro code, for example:
>
>   open("http://rsb.info.nih.gov/ij/images/NileBend.jpg");
>   run("Exact...", "zoom=100");
>
> Or you can check "Open Images at 100%" in Edit>Options>Appearance  
> and all images will open at 100%.
>
> -wayne