Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-26-2007, 04:37 AM
Junior Member
 
Join Date: Aug 2007
Posts: 10
Default Image resize problem ?

I have found an code about how to resize the image
then I try to resize but I have got a problem about
quality loss. It was not distinctly.

600 px to 400 px

Thank you very much for your kindness.

////////////////////////////////////////////////////////////////////

function Resize(source_image,NewName,desired_width){
var image = Image.load(source_image)
trace("original width is " +image.width)
Zoomfactor = desired_width/image.width
trace("Image is scaled with factor" +Zoomfactor)
image.zoom(Zoomfactor)
image.save(NewName+".jpg")

}

Resize("c://test.jpg","resized_test",600)
Reply With Quote
  #2 (permalink)  
Old 10-29-2007, 07:50 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Image resize problem ?

Maybe you can try
Code:
image.save(NewName+".jpg", 100);
where "100" specifies the quality of the output jpg file.
Reply With Quote
  #3 (permalink)  
Old 10-31-2007, 04:57 AM
Junior Member
 
Join Date: Aug 2007
Posts: 10
Default Re: Image resize problem ?

Thanks a lot for your kindness.
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 04:36 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.