How to scale and clip a BitmapImage in Flex 4.5

Here's my problem, I need to scale and clip images into square sized tiles to put into a tile list. Here's how I want it to work:
1. I want all my tiles to be, say, 300px x 300px.
2. For each image, I want to scale the shorter side (either width or height) to fit in the tile using the "letterbox" scaleMode (so that it maintains aspect ratio).
3. Then I want to position the image in the center and clip away anything left over from either both sides or the top and bottom.
Here's an example to help clarify:
- I have an image with width=600px and height=1200px. First I want to scale the image to width=300px and height=600px (notice that aspect ratio is maintained), then center the image vertically and clip the image to 300 x 300.
Is this possible? This is actually a pretty standard way of displaying square thumbnails in many photo-based web sites, but I can't find a way to make it work in flex.
Any help would be appreciated, thanks!

You can define any number of risk levels (low, medium, high,
etc) using a
case statement
case (true) of
(value(member("total")) < 12): member("risk level").text
= "Low"
(value(member("total")) < 27) : member("risk level").text
= "Medium"
otherwise:member("risk level").text = "High"
end case
"Mike Crisp" <[email protected]> wrote in
message
news:e4kn47$b2n$[email protected]..
> Dave
>
> Now that I've started tinkering. Any suggestions as to
how I might work
the
> following:
>
> If value of member "total".text is between 8 and12
Member"Risk
Level".text =
> "Low Risk"
>
> If value of member "total".text is higher than 27
Member"Risk Level".text
=
> "Unaccepable"
>
> And so on.....
>
> Mike
>

