I am trying to rotate an image 270 Degrees and then save the image back to an image file. The code is:
Code: Select all
on mouseDown
set the visible of image "TEST" to true
put the screenrect into blah
put specialFolderPath("documents") & slash & "Nav.jpg" into GEST
export snapshot from rect blah to file GEST as JPEG
put "binfile:"&GEST into POL
put URL POL into image "TEST"
set the angle of image "TEST" to 270
//SAVE IMAGE CODE HERE
put specialFolderPath("documents") & slash & "NavYY.jpg" into GEST1
put "binfile:"&GEST1 into HYU
export image "TEST" to URL HYU
//
set the URL of widget "Browser" to GEST1
end mouseDown
The resulting file (export image "TEST" to URL HYU) turns out to be a 6.5MB file that is corrupted and cannot be viewed. Is there a simpler way to rotate an image file that I am missing?
Many Thanks,
Googie.