I have tens of pictures I want my users to be able to re-size easily. I built a small function that does the trick but I feel there has to be a better way. Below is an example of what I'm doing. Since the pictures are always changing, I only know the reference to the picture box. One of the issues with this strategy is that by re-sizing the picture several times it degrades the quality.
I was wondering if anyone has used the << Inval, or << Inval Size; I feel one of these two methods would be slicker.
Also, does anyone know the difference between << Get Image; and << Get Picture? The results from the Get Picture are slightly smaller and the BLOB's are completely different - get Image being larger.
Names Default to Here(1);
img = new image("$SAMPLE_IMAGES/tile.jpg");
imgSize = 300;
img << Set Size({imgSize,imgSize});
New Window("Test", vlistbox(Slider Box(100,1000,imgSize),
Button Box("Set Size",
tempImage = pb << Get Image;
tempImage << Set Size({imgSize,imgSize});
pb << Set Image(tempImage);
),
pb = picturebox(img)));