Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 10-23-2004, 01:05 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:capture image

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);
Reply With Quote
  #12 (permalink)  
Old 10-23-2004, 01:21 PM
Junior Member
 
Join Date: Oct 2004
Posts: 16
Default Re:capture image

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);
But don't work .... have you an idea ?

Reply With Quote
  #13 (permalink)  
Old 10-23-2004, 03:00 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:capture image

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);
Reply With Quote
  #14 (permalink)  
Old 10-23-2004, 07:06 PM
Junior Member
 
Join Date: Oct 2004
Posts: 16
Default Re:capture image

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 ?
Reply With Quote
  #15 (permalink)  
Old 10-24-2004, 11:08 AM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:capture image

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);
If you want to set the size to a predefined size you can use (like 800x600)
Code:
ZoomFactor = 800/image.width
Reply With Quote
  #16 (permalink)  
Old 10-24-2004, 11:46 AM
Junior Member
 
Join Date: Oct 2004
Posts: 16
Default Re:capture image

Thanks a lot meester .....
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:27 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.