[flexcoders] Resizing Images.

2008-12-31 Thread tchredeemed
Hello!

Our application needs the ability to take a logo (which gets uploaded
in a different interface via rails) and resize it dynamically
depending on which item they are purchasing.

As of right now, I am using a Loader and when Event.COMPLETE is
dispatched, I catch it, create a new width/height, call
myMatrix.scale(newW,HewH), than bitmapFill on a UIComponent using the
bitmapData and my matrix.

Everything works, in that it does resize the image, but they quality
is not very good, some of them are decent looking, and others do not
handle aliasing well at all.

Smoothing is set to true when I do the bitmapFill.

Is there a better way to do this? Should I be creating a new image
with the data rather than resizing the data dynamically?

Halp! :(

Thanks!



[flexcoders] Resizing Images

2008-06-25 Thread kenny14390
Hi. I have a space that is 175x100 and I am loading images into it on
the fly. I am loading images that are as big as 200x115 and I need to
shrink them to fit but also preserve their quality. If I don't specify
the Image component's height and width, the image retains its quality,
but it also retains its own unique height and width, and could spill
outside of my 175x100 box. I then turned on the scaleContent property
and set the horizontal and vertical align to center/middle. This
solves the resizing problem, but not the image quality. The image
looks jagged and smooth lines now look broken. Does anyone know of a
way to keep an image within my constraints and retain image quality?



Re: [flexcoders] Resizing Images

2008-06-25 Thread Chris Ivens
Perhaps making sure that the resizing snaps to pixels. I have the same  
issue on mine and I'm trying to find a solution too. I'm thinking of  
using server-side resizing to get it to work neatly.



On 25 Jun 2008, at 15:20, kenny14390 wrote:

Hi. I have a space that is 175x100 and I am loading images into it on
the fly. I am loading images that are as big as 200x115 and I need to
shrink them to fit but also preserve their quality. If I don't specify
the Image component's height and width, the image retains its quality,
but it also retains its own unique height and width, and could spill
outside of my 175x100 box. I then turned on the scaleContent property
and set the horizontal and vertical align to center/middle. This
solves the resizing problem, but not the image quality. The image
looks jagged and smooth lines now look broken. Does anyone know of a
way to keep an image within my constraints and retain image quality?






RE: [flexcoders] Resizing Images

2008-06-25 Thread Jim Hayes
There is a .smoothing property that you can apply to bitmaps/bitmapData,
which is probably what you're looking for.
On a quick check it looks like the Image component doesn't expose it
(Ely Greenfields superImage component might?), and offhand I'm not
sure if you can just apply it to the source bitmap (if that's what
you're using).
Sorry I don't have the whole answer just at the moment (I don't use the
image component, in general), but hopefully it might set you on the
right track for a google.
 
 
-Original Message-
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Chris Ivens
Sent: 25 June 2008 15:49
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Resizing Images
 
Perhaps making sure that the resizing snaps to pixels. I have the same
issue on mine and I'm trying to find a solution too. I'm thinking of
using server-side resizing to get it to work neatly.
 
 
On 25 Jun 2008, at 15:20, kenny14390 wrote:



Hi. I have a space that is 175x100 and I am loading images into it on
the fly. I am loading images that are as big as 200x115 and I need to
shrink them to fit but also preserve their quality. If I don't specify
the Image component's height and width, the image retains its quality,
but it also retains its own unique height and width, and could spill
outside of my 175x100 box. I then turned on the scaleContent property
and set the horizontal and vertical align to center/middle. This
solves the resizing problem, but not the image quality. The image
looks jagged and smooth lines now look broken. Does anyone know of a
way to keep an image within my constraints and retain image quality?
 
 

__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__

Re: [flexcoders] Resizing Images

2008-06-25 Thread Richard Rodseth
Yes, I think SuperImage does that, and I've seen other blog posts
address this. Example from Googling flex image smoothing:

http://weblogs.macromedia.com/mc/archives/2006/09/enable_smoothin.html

Hope this helps.

On Wed, Jun 25, 2008 at 9:02 AM, Jim Hayes [EMAIL PROTECTED] wrote:
 There is a .smoothing property that you can apply to bitmaps/bitmapData,
 which is probably what you're looking for.

 On a quick check it looks like the Image component doesn't expose it (Ely
 Greenfields superImage component might?), and offhand I'm not sure if you
 can just apply it to the source bitmap (if that's what you're using).

 Sorry I don't have the whole answer just at the moment (I don't use the
 image component, in general), but hopefully it might set you on the right
 track for a google.





 -Original Message-
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Chris Ivens
 Sent: 25 June 2008 15:49
 To: flexcoders@yahoogroups.com
 Subject: Re: [flexcoders] Resizing Images



 Perhaps making sure that the resizing snaps to pixels. I have the same issue
 on mine and I'm trying to find a solution too. I'm thinking of using
 server-side resizing to get it to work neatly.





 On 25 Jun 2008, at 15:20, kenny14390 wrote:

 Hi. I have a space that is 175x100 and I am loading images into it on
 the fly. I am loading images that are as big as 200x115 and I need to
 shrink them to fit but also preserve their quality. If I don't specify
 the Image component's height and width, the image retains its quality,
 but it also retains its own unique height and width, and could spill
 outside of my 175x100 box. I then turned on the scaleContent property
 and set the horizontal and vertical align to center/middle. This
 solves the resizing problem, but not the image quality. The image
 looks jagged and smooth lines now look broken. Does anyone know of a
 way to keep an image within my constraints and retain image quality?



 __
 This communication is from Primal Pictures Ltd., a company registered in
 England and Wales with registration No. 02622298 and registered office: 4th
 Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK.
 VAT registration No. 648874577.

 This e-mail is confidential and may be privileged. It may be read, copied
 and used only by the intended recipient. If you have received it in error,
 please contact the sender immediately by return e-mail or by telephoning
 +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its
 contents to any person.
 This email has been scanned for Primal Pictures by the MessageLabs Email
 Security System.
 __
 


