|
|||
|
http://www.swfkit.com/forum/thread_1_617.html
But for me, that's still not working. So i use the crop method: image.crop(left, top, right, bottom) Something like this Code:
//screencapture image = Image.captureScreen(); trace(image.width); trace(image.height); // crop the image to the wanted coordinates image.crop(500, 500, 100, 100) // save file var f = "jpg files(*.jpg)|*.jpg|"; var path = Dialogs.fileSave(f,"",""); trace(path); image.save(path); |
|
|||
|
Meester you are great ! It's works. The last thing i want to do, is that the captured image was bigger that the original in the movie. I try to use the fonction "zoom" like this :
Code:
//screencapture image = Image.captureScreen(); trace(image.width); trace(image.height); // crop the image to the wanted coordinates image.crop(0, 0, 500, 350) image.zoom(200) // save file var f = "jpg files(*.jpg)|*.jpg|"; var path = Dialogs.fileSave(f,"",""); trace(path); image.save(path); ![]() |
|
|||
|
You don't have to put 200 as factor to make the image 200% of the original.
To do that, you must use factor 2 //screencapture image = Image.captureScreen(); trace(image.width); trace(image.height); // crop the image to the wanted coordinates image.crop(0, 0, 500, 350) // Double the height and width image.zoom(2) // save file var f = "jpg files(*.jpg)|*.jpg|"; var path = Dialogs.fileSave(f,"",""); trace(path); image.save(path); |
|
|||
|
Ok it's works but it don't do that i want to make .... i try to explain (with my bad english) : I try to make an .exe program for users makes their own wallpaper for windows. The user choice a color, an image, texts, ... and all this choices apeared in one clip ("myclip") who is in the middle of the movie. The movie is in fullscreen. So, i want the user save his work in a jpg file to use it like wallpaper.
I try the script on 2 computer : monitor 15' 800x600 and monitor 19' 1200x1024 .... and the results are not the same. Perhaps the script must be do that : 1/ make the clip "myclip" fullscreen 2/ capture screen 3/ saveScreen 4/ make the clip at his original size Is it possible ? |
|
|||
|
Maybe you can do like this
if you like to set the size to the exact size of your screen: Code:
//screencapture image = Image.captureScreen(); trace(image.width); trace(image.height); // crop the image to the wanted coordinates image.crop(0, 0, 500, 350) // Set the size to the exact size of the display settings CurrentWidth = image.width var ds = SysInfo.displaySetting; SystemWidth = ds.pelsWidth; ZoomFactor = SystemWidth/CurrentWidth image.zoom(ZoomFactor) // save file var f = "jpg files(*.jpg)|*.jpg|"; var path = Dialogs.fileSave(f,"",""); trace(path); image.save(path); Code:
ZoomFactor = 800/image.width |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|