PROBLEM 1:
I have the original images in the ProductImages folder.
This has to be resized in 2 different dimensions(Normal & Thumb) based on the buttons placed in Resize layout
I use the following code to resize the images
//================= SET VARS =================//
appFolder = forms.Gallery_Form.gallery_to_master_relation.app_folder;
url = forms.Gallery_Form.gallery_to_master_relation.url;
//================= CREATE THUMB IMAGE =================//
forms.Resize.elements.Thumb.setImageURL(url + “/ProductImages/” + fileName );
var jpgData = forms.Resize.elements.Thumb.getThumbnailJPGImage();
application.writeFile(appFolder + ‘/ProductImages/Thumb/’ + fileName, jpgData);
//================= CREATE NORMAL IMAGE =================//
forms.Resize.elements.Normal.setImageURL(url + “/ProductImages/” + fileName );
jpgData = forms.Resize.elements.Normal.getThumbnailJPGImage();
application.writeFile(appFolder + ‘/ProductImages/Normal/’ + fileName, jpgData);
The resize works perfect but does not work properly all the times. Some times it does not resize but the images are copied to the corerct folders without resizing. But for the same images it works when I try the next time.
Is there anything I have to do to get worked all the times??
PROBLEM 2:
I’m displaying the image in the button using the following HTML
img src=“%%gallery_to_master_relation.url%%/ProductImages/Normal/%%image_file_name%%”
Though the image exists it does not show all the times. Some times it shows but the same image does not show up.
Note: I don’t need to use setImageURL because the button size and the images are expected to be the same size.
PROBLEM 3:
I deleted the image from the folder. But the image is still showing up though I
close the application.Some cache problems?? What I have to do??
PROBLEM 4:
In one other solution I have to display the pictures in many dimensions (views) where I don’t have the resized images for each view. But I want to display the pictures with automatic resize on the fly. I know I could use the setImageURL function to set the picture in a button and change the media options accordingly.
This will work well when you show a single picture in the form. But how I can do this when I have to display thumbnails in the list (note: I don’t have the resized thumb images)
Awaiting for your feed back
Thanks
Ahmad