Similar Messages

  • How to create and save a file in flex web application ?

    Hi,
          I want to create and save a file form flex web application. Is it possible ?
    I have done some googling and found that its only possible through file referece, which needs some serverside implementation be called.
    Is it not possible with file reference to create and save file directly ?
    Can any one suggest how to over come this.
    Thanks in advance.

    Alex,
    code written with the Flex Builder 3 libraries will certainly run in Flash Player 10. However, what you need is not so much the capabilities of FP10 but the library functionalities of the Flex 4 package. And I think that Flex 4 code will only run in FP10 and not 9 (but haven't tested this as at work we have not yet been permitted to upgrade, so there is not a lot of point going for Flex 4!).
    Richard

  • How to Scale and Crop

    I'm working on animating some screen capture footage. I'm trying to crop out part of the screen and replace it with my own background, and then do some moves. However, when I zoom in to the footage, it throws off my crop - the crop moves with the zoom instead of staying stationary like I want it to. In other words, I want my custom background to stay the same size and for the box that the screen capture is in to stay the same size (crop the clip). What it's doing instead is cropping the image itself, so that if I scale the image up, the crop moves along with it.
    How do I apply the crop on top of the scale, as part of the clip itself rather than just cropping the image? I'd rather mess with compound clips.
    Thanks!

    Compound clips are nothing more than "groups". In order to supercede clip level edits, sometimes it's necessary to edit the group instead.
    Crop is part of the media, as is scaling. Scaling the media scales the crop.
    Here are three ways to accomplish the effect you're looking for:
    1)
    Select your clip and type Option-G (make compound ["group"])
    Add the cropping you need to the compound level and not the clip itself
    2)
    Select your clip and make compound
    Add Effects > Keying > Mask to the the compound level (optional rounded corners and feathering)
    3)
    Place a Generator > Elements > Shapes at the top level (over the clip you want cropped)
    [Select Square and use Video > Transform > Scale to alter the "aspect"]
    Set the Video > Compositing > Blend Mode to Stencil Alpha
    Select the generator and your clip and make a compound clip (option-G) [creating the compound here is simply to "stop" the action of the Alpha blend mode from "cutting through" the entire project
    HTH

  • How can I move clips from one library to another? Clips are still in original drive and not in new drive.

    I am using iMovie 10.0.7 on a 1-week old iMac 27" running Yosemite 10.10.2. I migrated from iMovie 9 on a 2008 iMac running Snow Leopard and updated the libraries and events, etc.
    I have two external drives connected via USB. I want to move / consolidate the library and clips from one of the external drives to the new iMac's 3TB fusion drive. This is to make room on the external drive to run Time Machine backups.
    Apple's instructions on managing libraries and moving/copying clips/events tell me to drag to move between libraries and to Option-drag to copy. However, simply dragging only copies. I find that if I Command-drag the events/clips, I can "move" them. But when I look outside iMovie in the Mac OS X Finder, the event folders and clip files themselves are still sitting in the original drive.
    I'm very perplexed as to how to really move the clips and event structure. Should I manually copy the clips and event folder structure outside of iMovie? I worry I will mess up iMovie's internal record keeping and folder structure information.
    Thanks in advance.

    Ahh, Ok. I actually had to go to Lynda.com to watch a training video of this highly bassackwards maneuver, but now I have it. In other words, while the intuitive thing is to make a new event to hold the clip you want and then open the old event and drag the clip into it's new event, the only way to accomplish this maneuver is to NOT create a new event, but rather, go to the clip AFTER the one you want to move, select it and then Right-Click on it and select SPLIT EVENT BEFORE SELECTED CLIP (or go to FILE>SPLIT EVENT BEFORE SELECTED CLIP). Then you wait a few seconds while the program thinks a bit (no feedback it is doing this - just a pause) and then it automatically creates a new event with the clip you wanted. Now just double-click the new event and name it something meaningful.
    Thanks for your help!

  • I have a huge file which is in GB and I want to split the video into clip and export each clip individually. Can you please help me how to split and export the videos to computer? It will be of great help!!

    I have a huge file which is in GB and I want to split the video into clip and export each clip individually. Can you please help me how to split and export the videos to computer? It will be of great help!!

    video
    What version of Premiere Elements do you have and on what computer operating system is it running?
    Please review the following workflow.
    ATR Premiere Elements Troubleshooting: PE11: Project Assets Organization for Scene and Highlight Grabs from Collection o…
    But please also determine if your project goal is supported by
    a. format of your source
    and
    b. computer resources
    More later based on details that you will post.
    ATR

  • How to create and use scales for DAQ-6014 in Labview?

    Hello,
    In my application, I use the DAQmx-driver to read the 16 analog input terminals of my DAQ-Card. I create a task with all the 16 channels and define for each channels the input domain (from 0 to 10V) and configure them as NRSE. Then I configure my task to measure the waveforms during 10s with 1000 Hz each time I need it.
    The waveform I measure are raw data and I need to scale them to get a mesurement with physical signification. This is actually done after each measure, which costs a lot of time (almost 5 seconds). Then I tried to use the DAQmx Create Scale.vi to create scales and attach them to the channels during my task creation. The creation of scale works fine and I can attach them to the channels. But when I do my measure, I get the raw data - unscaled.
    I have no idea, what I am doing wrong. I look for some examples on how to use the DAQmx Create Scale.vi but I can't find none.
    Does anybody already have some experiences with this VI?
    Cheers,
    Olivier

    Hi,
    May be I don't get exactly what you mean with:
    "Right click On DAQmx read and check the options with DAQmx AI read (it is a polymorphic VI) ."
    I set the DAQmx read polymorphic VI to the option "Analog 1D Wfm NChan NSamp".
    Anyway, I send you 3 VI:
    - NIDAQ_6014_CreateScales.vi: where I create my scales
    - NIDAQ_6014_StartAIN_Scaled.vi: where I create my task and use the scales
    - Measure.WaveFormReader.vi: where I read my data
    May can you see what is wrong.
    Cheers.
    Attachments:
    Measure.WaveFormReader.vi ‏39 KB
    NIDAQ_6014_CreateScales.vi ‏22 KB
    NIDAQ_6014_StartAIN_Scaled.vi ‏29 KB

  • In InDesign, how does one determine the pixel size of a text box? Specifically, we need to write text to specifications of 600 pixel width, and have no idea a) how to scale a text box to specific pixel width, b) how to

    This may be a basic question... but in InDesign, how does one determine the pixel size of a text box? Specifically, we need to write text to specifications of 600 pixel width, and have no idea a) how to scale a text box to specific pixel width, b) how to determine what word count we can fit in, and c) how to do it in a table? Thanks!

    Set your ruler increments to pixels Preferences>Units & Increments. You can fill the text box with placeholder text Type>Fill with Placeholder text and get a word count from the Info panel with Show Options turned on from the flyout.
    From the Transform panel you can set a text box's width and height

  • How do you make clips go in slowmotion and play reversed using imovie 08

    how do you make clips go in slowmotion and play reversed using imovie 08

    as owner of iM08, you're entitled for a free download here:
    http://www.apple.com/support/downloads/imovieHD6.html
    Plan B) using a designated 'slow mo' software, link, demo and how-to on my site:
    http://karsten.schluter.googlepages.com/slowmowithim08

  • I want to know how to save photos and clip art to my photo libary.

    I want to save different photos and clip art (non-copyrighted) to my desktop photo library. I do not know how to do this. Can someone help me?

    When you see the image you want, right click on it and say '''Save Image As'''. In the box that pops up, navigate to the folder you want to save it as, and click '''Save'''

  • In Captivate 8, how do I insert a text animation. It is grey scale and therefore can't be selected. I also want to use a "typing" effect.

    In Captivate 8, how do I insert a text animation. It is grey scale and therefore can't be selected. I want to use animation and also want to use a "typing" effect.

    Hi there
    What is your project type? Responsive? If so, that's why animation is disabled. Animations are usually built in Flash and Responsive output doesn't "do" Flash.
    Cheers... Rick

  • How can I separate audio and clips?

    How can I separate audio and clips?

    I guess you mean "audio and video clips".
    Then select the clip including both audio and video (while in the timeline) and press cmd-L: this unlinks the stereo pair from its video. If you want to work on each audio channel separately press alt-L while the stereo pair is selected.
    Piero

  • How To Scale the Rulers and Object Dimensions

    Hello. I've been using Corel Xara for a long time - like, since '98 - and recently started using Illustrator CS3.
    In Xara, one can set the scale for rulers and objects. For example, I can set up the rulers for inches and then define a scale of, say, 1-in equals 300-ft. Once done, the ruler no longer displays inches; it displays the scale feet. And, when entering dimensions for objects or grid locations, I can use, for example, 650-ft and it will understand that I mean 2.1667-in.
    Is there any way to do the same sort of thing in Illustrator? I saw how to change the rulers to inches, millimeters, points, etc., but I have been unable to find how to scale the ruler to X:Y.
    Any info?
    Thanx!

    Short answer: No.
    Longer answer: To change the ruler measurments to a different predetermined system, simly control-click (Mac) or right-click (PC) on the rulers themselves. You can not set the application to auto-scale dimension like you describe. You can use math functions in dialog boxes though. So you could enter 600'*.125 for 600 ft times 1/8

  • How to Store and Access Clips on Another Drive

    hi all...how can I keep clips/projects on a drive other than my boot volume? Do I just have to move them back and forth? Or can you setup iMovie to access clips from various drives?
    Thanks!

    imovie will store new clips where you tell it to in your import options, it will see any valid connected drive and list it in the drop down list of locations.
    imovie will also look for attached drives and list any clips it finds in your event list whenever it is opened.
    In the top RH corner of the events list is a small HDD icon, click on it to reveal which of your events are stored where, if you want to move an event, drag it to the appropriate drive, imovie will copy it over and remove the original.
    DO NOT move events in the finder, it will cause you problems.

  • How to size and to scale the EP 6

    Hi,
    I need informations about how to size and how to scale the EP 60.
    Any information is wellcome.
    Regards

    Mauro,
    You might want to look at this thread.
    Re: EP7 server size
    Hope it helps.
    Regards,
    Keith

  • Is it possible to make is so that, immediately after I import a new clip into FCP, the file is automatically selected in the Event Library? (Similar to how After Effects and Premiere work).

    Is it possible to make is so that, immediately after I import a new clip into FCPX, the file is automatically selected in the Event Library? (Similar to how After Effects and Premiere work). Right now, after I import a new file, I have to then go searching for it amid all the other files in my project. It would be extremely helpful if the file I just imported was already highlighted and selected after import, making it instantly "locatable" and ready to go.

    Kryan73 wrote:
    …  after I import a new file, I have to then go searching for it amid all the other files…
    in a perfect world, you do know the recording date, and you simply scroll to that date.
    in a very perfect world, all your other imports are already tagged, so just have to create a smart list 'unrated' ...
    (I know those messy Events… a friend of mine constantly ignores my advice to check the time/date on his camera; on every battery swap, the cam creates a very erratic timestamp ... his actual recordings are listed as made in "2004" or in "2020" .... )

