Retaining image size after being resized
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Retaining image size after being resized
I'm scripting the resizing of an image by setting the image width and height.
I use the create command to make an image control, give the image a URL, set the resizeQuality parameter, set the height and width, and it looks perfect on the card. However, when I go to another card and then come back the image is back at it's original size (very large).
Is there something I'm missing that's not saving the new size? Is it possible?
I use the create command to make an image control, give the image a URL, set the resizeQuality parameter, set the height and width, and it looks perfect on the card. However, when I go to another card and then come back the image is back at it's original size (very large).
Is there something I'm missing that's not saving the new size? Is it possible?
Re: Retaining image size after being resized
Pehab
lock the image after you have finished altering its height and width to your wishes...
be well,
Dixie
lock the image after you have finished altering its height and width to your wishes...
Code: Select all
set the lockLocation of image x to true
Dixie
Re: Retaining image size after being resized
That works, thanks!Dixie wrote:Pehab
lock the image after you have finished altering its height and width to your wishes...be well,Code: Select all
set the lockLocation of image x to true
Dixie
Now, is the image part of the stack now, or is it just reading it off of the disk again. The latter seems true. I want it to be the former. I'm making a stack that is a collection of images for other uses elsewhere in the project.
Re: Retaining image size after being resized
Pebah..
Look at 'import' command in the dictionary...it allows you to create an image, amongst other things, and copy the contents of the file into the object.
be well
Dixie
Look at 'import' command in the dictionary...it allows you to create an image, amongst other things, and copy the contents of the file into the object.
be well
Dixie
Re: Retaining image size after being resized
Thanks for that.
I'm reading now that I really shouldn't be importing the images to minimize memory use.
Is there a way to save the resized images back to disk? The save command seems to only refer to saving the stack.
I'm reading now that I really shouldn't be importing the images to minimize memory use.
Is there a way to save the resized images back to disk? The save command seems to only refer to saving the stack.
Re: Retaining image size after being resized
Pebah...
Now you are making me smile...
Have a look at the 'Export' command in the dictionary. You will be able to then put the file wherever you want to...
be well
Dixie
Now you are making me smile...

be well
Dixie
Re: Retaining image size after being resized
Pehab...
Attached a stack... the folder contains the stack and an image file, click the import button and then the export button... the exported file will be saved to the folder... look at the stack script as well as the button scripts...
hope it helps...
Dixie
Attached a stack... the folder contains the stack and an image file, click the import button and then the export button... the exported file will be saved to the folder... look at the stack script as well as the button scripts...
hope it helps...
Dixie
- Attachments
-
- InAndOut.zip
- (20.56 KiB) Downloaded 236 times