[flexcoders] Resizing images in a TileList

2005-11-03 Thread gootish
Hi, i have a little problem with a TileList in Flex 1.5.

The cellrenderer of my TileList, is a Thumbnail.mxml that´s only has 
an mx:Image:

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml;
horizontalAlign=center
verticalGap=0
width=100%
height=100%
hScrollPolicy=off 
vScrollPolicy=off

mx:Script
var element:Object;
var thumb:Object;

function setValue(str: String, item: Object) {
if (item==undefined) {
visible = false;
return;
} else {
element = item;
thumb = element.REPRESENTACIONES;

visible=true;
}
} 
/mx:Script

mx:Image id=image 
width=100
height=100 
source={thumb.THUMB}
horizontalAlign=center 
verticalAlign=middle
scaleContent=true/   
/mx:VBox


I have an mx:HSlider that´s determine the size of the tilelist´s 
items. When i change the value of HSlider, the size of items changed 
too, but the image dissapear. 

Anyone can help me?






 Yahoo! Groups Sponsor ~-- 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
~- 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [flexcoders] Resizing images in a TileList

2005-11-03 Thread Matt Chotin










Hmm, is the tile too small for the image
now?  What happens if you re-assign the dataProvider after youve
adjusted the slider, do the images appear?











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of gootish
Sent: Thursday, November 03, 2005
4:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Resizing
images in a TileList





Hi, i have a little problem
with a TileList in Flex 1.5.

The cellrenderer of my TileList, is a
Thumbnail.mxml that´s only has 
an mx:Image:

?xml version=1.0 encoding=utf-8?
mx:VBox xmlns:mx=http://www.macromedia.com/2003/mxml

horizontalAlign=center

verticalGap=0

width=100%

height=100%

hScrollPolicy=off 
 vScrollPolicy=off

 mx:Script

 var element:Object;

 var thumb:Object;


 function setValue(str: String, item: Object) {

  if
(item==undefined) {

 
 visible = false;

 
 return;

  } else {

 
 element = item;

 
 thumb = element.REPRESENTACIONES;

 
 

 
 visible=true;

  }

 }  
 /mx:Script

 mx:Image
id=image 

 width=100

 height=100 

 source={thumb.THUMB}

 horizontalAlign=center 

 verticalAlign=middle


scaleContent=true/ 
/mx:VBox


I have an mx:HSlider that´s determine the size of
the tilelist´s 
items. When i change the value of HSlider, the
size of items changed 
too, but the image dissapear. 

Anyone can help me?












--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.