Maybe you are looking for

  • XML Publisher Report EXCEL output Huge stored as Web Pages

    Hello I have a XML Publisher Report which generates EXCEL output and the output file size is huge. What I notice that it is stored as Web Pages *.htm; *.html (Save as Type) in Excel this is the reason it is huge. If I save as Microsoft Office Excel W

  • JDBC connection to Oracle 8.16 from Weblogic 6.1

    I am trying to connect to an Oracle DB using the JDBC thin driver to Weblogic 6.1 I am getting the following error when starting up the Weblogic server: "oracle.net.TNSAddress.SOException" Anyone have an idea as to why I am getting this. Thanks Lathe

  • Preview highlight color

    Currently when I do a text search in Preview and click on a result, it highlights the text in a light grey, which can be irritating to locate in a page of b&w text. When I highlight text normally, it comes out light blue, the color that I selected in

  • I dont want the iphone to search my GAL when composing a message?

    I have an exchange account set up on the phone. All I want that account to do is send and receive email. When i go into my Yahoo account and start typing a persons name, it searches the global address book of my exchange account. How do I stop the ph

  • Event renaming bug?

    If I remember correctly, in iLife '09 it was possible to rename the Event title while viewing the photos therein. In iPhoto '11, however, the only way to rename the Event's title is to return to the list of events and rename it there. There exists NO